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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top