* documents that are visible to the active user.
* @param reader the Lucene index reader
* @throws IOException if an index i/o exception occurs
*/
public void prepare(IndexReader reader) throws IOException {
MetadataAcl acl = new MetadataAcl(this.requestContext);
AuthenticationStatus auth = this.requestContext.getUser().getAuthenticationStatus();
boolean bAdmin = auth.getAuthenticatedRoles().hasRole("gptAdministrator");
Filter filter = null;
if (!bAdmin && !acl.isPolicyUnrestricted()) {
String[] aclValues = acl.makeUserAcl();
filter = new AclFilter(Storeables.FIELD_ACL,aclValues);
}
filter = IsPartOfFilter.make(this.getRequestContext(),filter);
if (filter != null) {
this.documentFilterBitSet = (OpenBitSet)filter.getDocIdSet(reader);