Share via


SharePointPermission Class

The SharePointPermission class represents a custom permission that controls the ability to access Microsoft SharePoint Products and Technologies resources. This class cannot be inherited.

System.Object

   System.Security.CodeAccessPermission

      Microsoft.SharePoint.Security.SharePointPermission

Public Constructors

The following table shows the constructors of the SharePointPermission class and a brief description of each.

Name Description
SharePointPermission(System.Security.Permissions.PermissionState) Initializes a new instance of the SharePointPermission class.

Public Methods

The following table shows the methods of the SharePointPermission class and a brief description of each.

Name Description
Copy Creates and returns an identical copy of the current permission object.
FromXml(System.Security.SecurityElement) Reconstructs a SharePointPermission object from an XML encoding.
Intersect(System.Security.IPermission) Creates and returns an IPermission object that is the logical intersection of two SharePointPermission instances.
IsSubsetOf(System.Security.IPermission) Determines whether the current permission is a subset of the specified permission.
IsUnrestricted Returns a Boolean value that determines whether the current instance of the permission has unrestricted access to the resource protected by the permission.
ToXml Creates an XML encoding of the permission object and its current state.
Union(System.Security.IPermission) Creates and returns an IPermission object that is the union of the current permission and the specified permission.

Public Properties

The following table shows the properties of the SharePointPermission class, the data type of each property, and a brief description of each.

Name Data Type Description
ObjectModel Boolean Gets or sets a value indicating whether use of the SharePoint Products and Technologies object model is allowed.
UnsafeSaveOnGet Boolean Gets or sets a value indicating whether saving to the SharePoint Products and Technologies database is allowed during an HTTP-GET request.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.

Requirements

Namespace: Microsoft.SharePoint.Security

Platforms: Microsoft Windows Server 2003

Assembly: Microsoft SharePoint Security (in Microsoft.SharePoint.Security.dll)

Security: Code Access Security