Search in sources :

Example 1 with PentahoGrantedAuthorityEffectiveAclsResolver

use of org.pentaho.platform.engine.security.acls.PentahoGrantedAuthorityEffectiveAclsResolver in project pentaho-platform by pentaho.

the class PentahoBasicAclVoter method getEffectiveAcls.

public IAclEntry[] getEffectiveAcls(final IPentahoSession session, final IAclHolder holder) {
    Authentication auth = getAuthentication(session);
    if (auth == null) {
        // No user, so no ACLs.
        return null;
    }
    List allAcls = holder.getEffectiveAccessControls();
    IAclEntry[] acls = new IAclEntry[allAcls.size()];
    acls = (IAclEntry[]) allAcls.toArray(acls);
    PentahoGrantedAuthorityEffectiveAclsResolver resolver = new PentahoGrantedAuthorityEffectiveAclsResolver();
    IAclEntry[] resolvedAcls = resolver.resolveEffectiveAcls(acls, auth);
    return resolvedAcls;
}
Also used : IAclEntry(org.pentaho.platform.api.engine.IAclEntry) Authentication(org.springframework.security.core.Authentication) PentahoGrantedAuthorityEffectiveAclsResolver(org.pentaho.platform.engine.security.acls.PentahoGrantedAuthorityEffectiveAclsResolver) List(java.util.List)

Aggregations

List (java.util.List)1 IAclEntry (org.pentaho.platform.api.engine.IAclEntry)1 PentahoGrantedAuthorityEffectiveAclsResolver (org.pentaho.platform.engine.security.acls.PentahoGrantedAuthorityEffectiveAclsResolver)1 Authentication (org.springframework.security.core.Authentication)1