SPSecurableObject.CheckPermissions method

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

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

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)

ExceptionCondition
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.

Show: