RightsSensitiveVisibilityHelper.UserHasRights method (PermissionContext, SPBasePermissions, PermissionMode, SPList)
傳回布林值,指出目前的使用者是否具有指定的SPList物件的權限。
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function UserHasRights ( _
permissionContext As PermissionContext, _
permissions As SPBasePermissions, _
permissionMode As PermissionMode, _
contextList As SPList _
) As Boolean
'用途
Dim permissionContext As PermissionContext
Dim permissions As SPBasePermissions
Dim permissionMode As PermissionMode
Dim contextList As SPList
Dim returnValue As Boolean
returnValue = RightsSensitiveVisibilityHelper.UserHasRights(permissionContext, _
permissions, permissionMode, contextList)
public static bool UserHasRights(
PermissionContext permissionContext,
SPBasePermissions permissions,
PermissionMode permissionMode,
SPList contextList
)
參數
permissionContext
Type: Microsoft.SharePoint.Utilities.PermissionContext指示要套用的權限遮罩的內容物件的值。
permissions
Type: Microsoft.SharePoint.SPBasePermissions指定內建的使用權限用於的SPBasePermissions值
permissionMode
Type: Microsoft.SharePoint.Utilities.PermissionModePermissionMode值,指定使用者是否必須擁有所有指定的權限的權限遮罩中要檢視連結,或其中一個指定的權限遮罩中的權限。
contextList
Type: Microsoft.SharePoint.SPList要評估的SPList物件。
傳回值
Type: System.Boolean
true如果目前的使用者具有權限的物件;否則, false。
請參閱
參照
RightsSensitiveVisibilityHelper class