[Mondrian] Union Roles
dev at noipex.com
Wed Mar 23 07:31:40 EDT 2016
I am struggling to make a Union of two roles. I can't get it to work.
I tried in Mondrian 4.3 and 4.2
For testing, I have simplified my roles in the schema to this:
Then for testing I used this code:
Connection connection = DriverManager.getConnection("....some stuff
OlapConnection olapConnection = connection.unwrap(OlapConnection.class);
List<String> l = olapConnection.getAvailableRoleNames();
out.println (l); //this will nicely print my two roles
out.println (l.get(1)); //this prints the second role
The last statement gives
org.olap4j.OlapException: Unknown role 'Group2_13'
I have been digging a bit in the code to see if I could figure out why
this happens but no luck. If I use the RolapSchema object to do
lookupRole, it also returns null. It knows the role, but the Role object
Anybody any idea what I am doing wrong?
Maybe some background. What I am trying to do is to set "OR"-permissions
on two hierarchies.
A user has access if he has permission to see something in hierarchy 1
(he manages the customer of the sale), or to see it through hierarchy 2
(he manages the employee who made the sale) .
Unless I am wrong, that can't be done within a single Role.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mondrian