public PentahoMetadataAclHolder( final IConcept aclHolder ) {
try {
Security sec = (Security) aclHolder.getProperty( Concept.SECURITY_PROPERTY );
if ( sec != null ) {
Map<SecurityOwner, Integer> securityMap = sec.getOwnerAclMap();
SecurityOwner secOwn = null;
for ( Map.Entry<SecurityOwner, Integer> entry : securityMap.entrySet() ) {
// We now have the SecurityOwner and the Rights in there.
secOwn = entry.getKey();
int rights = entry.getValue().intValue();
if ( secOwn.getOwnerType() == SecurityOwner.OwnerType.USER ) {
accessControls.add( new PentahoAclEntry( secOwn.getOwnerName(), rights ) );
} else {
accessControls.add( new PentahoAclEntry( new GrantedAuthorityImpl( secOwn.getOwnerName() ), rights ) );
}
}
}
} catch ( Throwable th ) {
// Just being paranoid here in case something doesn't support it.