Permission Sets

So far in this chapter, we have discussed the power, use, and variety of permissions. However, if the same operation is to be performed on a group of permissions, it is inconvenient to type in the same thing for every permission. Permission sets eliminate this inconvenience.

The basic permission set class, System.Security.PermissionSet, is essentially just a group of permissions. For the benefit of security policy, there is another class, System.Security.NamedPermissionSet, that adds a name and description to the collection. The name gives the ability to uniquely tag and identify certain permission sets.

All of the security actions mentioned earlier can also be done with permission sets. For instance, if you want your code to ...

Get .NET Framework Security now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.