Atttibutes of authorization path in BizRule

Aug 26, 2009 at 1:12 PM

On the role level I want to put the context of the role in attributes. (eg, the objects the role has access to)

I assign the authorizations on the Role level. I have a task assigned to the role and a operation assigned to the task.

On an operation level I want to check the context of the Role from the role attributes in custom BizRule.

I noticed that the checkAccess can return the attributes encountered on its authorization path. Is there a way to get to these attributes in the custom BizRule I put on the operation level? I could perform a first checkAcces, get the attributes back, put them in the contextparameters and do the checkaccess again, but that seems to mutch overhead.

Is there a better way?

 

Ciao, Bert

 

 

Coordinator
Aug 27, 2009 at 6:14 AM

Ciao Bert,

inside the Biz Rule (at operation level) you can access all NetSqlAzMan objects through the “ownerItem” parameter.

To retrieve another Item attributes (inside the Biz Rule) …

IAzManAttribute<IAzManItem>[] roleAttributes = ownerItem.Application["my role name"].GetAttributes();

foreach (var roleAttribute in roleAttributes)

{

string key = roleAttribute.Key;

      string value = roleAttribute.Value;

      //Do something

}

__________________________________
Andrea Ferendeles
NetSqlAzMan Project Coordinator  
E-mail aferende@hotmail.com Web http://netsqlazman.codeplex.com