I am working with roles in mondrian schema and i would like to know if possible to make intersection of two declared roles.
I created these roles:
For product manager that has restriction on specific types of products
And financial manager that has restriction on specific country
My required result should be intersection of these two roles, i found that exist element UNION, but i found that it returns sum of both so the user can see all from both, it isn't my required solution.
Something like this:
This is example on data:
fact_product
dim_product_group
dim_country
The result for Role product_and_financial_manager_for_wardrobes_and_germany_resort should be see data only in this range
Thanks for you help
I created these roles:
For product manager that has restriction on specific types of products
HTML Code:
<Role name="product_manager">
<SchemaGrant access="none">
<CubeGrant cube="product" access="all">
<HierarchyGrant hierarchy="product_group" rollupPolicy="partial" access="custom">
<MemberGrant member="[product_group].[Wardrobes]" access="all">
</MemberGrant>
</HierarchyGrant>
</CubeGrant>
</SchemaGrant>
</Role>
And financial manager that has restriction on specific country
HTML Code:
<Role name="financial_manager">
<SchemaGrant access="none">
<CubeGrant cube="country" access="all">
<HierarchyGrant hierarchy="country" rollupPolicy="partial" access="custom">
<MemberGrant member="[country].[Germany]" access="all">
</MemberGrant>
</HierarchyGrant>
</CubeGrant>
</SchemaGrant>
</Role>
My required result should be intersection of these two roles, i found that exist element UNION, but i found that it returns sum of both so the user can see all from both, it isn't my required solution.
HTML Code:
<Role name="product_and_financial_manager_for_wardrobes_and_germany_resort">
<Union>
<RoleUsage roleName="product_manager" />
<RoleUsage roleName="financial_manager" />
</Union>
</Role>
HTML Code:
<Role name="product_and_financial_manager_for_wardrobes_and_germany_resort">
<Intersection>
<RoleUsage roleName="product_manager" />
<RoleUsage roleName="financial_manager" />
</Intersection>
</Role>
fact_product
id_fact_product | price | id_dim_product_group | id_dim_country |
1 | 100 | 1 | 1 |
2 | 150 | 1 | 2 |
3 | 120 | 2 | 2 |
4 | 230 | 1 | 2 |
dim_product_group
id_dim_product_group | section |
1 | Wardrobes |
2 | Tables |
dim_country
id_dim_country | country |
1 | Italy |
2 | Germany |
The result for Role product_and_financial_manager_for_wardrobes_and_germany_resort should be see data only in this range
id_fact_product | price | id_dim_product_group | id_dim_country | section | country |
2 | 150 | 1 | 2 | Wardrobes | Germany |
4 | 230 | 1 | 2 | Wardrobes | Germany |
Thanks for you help