Class AuthorizeContentAttribute
When added to an MVC controller this action filter checks authorization for a previously routed node available through the request context.
Inheritance
Implements
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.Cms.AspNetCore.Mvc.dll
Version: 12.0.3Syntax
public class AuthorizeContentAttribute : ActionFilterAttribute, IAuthorizationFilter, IFilterMetadata
Remarks
Authorization is part of routing to content, this attribute is only for controllers when the default routing is not being used and authorization have to be applied on the controller.
Constructors
AuthorizeContentAttribute()
Creates a Authorize
Declaration
public AuthorizeContentAttribute()
Properties
DisableAccessCheck
Gets or sets a value indicating whether [disable access check] for an action.
Declaration
public bool DisableAccessCheck { get; set; }
Property Value
Type | Description |
---|---|
System. |
RequiredLevel
The required access level to execute this controller or action.
Declaration
public AccessLevel RequiredLevel { get; set; }
Property Value
Type | Description |
---|---|
Access |
Methods
OnActionExecuting(ActionExecutingContext)
Called by the ASP.NET MVC framework before the action method executes.
Declaration
public override void OnActionExecuting(ActionExecutingContext context)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
context | The filter context. |
OnAuthorization(AuthorizationFilterContext)
Authorizes the request and sets the result to Microsoft.
Declaration
public void OnAuthorization(AuthorizationFilterContext context)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
context | The filter context to set results to. |