This topic has not yet been rated - Rate this topic

SPWebPartManager.GetPermissions Method

Gets the permissions of the current user on the Web Part.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
public Permissions GetPermissions(
	WebPart webPart
)

Parameters

webPart
Type: System.Web.UI.WebControls.WebParts.WebPart
A Web Part on which to evaluate the permissions of the current user.

Return Value

Type: Microsoft.SharePoint.WebPartPages.Permissions
An enumeration value that indicates whether the current user can modify the Web Part and, if the user can modify it, whether the user can modify all properties or only personal view properties.
Exception Condition
ArgumentNullException

webPart is null.

The value returned by this method takes into account the user's rights, the page mode, whether the Web Part is shared or personalized, the value of the AllowEdit property, and the values of properties for the WebPartZone object that contains the Web Part.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ