SPList.DoesUserHavePermissionsForUI method (SPBasePermissions, Boolean)

SharePoint 2013

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)

public bool DoesUserHavePermissionsForUI(
	SPBasePermissions permissionMask,
	bool checkFolder


Type: Microsoft.SharePoint.SPBasePermissions

An SPBasePermissions value that specifies permissions for the list.

Type: System.Boolean

true to check permissions against the current folder within the list; otherwise, false.

Return value

Type: System.Boolean
true if permissions succeeded; otherwise, false.