WebPartPermissionAttribute Class
NOTE: This API is now obsolete.
Allows security actions for the WebPartPermission to be applied to code using declarative security. This class cannot be inherited.
Inheritance Hierarchy
System.Object
System.Attribute
System.Security.Permissions.SecurityAttribute
System.Security.Permissions.CodeAccessSecurityAttribute
Microsoft.SharePoint.Security.WebPartPermissionAttribute
Namespace: Microsoft.SharePoint.Security
Assembly: Microsoft.SharePoint.Security (in Microsoft.SharePoint.Security.dll)
Syntax
'Declaration
<SerializableAttribute> _
<AttributeUsageAttribute(AttributeTargets.All, AllowMultiple := True)> _
<ObsoleteAttribute("Web Part permissions are obsolete and no longer required")> _
Public NotInheritable Class WebPartPermissionAttribute _
Inherits CodeAccessSecurityAttribute
'Usage
Dim instance As WebPartPermissionAttribute
[SerializableAttribute]
[AttributeUsageAttribute(AttributeTargets.All, AllowMultiple = true)]
[ObsoleteAttribute("Web Part permissions are obsolete and no longer required")]
public sealed class WebPartPermissionAttribute : CodeAccessSecurityAttribute
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.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.