CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Web.Mvc.HasPermissionAttribute Class Reference

Restricts callers to an action method. More...

Inheritance diagram for Csla.Web.Mvc.HasPermissionAttribute:

Public Member Functions

 HasPermissionAttribute (AuthorizationActions action, Type objectType)
 Creates an instance of the type. More...
 
 HasPermissionAttribute (AuthorizationActions action, Type objectType, string message)
 Creates an instance of the type. More...
 

Protected Member Functions

override bool AuthorizeCore (HttpContextBase httpContext)
 Determines whether access to the core framework is authorized. More...
 
override void HandleUnauthorizedRequest (System.Web.Mvc.AuthorizationContext filterContext)
 Processes HTTP requests that fail authorization and handles AJAX requests appropriately. More...
 

Detailed Description

Restricts callers to an action method.

Definition at line 20 of file Csla.Web.Mvc.Shared/HasPermissionAttribute.cs.

Constructor & Destructor Documentation

◆ HasPermissionAttribute() [1/2]

Csla.Web.Mvc.HasPermissionAttribute.HasPermissionAttribute ( AuthorizationActions  action,
Type  objectType 
)

Creates an instance of the type.

Parameters
actionAuthorizationActions for which the authorization is required.
objectTypeCSLA object type for which the action is applied.

Definition at line 32 of file Csla.Web.Mvc.Shared/HasPermissionAttribute.cs.

◆ HasPermissionAttribute() [2/2]

Csla.Web.Mvc.HasPermissionAttribute.HasPermissionAttribute ( AuthorizationActions  action,
Type  objectType,
string  message 
)

Creates an instance of the type.

Parameters
actionAuthorizationActions for which the authorization is required.
objectTypeCSLA object type for which the action is applied.
messageError message for resutl.

Definition at line 44 of file Csla.Web.Mvc.Shared/HasPermissionAttribute.cs.

Member Function Documentation

◆ AuthorizeCore()

override bool Csla.Web.Mvc.HasPermissionAttribute.AuthorizeCore ( HttpContextBase  httpContext)
protected

Determines whether access to the core framework is authorized.

Parameters
httpContextThe HTTP context.
Returns
True if access is authorized; otherwise, false.

Definition at line 55 of file Csla.Web.Mvc.Shared/HasPermissionAttribute.cs.

◆ HandleUnauthorizedRequest()

override void Csla.Web.Mvc.HasPermissionAttribute.HandleUnauthorizedRequest ( System.Web.Mvc.AuthorizationContext  filterContext)
protected

Processes HTTP requests that fail authorization and handles AJAX requests appropriately.

Parameters
filterContextThe filterContext object contains the controller, HTTP context, request context, action result, and route data.

Definition at line 68 of file Csla.Web.Mvc.Shared/HasPermissionAttribute.cs.