Package org.pentaho.metadata.model.concept.security

Examples of org.pentaho.metadata.model.concept.security.SecurityOwner


  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.
View Full Code Here

TOP

Related Classes of org.pentaho.metadata.model.concept.security.SecurityOwner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.