Class MondrianLookupMapUserRoleListMapper

  • All Implemented Interfaces:
    org.pentaho.platform.api.engine.IConnectionUserRoleMapper, org.springframework.beans.factory.InitializingBean

    public class MondrianLookupMapUserRoleListMapper
    extends MondrianAbstractPlatformUserRoleMapper
    implements org.springframework.beans.factory.InitializingBean
    • Field Detail

      • failOnEmptyRoleList

        protected boolean failOnEmptyRoleList
    • Constructor Detail

      • MondrianLookupMapUserRoleListMapper

        public MondrianLookupMapUserRoleListMapper()
    • Method Detail

      • mapRoles

        protected String[] mapRoles​(String[] mondrianRoles,
                                    String[] platformRoles)
                             throws org.pentaho.platform.api.engine.PentahoAccessControlException
        This version of the mapper uses a map that would be supplied in the spring configuration file. For every platform role that the user has, it looks into the supplied map for the corresponding role name. Then, the resulting role gets bounced against the roles in the given catalog and only those roles are returned. Example: Platform Role Mondrian Role Mondrian Catalog(s) Sales M_SALES Accting_Cat, Sales_Cat Marketing M_MKTING Sales_Cat CEO CTO Engineering M_ENG Eng_Cat, Presales_Cat Support M_ENG Presales_Cat, Services_Cat Services M_SVCS Presales_Cat If user admin has Sales , and CEO as roles, he connects to the Accting_Cat, or Sales_Cat catalogs, he will be connected with the mondrian role M_SALES. If user Tiffany is in the Engineering and Services roles, and connects to the Presales_Cat catalog, she will receive the role M_ENG,M_SVCS (which mondrian will resolve additively).
        Specified by:
        mapRoles in class MondrianAbstractPlatformUserRoleMapper
        mondrianRoles - Sorted list of roles defined in the catalog
        platformRoles - Sorted list of the roles defined in the catalog
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • setFailOnEmptyRoleList

        public void setFailOnEmptyRoleList​(boolean failOnEmptyRoleList)
      • isFailOnEmptyRoleList

        public boolean isFailOnEmptyRoleList()