PDA

View Full Version : Dynamic Row Level Constraints?



cphillips
02-15-2010, 05:34 PM
Hello,

Is there any way to set up metadata row level constraints that act dynamically? In my specific case, I need about 30,000 different roles, and defining all their constraints in the metadata xml doesn't sound very appealing.

http://wiki.pentaho.com/display/ServerDoc2x/06.+Adding+Row+Level+Security+to+a+Pentaho+Metadata+Model shows row level constraints like this:
[BT_OFFICE.BC_DEPARTMENT]="Sales"

Is there any way to do something like this (excuse the incorrect syntax):


[BT_OFFICE.BC_DEPARTMENT]=User().DEPARTMENT

If not, any suggested work-arounds?

Thanks for your help.

cphillips
02-16-2010, 04:28 PM
I ended up solving the problem with a constraint like this:


IN([BT_OFFICE.BC_DEPARTMENT]; ROLES())

It isn't perfect. I'll still need a lot of roles, but at least this way I won't have to bloat the metadata.xmi file listing them all out.

Anyone know of a better solution? Is there a way I can accomplish this without needing to define all these roles? Is there a way to store a piece of data about the logged in user and use that?

Thanks for any help.