WebPartPermission Class

The WebPartPermission class represents a custom permission that controls the ability to access Web Part resources.

System.Object

   System.Security.CodeAccessPermission

      Microsoft.SharePoint.Security.WebPartPermission

Public Constructors

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

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

Public Methods

The following table shows the methods of the WebPartPermission 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 WebPartPermission from an XML encoding.
Intersect(System.Security.IPermission) Creates and returns an IPermission object that represents the logical intersection of two WebPartPermission instances.
IsSubsetOf(System.Security.IPermission) Returns a Boolean value that 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.
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 WebPartPermission class, the data type of each property, and a brief description of each.

Name Data Type Description
Connections Boolean Gets or sets a value that determines whether Web Part to Web Part connections are allowed.

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