Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

How to get a Cube name in getAccess(Dimension | Hierarchy) methods of the Role class

$
0
0
Hi all,

In my application, there are dynamic permissions. To handle this I have extended Mondrian's DelegatingRole. In my custom role class, permissions of cube, dimensions and measures are verified based on the currently signed-in user.
Cube names are unique so no issue here. Dimension and measure permission can be verified in context of a cube. Hence, I need to retrieve cube-name from the dimension and measure. To get cube name from a dimension, I type cast Dimension to RolapCubeDimension and get a Cube.

The issue is that getAccess(Dimension) method is called for a dimension, one time it can be type-cast to RolapCubeDimension and other time it is just RolapDimension. Why is same dimension having two types?

E.g. Consider Country dimension, during multiple invocations of Role.getAccess() method, sometimes I get type as RolapCubeDimension or RolapDimension.

Please suggest me a solution to get a cube in a Role.


Thanks,
Chir

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>