• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class MenuPermissionAttribute

Inheritance
System.Object
AuthorizeAttributeBase
MenuPermissionAttribute
Implements
IOverrideDefaultAuthLevel
Inherited Members
AuthorizeAttributeBase.IsAnonymousAttributePresent(HttpActionContext)
AuthorizeAttributeBase.OnAuthorization(HttpActionContext)
AuthorizeAttributeBase.SkipAuthorization(HttpActionContext)
Namespace: Dnn.PersonaBar.Library.Attributes
Assembly: Dnn.PersonaBar.Library.dll
Syntax
public class MenuPermissionAttribute : AuthorizeAttributeBase, IOverrideDefaultAuthLevel

Properties

| Improve this Doc View Source

Exclude

Gets or sets the Roles which need exclude from permissions, when user in the role will receive 401 exception. If need set multiple roles, put semicolon(;) between role names.

Declaration
public string Exclude { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

MenuName

Gets or sets the menu identifier which decide the api whether can requested. For example, if this value set to "Pages", the user who have access to pages module can request api. Users who don't have permissions to Pages module, will not available to request the api.

Declaration
public string MenuName { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Scope

Gets or sets the default service scope when MenuName is not defined.

Declaration
public ServiceScope Scope { get; set; }
Property Value
Type Description
ServiceScope

Methods

| Improve this Doc View Source

IsAuthorized(AuthFilterContext)

Tests if the request passes the authorization requirements.

Declaration
public override bool IsAuthorized(AuthFilterContext context)
Parameters
Type Name Description
AuthFilterContext context

The auth filter context.

Returns
Type Description
System.Boolean

True when authorization is succesful.

Overrides
AuthorizeAttributeBase.IsAuthorized(AuthFilterContext)

Implements

IOverrideDefaultAuthLevel

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS