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

Indicates whether a control is authorized to be added to a page.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Overrides Function IsAuthorized ( _
    type As Type, _
    path As String, _
    authorizationFilter As String, _
    isShared As Boolean _
) As Boolean
'Usage
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
)

Parameters

  • type
    Type: System.Type

    The type of a control being checked for authorization.

  • path
    Type: System.String

    The relative application path of the source file for the control being authorized, if the control is a UserControl.

  • authorizationFilter
    Type: System.String

    An arbitrary string value assigned to the AuthorizationFilter property of a WebPart control, used to authorize whether a control can be added control to a page.

  • isShared
    Type: System.Boolean

    true if the control being checked for authorization is a shared control; otherwise, false.

Return Value

Type: System.Boolean
A Boolean value that indicates whether a control is authorized to be added to a page.

Exceptions

Exception Condition
ArgumentNullException

type is a null reference (Nothing in Visual Basic).

Remarks

This override always returns true.

See Also

Reference

SPWebPartManager Class

SPWebPartManager Members

IsAuthorized Overload

Microsoft.SharePoint.WebPartPages Namespace