SPList.DoesUserHavePermissions - Méthode (SPBasePermissions, Boolean)
Indicates whether the current user has a specified set of permissions on the list and optionally checks permissions on the current folder.
Espace de noms : Microsoft.SharePoint
Assembly : Microsoft.SharePoint (dans Microsoft.SharePoint.dll)
Syntaxe
'Déclaration
Public Function DoesUserHavePermissions ( _
permissionMask As SPBasePermissions, _
checkFolder As Boolean _
) As Boolean
'Utilisation
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
)
Paramètres
permissionMask
Type : Microsoft.SharePoint.SPBasePermissionsA bitwise combination of enumeration values that specifies permissions for the list.
checkFolder
Type : System.Booleantrue to check permissions against the current folder, either the list root folder or a folder within the list; otherwise, false.
Valeur renvoyée
Type : System.Boolean
true if the user has the specified permissions; otherwise, false.
Exceptions
Exception | Condition |
---|---|
UnauthorizedAccessException | The current user does not have the EnumeratePermissions right. |