SPList.CheckPermissions - Méthode
Checks whether the current user has the specified set of permissions for the list and throws an exception if the user does not have them.
Espace de noms : Microsoft.SharePoint
Assembly : Microsoft.SharePoint (dans Microsoft.SharePoint.dll)
Syntaxe
'Déclaration
Public Overrides Sub CheckPermissions ( _
permissionMask As SPBasePermissions _
)
'Utilisation
Dim instance As SPList
Dim permissionMask As SPBasePermissions
instance.CheckPermissions(permissionMask)
public override void CheckPermissions(
SPBasePermissions permissionMask
)
Paramètres
permissionMask
Type : Microsoft.SharePoint.SPBasePermissionsAn enumeration value that specifies a set of permissions.
Implémentations
ISecurableObject.CheckPermissions(SPBasePermissions)
Exceptions
Exception | Condition |
---|---|
UnauthorizedAccessException | The current user does not have the specified permissions. |
Remarques
This method calls the base class CheckPermissions(SPBasePermissions) method to check the permissions.
You can catch the exception and redirect the user to /_layouts/AccessDenied.aspx.