CheckPermissions Method
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

SPWeb.CheckPermissions Method

Windows SharePoint Services 3

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)

public void CheckPermissions(
	SPBasePermissions 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.


© 2016 Microsoft