Search code examples
securitypentahomondrianuser-roles

Pentaho/Mondrian: how to set "dynamic roles" for logged user?


I want to filter sales data for Agent Dimension. One Agent can log in Pentaho and see only his data and related sub-agent (hierarchy agent-sub agent is defined in a closure table). I can't do a Role for every Agent because the dimension is SCD type 2 (so the structure/relation between agent/sub-agent can vary in time).

How I can obtain this particular filter/role schema access?

Any help is appreciated, Thanks in advance.

EDIT: Here you can find a sample code for my solution (ant project on Github)


Solution

  • You could use Dynamic Schema Processing. There are some resources on the web :

    http://thejavatar.com/dynamic-schema-processor-modify-mondrian-schema-in-run-time/

    Although it seems to use the Entreprise Edition, it should be interesting