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)
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
user
Type: Microsoft.SharePoint.SPUserAn SPUser object that represents information about the user.
permissionMask
Type: Microsoft.SharePoint.SPBasePermissionsAn SPBasePermissions value that specifies permissions for the item.
Return value
Type: System.Boolean
true if the user has the permissions; otherwise, false.