SPList.CheckPermissions Method

Checks the permissions for the list and throws UnauthorizedAccessException if the current user does not have the specified set of rights.

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

Syntax

Public Sub CheckPermissions ( _
    permissionMask As SPBasePermissions _
)

Dim instance As SPList
Dim permissionMask As SPBasePermissions

instance.CheckPermissions(permissionMask)
public void CheckPermissions(
    SPBasePermissions permissionMask
)

Parameters

  • permissionMask
    Type: Microsoft.SharePoint.SPBasePermissions
    An SPBasePermissions value that specifies permissions for the list. See also DoesUserHavePermissions. If the permission of the current user on the current list object does not include all the bits that are specified in the permissionMask parameter, UnauthorizedAccessException is thrown. When the code is running within a Web application, the user may be redirected to /_layouts/AccessDenied.aspx.

Implements

ISecurableObject.CheckPermissions(SPBasePermissions)

See Also

Reference

SPList Class

SPList Members

Microsoft.SharePoint Namespace