共用方式為


SPWebPartManager.IsAuthorized method (Type, String, String, Boolean)

表示控制項是否獲得授權加入至頁面。

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Overrides Function IsAuthorized ( _
    type As Type, _
    path As String, _
    authorizationFilter As String, _
    isShared As Boolean _
) As Boolean
'用途
Dim instance As SPWebPartManager
Dim type As Type
Dim path As String
Dim authorizationFilter As String
Dim isShared As Boolean
Dim returnValue As Boolean

returnValue = instance.IsAuthorized(type, _
    path, authorizationFilter, isShared)
public override bool IsAuthorized(
    Type type,
    string path,
    string authorizationFilter,
    bool isShared
)

參數

  • type
    Type: System.Type

    正在檢查授權的控制項型別。

  • path
    Type: System.String

    授權,如果控制項是UserControl之控制項的原始程式檔的相對應用程式路徑。

  • isShared
    Type: System.Boolean

    true如果正在進行授權檢查的控制項是共用的控制項 ;否則, false。

傳回值

Type: System.Boolean
布林值,指出控制項是否獲得授權加入至頁面。

Exceptions

Exception Condition
ArgumentNullException

type是a null reference (Nothing in Visual Basic)。

備註

這個覆寫永遠會傳回true。

請參閱

參照

SPWebPartManager class

SPWebPartManager members

IsAuthorized overload

Microsoft.SharePoint.WebPartPages namespace