use of org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.PolicyOwner in project jackrabbit-oak by apache.
the class CompositeAccessControlManager method getApplicablePolicies.
//-------------------------------------< JackrabbitAccessControlManager >---
@Override
public JackrabbitAccessControlPolicy[] getApplicablePolicies(Principal principal) throws RepositoryException {
ImmutableList.Builder<JackrabbitAccessControlPolicy> policies = ImmutableList.builder();
for (AccessControlManager acMgr : acMgrs) {
if (acMgr instanceof JackrabbitAccessControlManager && acMgr instanceof PolicyOwner) {
policies.add(((JackrabbitAccessControlManager) acMgr).getApplicablePolicies(principal));
}
}
List<JackrabbitAccessControlPolicy> l = policies.build();
return l.toArray(new JackrabbitAccessControlPolicy[l.size()]);
}
Aggregations