Adjustible Authorisation rules

Adjustible Authorisation rules

Old forum URL:

Tobique posted on Monday, July 30, 2012



sorry to bother you with probably a silly question but i have a problem,

I have to create a rule in witch the validation action is variable the property info is variable and the role is variable so they can be uploaded from a database any suggestions?



Tobique replied on Monday, July 30, 2012

a small example,

BusinessRules.AddRule(new Csla.Rules.CommonRules.IsInRole(action, property,competence))


how can i implement this?

JonnyBee replied on Monday, July 30, 2012

Do these "compentencies" vary between the objects? Is these rules for property or object level authorization.

You must remember that you can only have 1 rule for each Property and AuthorizationAction and these are defined at the "type" level.

So - in order to use the AuthzRules you must either have

A third option for property authorization is to implement your own overrides on

and make these check against cached values from the database.

You must also remember to set CacheResult = false on the property level rules if you choose to implement as AuthorizationRules and the result may vary from the first execution of the rule.

Copyright (c) Marimer LLC