Securit Application Block on "Operation Definitions" of Authorization Manager?

Topics: Security Application Block
Aug 20, 2007 at 8:25 PM
How can i use Securit Application Block on "Operation Definitions" of Authorization Manager?
Code below work well for "Task Deifinition" of AzMan.msc but what about if i want to apply authorization on "Operation Definitions"?

IPrincipal principal = new GenericPrincipal(new GenericIdentity("Username"), new string[]Manager);
IAuthorizationProvider ruleProvider = AuthorizationFactory.GetAuthorizationProvider("RuleProvider");
bool authorized = ruleProvider.Authorize(principal, "Print Document");

please reply at sha_sea@hotmail.com
Aug 21, 2007 at 2:12 AM
Hope this link helps you

http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=12439

Surya
Aug 21, 2007 at 2:49 PM
Thank you surya.
But Authorize method also require prefix for Role authorization just like O: for operation?
Aug 21, 2007 at 2:59 PM
Hi Sha,

I answered in the thread mentioned above.

Regards,
Fernando
Aug 21, 2007 at 4:53 PM
Thank you fsi.
Here is further info.
Task Authorization:
bFlag=ruleProvider.Authorize(principal, "MyTask");
Operation Authorization:
Task Authorization:
bFlag=ruleProvider.Authorize(principal, string.Format("O:{0}", "MyOp"));
Role Authorization:
????? Should i useAuthorize Method or something else for Role???

Thanks

fsimonazzi wrote:
Hi Sha,

I answered in the thread mentioned above.

Regards,
Fernando