private void internalPreRead(final ObserverContext<RegionCoprocessorEnvironment> c,
final Query query) throws IOException {
TableName tableName = getTableName(c.getEnvironment());
User activeUser = getActiveUser();
Filter filter = query.getFilter();
boolean cellFirstStrategy = query.getACLStrategy();
// Don't wrap an AccessControlFilter
if (filter != null && filter instanceof AccessControlFilter) {
return;
}
Filter newFilter = (filter != null)
? new FilterList(FilterList.Operator.MUST_PASS_ALL,
Lists.newArrayList(
new AccessControlFilter(authManager, activeUser, tableName, cellFirstStrategy),
filter))
: new AccessControlFilter(authManager, activeUser, tableName, cellFirstStrategy);