SPWebPartManager.IsAuthorized 方法 (Type, String, String, Boolean)
指示控件是否有权添加到页面。
命名空间: Microsoft.SharePoint.WebPartPages
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
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
类型:System.Type正在对其授权检查控件的类型。
path
类型:System.String如果控件是UserControl被授权的控件的源文件相对的应用程序的路径。
authorizationFilter
类型:System.String分配给AuthorizationFilter属性用来授权是否控件可以向页面添加控件的WebPart控件的任意字符串值。
isShared
类型:System.Booleantrue如果正在对其授权检查的控件共享的控制权 ;否则为false。
返回值
类型:System.Boolean
一个布尔值,该值指示是否被授权控件添加到页面。
异常
异常 | 条件 |
---|---|
ArgumentNullException | type是空引用(无 在 Visual Basic 中)。 |
备注
此重写始终返回true。