Class AuthorizePermissionAttribute
When added to an MVC controller this action filter checks permissions to functions
Inheritance
System.Object
AuthorizePermissionAttribute
Implements
System.Web.Mvc.IAuthorizationFilter
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class AuthorizePermissionAttribute : ActionFilterAttribute, IAuthorizationFilter
Constructors
AuthorizePermissionAttribute()
Creates a AuthorizePermissionAttribute attribute.
Declaration
public AuthorizePermissionAttribute()
AuthorizePermissionAttribute(String, String)
Creates a AuthorizePermissionAttribute attribute.
Declaration
public AuthorizePermissionAttribute(string groupName, string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | groupName | |
System.String | name |
Properties
Permission
The permission to check for
Declaration
public PermissionType Permission { get; set; }
Property Value
Type | Description |
---|---|
PermissionType |
Methods
OnAuthorization(AuthorizationContext)
Authorizes the request and sets the result to System.Web.Mvc.HttpUnauthorizedResult if the user doesn't have the required permission
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