Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Checks whether the current user has the specified set of permissions for the list and throws an exception if the user does not have them.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
'Declaration
Public Overrides Sub CheckPermissions ( _
permissionMask As SPBasePermissions _
)
'Usage
Dim instance As SPList
Dim permissionMask As SPBasePermissions
instance.CheckPermissions(permissionMask)
public override void CheckPermissions(
SPBasePermissions permissionMask
)
permissionMask
Type: Microsoft.SharePoint.SPBasePermissionsAn enumeration value that specifies a set of permissions.
ISecurableObject.CheckPermissions(SPBasePermissions)
Exception | Condition |
---|---|
UnauthorizedAccessException | The current user does not have the specified permissions. |
This method calls the base class CheckPermissions(SPBasePermissions) method to check the permissions.
You can catch the exception and redirect the user to /_layouts/AccessDenied.aspx.