Class MondrianLookupMapUserRoleListMapper
- java.lang.Object
-
- org.pentaho.platform.plugin.action.mondrian.mapper.MondrianAbstractPlatformUserRoleMapper
-
- org.pentaho.platform.plugin.action.mondrian.mapper.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 Summary
Fields Modifier and Type Field Description protected boolean
failOnEmptyRoleList
-
Constructor Summary
Constructors Constructor Description MondrianLookupMapUserRoleListMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
Map<String,String>
getLookupMap()
boolean
isFailOnEmptyRoleList()
protected String[]
mapRoles(String[] mondrianRoles, String[] platformRoles)
This version of the mapper uses a map that would be supplied in the spring configuration file.void
setFailOnEmptyRoleList(boolean failOnEmptyRoleList)
void
setLookupMap(Map<String,String> value)
-
Methods inherited from class org.pentaho.platform.plugin.action.mondrian.mapper.MondrianAbstractPlatformUserRoleMapper
getMondrianRolesFromCatalog, getPlatformRolesFromSession, mapConnectionRoles, mapConnectionUser
-
-
-
-
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 classMondrianAbstractPlatformUserRoleMapper
- Parameters:
mondrianRoles
- Sorted list of roles defined in the catalogplatformRoles
- Sorted list of the roles defined in the catalog- Returns:
- Throws:
org.pentaho.platform.api.engine.PentahoAccessControlException
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
setFailOnEmptyRoleList
public void setFailOnEmptyRoleList(boolean failOnEmptyRoleList)
-
isFailOnEmptyRoleList
public boolean isFailOnEmptyRoleList()
-
-