SPFileCollectionAddParameters.RequireWebFilePermissions Property
Indicates whether adding Web files requires the Add and Customize Web Pages permission.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Available in SharePoint Online
Syntax
'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)> _
Public Property RequireWebFilePermissions As Boolean
Get
Set
'Usage
Dim instance As SPFileCollectionAddParameters
Dim value As Boolean
value = instance.RequireWebFilePermissions
instance.RequireWebFilePermissions = value
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
public bool RequireWebFilePermissions { get; set; }
Property Value
Type: System.Boolean
true if the SPRights are required; otherwise false. The default is true.
Remarks
To add a Web Part to a Web page, you must have the Add and Customize Pages permission at the site level.
By default, this is true for all files that have extensions in WebFileExtensions. In certain scenarios, for example, users in the Contributor role can create a Web page from a template. A calling application can override this behavior by setting this parameter to false. However, the calling application must ensure that the file does not contain malicious content.
See Also
Reference
SPFileCollectionAddParameters Class
SPFileCollectionAddParameters Members
Microsoft.SharePoint Namespace
[M:Permissions.Permissions.AddPermission(T:System.String,T:System.String,T:System.String,T:System.String,T:System.Int32)]