Export (0) Print
Expand All

SPList.CheckPermissions method

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)

public override void CheckPermissions(
	SPBasePermissions permissionMask
)

Parameters

permissionMask
Type: Microsoft.SharePoint.SPBasePermissions

An enumeration value 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 base class CheckPermissions(SPBasePermissions) method to check the permissions.

You can catch the exception and redirect the user to /_layouts/AccessDenied.aspx.

Show:
© 2014 Microsoft