SPList.DoesUserHavePermissionsForUI method (SPBasePermissions, Boolean)
Checks the permissions for a given set of rights, as they should be displayed in the UI, and returns a Boolean. Optionally checks for permissions on a folder. This will only differ from DoesUserHavePermissions if ReadOnlyUI is set to true, and will always be as or more restrictive than DoesUserHavePermissions.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Function DoesUserHavePermissionsForUI ( _
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.DoesUserHavePermissionsForUI(permissionMask, _
checkFolder)
public bool DoesUserHavePermissionsForUI(
SPBasePermissions permissionMask,
bool checkFolder
)
Parameters
permissionMask
Type: Microsoft.SharePoint.SPBasePermissionsAn SPBasePermissions value that specifies permissions for the list.
checkFolder
Type: System.Booleantrue to check permissions against the current folder within the list; otherwise, false.
Return value
Type: System.Boolean
true if permissions succeeded; otherwise, false.