This topic has not yet been rated - Rate this topic

SPSecurableObject.CheckPermissions Method

SharePoint 2010

Determines whether the current user has a specified set of permissions.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
public virtual void CheckPermissions(
	SPBasePermissions permissionMask
)

Parameters

permissionMask
Type: Microsoft.SharePoint.SPBasePermissions
A bitwise combination of enumeration values that specifies a set of permissions.

Implements

ISecurableObject.CheckPermissions(SPBasePermissions)
Exception Condition
UnauthorizedAccessException

The current user does not have the specified permissions.

This method calls the DoesUserHavePermissions method with permissionMask and throws the exception if DoesUserHavePermissions returns false.

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