共用方式為


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
)

參數

傳回值

Type: System.Boolean
true如果目前的使用者具有權限的物件;否則, false。

請參閱

參照

RightsSensitiveVisibilityHelper class

RightsSensitiveVisibilityHelper members

UserHasRights overload

Microsoft.SharePoint.Utilities namespace