SPSecurableObject.CheckPermissions Method
SharePoint 2010
Determines whether the current user has a specified set of permissions.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
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.