[Mondrian] Question regarding programmatic roles

Yim, Andrew (Truven Health) andrew.yim at truvenhealth.com
Wed Nov 20 12:13:55 EST 2013


Thank you Luc.

I was trying to avoid having to use the Mondrian connection, this is exactly what I was looking for.


Andrew Yim   |   Truven Health Analytics   |   O: 734.913.3174   |    M: 734.347.8669

From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of Luc Boudreau
Sent: Wednesday, November 20, 2013 10:25 AM
To: Mondrian developer mailing list
Subject: Re: [Mondrian] Question regarding programmatic roles


Andrew,

The Role API is mondrian specific, so it takes mondrian objects as parameters. To get access to the mondrian connection from an olap4j connection, you can do:

    java.sql.Connection.unwrap(RolapConnection.class)

The same applies to metadata objects. You can do:

    org.olap4j.metadata.Cube.unwrap(mondrian.olap.Cube.class)

Let me know if that's what you needed.

Luc

On Wed, Nov 20, 2013 at 9:32 AM, Yim, Andrew (Truven Health) <andrew.yim at truvenhealth.com<mailto:andrew.yim at truvenhealth.com>> wrote:
I’m in the process of implementing programmatic roles in our adhoc reporting tool.  We’re currently running Mondrian stand alone against our OLAP schema and we would like to dynamically create roles for each user.

The problem I’m having right now is with the granting of access to specific objects in the schema (schema, cubes, dimensions, hierarchies, & members).  Is there a way to convert a olap4j metadata object (Schema, Cube, Dimension, etc) back to a legacy Mondrian olap object?

The reason I ask is the grant method on the RoleImpl class only accepts the legacy Mondrian.olap.* objects.  Should I use a legacy Mondrian.olap.connection to lookup the objects that I want to grant access to?

Thanks in advance for your help.


Andrew Yim
Software Engineer

Truven Health Analytics
O: 734.913.3174<tel:734.913.3174>
M: 734.347.8669<tel:734.347.8669>
andrew.yim at truvenhealth.com<mailto:andrew.yim at truvenhealth.com>
truvenhealth.com<http://truvenhealth.com>



_______________________________________________
Mondrian mailing list
Mondrian at pentaho.org<mailto:Mondrian at pentaho.org>
http://lists.pentaho.org/mailman/listinfo/mondrian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20131120/7e369e70/attachment.html 


More information about the Mondrian mailing list