C# Class WebUI.Filters.PermissionAuthorizationAttribute

Inheritance: System.Web.Http.AuthorizeAttribute
Datei anzeigen Open project: kulish-alina/HR_Project

Protected Methods

Method Description
IsAuthorized ( System.Web.Http.Controllers.HttpActionContext actionContext ) : bool

Main action to check if user has authorities to acesss

Private Methods

Method Description
hasClaim ( IEnumerable claims ) : bool

Checks on users permission on access to action

hasFlag ( string value, AccessRight permission ) : bool

Checking on if user has in its claims the specific one neeeded

isTypeCorrect ( string type ) : bool

The function that checks on corresponding claim type

Method Details

IsAuthorized() protected method

Main action to check if user has authorities to acesss
protected IsAuthorized ( System.Web.Http.Controllers.HttpActionContext actionContext ) : bool
actionContext System.Web.Http.Controllers.HttpActionContext Context of user trying to access resouce
return bool