Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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)
'Declaration
Public Function DoesUserHavePermissions ( _
permissionMask As SPBasePermissions, _
checkFolder As Boolean _
) As Boolean
'Usage
Dim instance As SPList
Dim permissionMask As SPBasePermissions
Dim checkFolder As Boolean
Dim returnValue As Boolean
returnValue = instance.DoesUserHavePermissions(permissionMask, _
checkFolder)
public bool DoesUserHavePermissions(
SPBasePermissions permissionMask,
bool checkFolder
)
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.
Type: System.Boolean
true if the user has the specified permissions; otherwise, false.
Exception | Condition |
---|---|
UnauthorizedAccessException | The current user does not have the EnumeratePermissions right. |
Please sign in to use this experience.
Sign in