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

SPList.DoesUserHavePermissions method (SPBasePermissions, Boolean)

Indicates whether the current user has a specified set of permissions on the list and optionally checks permissions on the current folder.

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

public bool DoesUserHavePermissions(
	SPBasePermissions permissionMask,
	bool checkFolder
)

Parameters

permissionMask
Type: Microsoft.SharePoint.SPBasePermissions

A bitwise combination of enumeration values that specifies permissions for the list.

checkFolder
Type: System.Boolean

true to check permissions against the current folder, either the list root folder or a folder within the list; otherwise, false.

Return value

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

ExceptionCondition
UnauthorizedAccessException

The current user does not have the EnumeratePermissions right.

Show:
© 2015 Microsoft