C# Class Adf.Core.Authorization.AuthorizationManager

Represents manager for authorization activities. Provides methods to login, logout etc.
Datei anzeigen Open project: NLADP/ADF

Private Properties

Property Type Description

Public Methods

Method Description
IsAllowed ( IAction action ) : bool

Checks whether the current user is allowed to performs the specified action.

IsAllowed ( string subject, IAction action ) : bool

Checks whether the current user is allowed to performs the specified action.

IsInRole ( string role ) : bool

Checks whether the current user belongs to the specified role.

Login ( string name, string password ) : LoginResult

Used for login.

Logout ( ) : void

Logs out the current user.

Method Details

IsAllowed() public static method

Checks whether the current user is allowed to performs the specified action.
public static IsAllowed ( IAction action ) : bool
action IAction Any action that implements IAction (such as ApplicationTask).
return bool

IsAllowed() public static method

Checks whether the current user is allowed to performs the specified action.
public static IsAllowed ( string subject, IAction action ) : bool
subject string
action IAction Any action that implements IAction (such as ApplicationTask).
return bool

IsInRole() public static method

Checks whether the current user belongs to the specified role.
public static IsInRole ( string role ) : bool
role string Role name to check for.
return bool

Login() public static method

Used for login.
public static Login ( string name, string password ) : LoginResult
name string The user name.
password string The Password (if required).
return LoginResult

Logout() public static method

Logs out the current user.
public static Logout ( ) : void
return void