Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SPWeb.DoesUserHavePermissions Method (String, SPBasePermissions)

Windows SharePoint Services 3

Checks permissions of the specified user for a specified set of rights and returns a Boolean value.

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

public bool DoesUserHavePermissions(
	string login,
	SPBasePermissions permissionMask
)

Parameters

login
Type: System.String
A string that contains the user name (DOMAIN\User_Alias) of a Web site user.
permissionMask
Type: Microsoft.SharePoint.SPBasePermissions
An SPBasePermissions value that specifies the rights.

Return Value

Type: System.Boolean
true if the user has the specified rights; otherwise, false.

The current user must have EnumeratePermissions rights to check the permissions of other users.

Community Additions

ADD
Show:
© 2015 Microsoft