[Mondrian] Question regarding programmatic roles

Luc Boudreau lucboudreau at gmail.com
Wed Nov 20 10:25:16 EST 2013


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> 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
> *M:* 734.347.8669
> andrew.yim at truvenhealth.com
> truvenhealth.com
>
> [image: Truven Health Analytics]
>
>
>
> _______________________________________________
> Mondrian mailing list
> 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/73381b98/attachment.html 


More information about the Mondrian mailing list