Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class VisitorGroupImpersonationAttribute

When added to an MVC controller this action filter will setup impersonation of visitor group required to view a page as a custom visitor group.

Inheritance
System.Object
VisitorGroupImpersonationAttribute
Implements
Microsoft.AspNetCore.Mvc.Filters.IPageFilter
Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.Cms.AspNetCore.Mvc.dll
Version: 12.0.3
Syntax
public class VisitorGroupImpersonationAttribute : ActionFilterAttribute, IPageFilter, IFilterMetadata

Constructors

VisitorGroupImpersonationAttribute()

Declaration
public VisitorGroupImpersonationAttribute()

Methods

OnActionExecuting(ActionExecutingContext)

Called before the controller action is executed.

Declaration
public override void OnActionExecuting(ActionExecutingContext filterContext)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext filterContext

The filter context.

OnPageHandlerExecuted(PageHandlerExecutedContext)

Declaration
public void OnPageHandlerExecuted(PageHandlerExecutedContext context)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext context

OnPageHandlerExecuting(PageHandlerExecutingContext)

Declaration
public void OnPageHandlerExecuting(PageHandlerExecutingContext context)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext context

OnPageHandlerSelected(PageHandlerSelectedContext)

Declaration
public void OnPageHandlerSelected(PageHandlerSelectedContext context)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext context

Implements

Microsoft.AspNetCore.Mvc.Filters.IPageFilter
Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata

Extension Methods