Class AuthorizePermissionAttribute
When added to an MVC controller this action filter checks permissions to functions
Inheritance
System.Object
AuthorizePermissionAttribute
Implements
Microsoft.AspNetCore.Mvc.Filters.IAuthorizationFilter
Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.Cms.AspNetCore.Mvc.dll
Version: 12.0.3Syntax
public class AuthorizePermissionAttribute : ActionFilterAttribute, IAuthorizationFilter, IFilterMetadata
Constructors
AuthorizePermissionAttribute()
Creates a Authorize
Declaration
public AuthorizePermissionAttribute()
AuthorizePermissionAttribute(String, String)
Creates a Authorize
Declaration
public AuthorizePermissionAttribute(string groupName, string name)
Parameters
Type | Name | Description |
---|---|---|
System. |
groupName | |
System. |
name |
Properties
Permission
The permission to check for
Declaration
public PermissionType Permission { get; set; }
Property Value
Type | Description |
---|---|
Permission |
Methods
OnAuthorization(AuthorizationFilterContext)
Authorizes the request and sets the result to Microsoft.
Declaration
public void OnAuthorization(AuthorizationFilterContext filterContext)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
filterContext | The filter context to set results to. |
Implements
Microsoft.AspNetCore.Mvc.Filters.IAuthorizationFilter
Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata