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之控制項的原始程式檔的相對應用程式路徑。
authorizationFilter
Type: System.String任意的字串值,指派給WebPart控制項,用來授權是否控制項可以控制項加入至頁面的 [ AuthorizationFilter ] 屬性。
isShared
Type: System.Booleantrue如果正在進行授權檢查的控制項是共用的控制項 ;否則, false。
傳回值
Type: System.Boolean
布林值,指出控制項是否獲得授權加入至頁面。
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | type是a null reference (Nothing in Visual Basic)。 |
備註
這個覆寫永遠會傳回true。