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
)
参数
permissionMask
类型:Microsoft.SharePoint.SPBasePermissionsA bitwise combination of enumeration values that specifies a set of permissions.
实现
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.