Compartilhar via


SPSite.CheckForPermissions Method

Checks the permissions for a given set of rights and throws an Unauthorized Access exception if the permission check fails.

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

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedSPType)> _
Public Sub CheckForPermissions ( _
    acl As SPReusableAcl, _
    permissionMask As SPBasePermissions _
)
'Usage
Dim instance As SPSite
Dim acl As SPReusableAcl
Dim permissionMask As SPBasePermissions

instance.CheckForPermissions(acl, permissionMask)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedSPType)]
public void CheckForPermissions(
    SPReusableAcl acl,
    SPBasePermissions permissionMask
)

Parameters

See Also

Reference

SPSite Class

SPSite Members

Microsoft.SharePoint Namespace