Class MenuPermissionAttribute
Implements
Inherited Members
Namespace: Dnn.PersonaBar.Library.Attributes
Assembly: Dnn.PersonaBar.Library.dll
Syntax
public class MenuPermissionAttribute : AuthorizeAttributeBase, IOverrideDefaultAuthLevel
Properties
| Improve this Doc View SourceExclude
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 |
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 |
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 SourceIsAuthorized(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. |