[Mondrian] Roles with parameters for members

Nizar Mabroukeh nmabroukeh at crosscommercemedia.com
Fri Dec 7 10:36:09 EST 2012


I am trying to implement parametrized roles, such that a mondrian user can
pass parameters in addition to passing the role when establishing a
connection.

In the schema, I have something that looks like this:
<role name="GenericSalesPerson">
      <CubeGrant cube="Customers" access="all">
        <HierarchyGrant hierarchy="Security" topLevel="GID"
bottomLevel="UID" access="custom">
          <MemberGrant member="[Security].[{gid}],[{uid}]" access="all">
          </MemberGrant>
        </HierarchyGrant>
      </CubeGrant>
...
</role>

As you can see I am trying to limit the role's access to the cube based on
a degenerate security dimension, so the user can only see data that have
his own groupId and UserId.
I want the ability to retrieve the role after establishing connection by
using schema.getRole(), resolve the parameters in the role (the {gid} and
{uid}) to their provided values, then set the connection role using
connection.setRole() for these changes to take effect. It will be great if
I can retrieve the role as XML and process it. I am using Mondrian 3.3.0
and I do not see any such methods in the API to retrieve role as XML.
Any help or directions? much appreciated.


Nizar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20121207/889a36ac/attachment-0001.html 


More information about the Mondrian mailing list