SPSecurableObject.CheckPermissions 方法

Determines whether the current user has a specified set of permissions.

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Overridable Sub CheckPermissions ( _
    permissionMask As SPBasePermissions _
)
用法
Dim instance As SPSecurableObject
Dim permissionMask As SPBasePermissions

instance.CheckPermissions(permissionMask)
public virtual void CheckPermissions(
    SPBasePermissions permissionMask
)

参数

实现

ISecurableObject.CheckPermissions(SPBasePermissions)

异常

异常 条件
UnauthorizedAccessException

The current user does not have the specified permissions.

备注

This method calls the DoesUserHavePermissions method with permissionMask and throws the exception if DoesUserHavePermissions returns false.

另请参阅

引用

SPSecurableObject 类

SPSecurableObject 成员

Microsoft.SharePoint 命名空间

DoesUserHavePermissions(SPBasePermissions)