Class AuthorizeContentAttribute

When added to an MVC controller this action filter checks authorization for a previously routed node available through the request context.

Inheritance
System.Object
AuthorizeContentAttribute
Implements
System.Web.Mvc.IAuthorizationFilter
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public class AuthorizeContentAttribute : ActionFilterAttribute, IAuthorizationFilter

Constructors

AuthorizeContentAttribute()

Creates a AuthorizeContentAttribute attribute.

Declaration
public AuthorizeContentAttribute()

Properties

ContentLoader

Gets or sets the content loader.

Declaration
public IContentLoader ContentLoader { get; set; }
Property Value
Type Description
IContentLoader

The content loader.

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.Boolean

LanguageSelectorFactory

Gets or sets the language selector factory.

Declaration
[Obsolete("Not used any more")]
public LanguageSelectorFactory LanguageSelectorFactory { get; set; }
Property Value
Type Description
LanguageSelectorFactory

RequiredLevel

The required access level to execute this controller or action.

Declaration
public AccessLevel RequiredLevel { get; set; }
Property Value
Type Description
AccessLevel

Methods

OnActionExecuting(ActionExecutingContext)

Called by the ASP.NET MVC framework before the action method executes.

Declaration
public override void OnActionExecuting(ActionExecutingContext filterContext)
Parameters
Type Name Description
System.Web.Mvc.ActionExecutingContext filterContext

The filter context.

OnAuthorization(AuthorizationContext)

Authorizes the request and sets the result to System.Web.Mvc.HttpUnauthorizedResult if the user doesn't have the required access level.

Declaration
public void OnAuthorization(AuthorizationContext filterContext)
Parameters
Type Name Description
System.Web.Mvc.AuthorizationContext filterContext

The filter context to set results to.

Implements

System.Web.Mvc.IAuthorizationFilter

Extension Methods