SPListItem.DoesUserHavePermissions Method (SPUser, SPBasePermissions)

Indicates whether the specified user has the specified permissions on an item.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Function DoesUserHavePermissions ( _
    user As SPUser, _
    permissionMask As SPBasePermissions _
) As Boolean
'Usage
Dim instance As SPListItem
Dim user As SPUser
Dim permissionMask As SPBasePermissions
Dim returnValue As Boolean

returnValue = instance.DoesUserHavePermissions(user, _
    permissionMask)
public bool DoesUserHavePermissions(
    SPUser user,
    SPBasePermissions permissionMask
)

Parameters

Return Value

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

See Also

Reference

SPListItem Class

SPListItem Members

DoesUserHavePermissions Overload

Microsoft.SharePoint Namespace