An attribute which allows specifying Persona Bar permissions on a Web API controller class or action method.
Inheritance
MenuPermissionAttribute
Assembly: Dnn.PersonaBar.Library.dll
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public class MenuPermissionAttribute : AuthorizeAttributeBase, IOverrideDefaultAuthLevel
Constructors
Declaration
public MenuPermissionAttribute()
Properties
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
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
Gets or sets the default service scope when MenuName is not defined.
Declaration
public ServiceScope Scope { get; set; }
Property Value
Methods
Declaration
public override bool IsAuthorized(AuthFilterContext context)
Parameters
Returns
Implements
Extension Methods