Package org.pentaho.platform.api.engine

Examples of org.pentaho.platform.api.engine.PentahoAccessControlException


  protected void validateAccess() throws PentahoAccessControlException {
    boolean isAdmin =
      getPolicy().isAllowed( RepositoryReadAction.NAME ) && getPolicy().isAllowed( RepositoryCreateAction.NAME )
        && ( getPolicy().isAllowed( AdministerSecurityAction.NAME ) || getPolicy().isAllowed( PublishAction.NAME ) );
    if ( !isAdmin ) {
      throw new PentahoAccessControlException( "Access Denied" );
    }
  }
View Full Code Here


    IAuthorizationPolicy policy = PentahoSystem.get( IAuthorizationPolicy.class );
    boolean isAdmin =
        policy.isAllowed( RepositoryReadAction.NAME ) && policy.isAllowed( RepositoryCreateAction.NAME )
            && ( policy.isAllowed( AdministerSecurityAction.NAME ) || policy.isAllowed( PublishAction.NAME ) );
    if ( !isAdmin ) {
      throw new PentahoAccessControlException( "Access Denied" );
    }
  }
View Full Code Here

    }
    if ( mappedRolesList.size() > 0 ) {
      // We were able to map the roles - return the mappings.
      return mappedRolesList.toArray( new String[mappedRolesList.size()] );
    } else if ( failOnEmptyRoleList ) {
      throw new PentahoAccessControlException( Messages.getInstance().getErrorString(
          "MondrianOneToOneUserRoleListMapper.ERROR_001_NO_CORRESPONDENCE" ) ); //$NON-NLS-1$
    } else {
      return null;
    }
  }
View Full Code Here

      }
    }
    if ( rtnRoles.size() > 0 ) {
      return rtnRoles.toArray( new String[rtnRoles.size()] );
    } else if ( failOnEmptyRoleList ) {
      throw new PentahoAccessControlException( Messages.getInstance().getErrorString(
          "MondrianOneToOneUserRoleListMapper.ERROR_001_NO_CORRESPONDENCE" ) ); //$NON-NLS-1$
    } else {
      return null;
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.engine.PentahoAccessControlException

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.