SPWeb.CheckPermissions Method
Checks the permissions for the Web site and raises an Access Denied error if the permissions fail.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
Public Sub CheckPermissions ( _
permissionMask As SPBasePermissions _
)
Dim instance As SPWeb
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 of the current Web site object does not include all the bits that are specified in the permissionMask parameter, an UnauthorizedAccessException error is raised. When the code is running within a Web application, the user may be redirected to /_layouts/AccessDenied.aspx.
Implements
ISecurableObject.CheckPermissions(SPBasePermissions)