Class MondrianAbstractPlatformUserRoleMapper

    • Constructor Detail

      • MondrianAbstractPlatformUserRoleMapper

        public MondrianAbstractPlatformUserRoleMapper()
    • Method Detail

      • mapRoles

        protected abstract String[] mapRoles​(String[] mondrianRoles,
                                             String[] platformRoles)
                                      throws org.pentaho.platform.api.engine.PentahoAccessControlException
        Subclasses simply need to implement this one method to do the specific mapping desired.
        Parameters:
        mondrianRoles - Sorted list of roles defined in the catalog
        platformRoles - Sorted list of the roles defined in the catalog
        Returns:
        Throws:
        org.pentaho.platform.api.engine.PentahoAccessControlException
      • getMondrianRolesFromCatalog

        protected String[] getMondrianRolesFromCatalog​(org.pentaho.platform.api.engine.IPentahoSession userSession,
                                                       String context)
        This method returns the role names as found in the Mondrian schema. The returned names must be ordered (sorted) or code down-stream will not work.
        Parameters:
        userSession - Users' session
        catalogName - The name of the catalog
        Returns:
        Array of role names from the schema file
      • getPlatformRolesFromSession

        protected String[] getPlatformRolesFromSession​(org.pentaho.platform.api.engine.IPentahoSession session)
        This method returns the users' roles as specified in the Spring Security authentication object. The role names returned must be sorted for other code downstream to work properly.
        Parameters:
        session - The users' session
        Returns:
        Users' roles as defined in the authentication object
      • mapConnectionRoles

        public String[] mapConnectionRoles​(org.pentaho.platform.api.engine.IPentahoSession userSession,
                                           String connectionContext)
                                    throws org.pentaho.platform.api.engine.PentahoAccessControlException
        Specified by:
        mapConnectionRoles in interface org.pentaho.platform.api.engine.IConnectionUserRoleMapper
        Throws:
        org.pentaho.platform.api.engine.PentahoAccessControlException
      • mapConnectionUser

        public Object mapConnectionUser​(org.pentaho.platform.api.engine.IPentahoSession userSession,
                                        String context)
                                 throws org.pentaho.platform.api.engine.PentahoAccessControlException
        Specified by:
        mapConnectionUser in interface org.pentaho.platform.api.engine.IConnectionUserRoleMapper
        Throws:
        org.pentaho.platform.api.engine.PentahoAccessControlException