permissions

  • Thread starter Thread starter ivang
  • Start date Start date
I

ivang

Hi.

How to get a permission set of current security stack, create some permission and determine if it is subset of current permissions? Is it possible?

Thanks.
 
ivang,

It depends on the permission that you want to get, but generally, you
would create an instance of a class that implements IPermission (typically,
it derives from CodeAccessPermission). The constructor will generally take
arguments specifying the type of permission you are requesting.

Then, call Demand on the instance. If you have rights, then it will do
nothing. If you do not have rights, a SecurityException will be thrown.

Hope this helps.
 
Back
Top