views:

72

answers:

1

Hello everyone,

I am confused about what does the Unrestricted property of .Net security, as mentioned here, http://msdn.microsoft.com/en-us/library/system.security.permissions.securityattribute.unrestricted.aspx we could give it full or non-full.

My confusion is for permission in a straightforward understanding, there should be only two status -- granted and not-granted, what does th full and non-full mean? My confusion is the word "unrestricted" makes me think that when unrestricted is false, it means limited/partial permission (the opposite of full is partial/limited). Appreciate if anyone could clarify.

thanks in advance, George

+1  A: 

George,

i think the key to understanding this property is the following line:

true if full permission to the protected resource is declared; otherwise, false.

As i see it, there is a resource and the Unrestricted property, which is a boolean, simply tells you if you have full permission or not.

Imagine that Unrestricted is actually renamed to FullPermission. i'm not sure why they didn't do that in the first place.

-p

Paul Sasik
If I set false to Unrestricted, it means no permission or partial permission?
George2
That is how i understand it. Of course, the best thing to do is to code it and run it to make sure it behaves the way you/i expect. There are only two possibilities. ;-)
Paul Sasik
"is how i understand it" -- confused. Do you mean when unrestricted is assigned false, it means no permission or partial permission?
George2