WebPartPermissionAttribute Class
The WebPartPermissionAttribute class allows security actions for the WebPartPermission to be applied to code using declarative security. This class cannot be inherited.
System.Object
System.Attribute
System.Security.Permissions.SecurityAttribute
System.Security.Permissions.CodeAccessSecurityAttribute
Microsoft.SharePoint.Security.WebPartPermissionAttribute
Public Constructors
The following table shows the constructors of the WebPartPermissionAttribute class and a brief description of each.
Name | Description |
---|---|
WebPartPermissionAttribute(System.Security.Permissions.SecurityAction ) | Initializes a new instance of the WebPartPermissionAttribute class. |
Public Methods
The following table shows the methods of the WebPartPermissionAttribute class and a brief description of each.
Name | Description |
---|---|
CreatePermission | Creates a WebPartPermission object. |
Public Properties
The following table shows the properties of the WebPartPermissionAttribute 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. |
Unrestricted | Boolean | Gets or sets a value indicating whether full (unrestricted) permission to the resource protected by the attribute is declared. |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.
Remarks
The scope of the declaration that is allowed is determined by the SecurityAction that is used.
The security information declared by a security attribute is stored in the metadata of the attribute target and is accessed by the system at run time. Security attributes are used only for declarative security. For imperative security, use the corresponding permission class.
Requirements
Namespace: Microsoft.SharePoint.Security
Platforms: Microsoft Windows Server 2003
Assembly: Microsoft SharePoint Security (in Microsoft.SharePoint.Security.dll)
Security: Code Access Security