import AuthorizationManager from 'devapt-core-server/js/security/authorization_manager.js'
AuthorizationManager
Extends:
Authorization class to manage authorization plugins.
Constructor Summary
Public Constructor | ||
public |
constructor(arg_runtime: RuntimeBase, arg_log_context: string | undefined, arg_logger_manager: LoggerManager): nothing Create an Authorization manager class. |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
Chech permission authorization of a user. |
|
public |
error_bad_plugin(arg_plugin_mode: string): nothing Error wrapper - error during plugin loading. |
|
public |
Load security settings |
|
public |
load_plugin(arg_settings: object): boolean Load security plugin from settings. |
Inherited Summary
From class PluginsManager | ||
public |
|
|
public |
|
|
public |
|
|
private |
_runtime: * |
|
public |
enabled_plugin(arg_name: string): Plugin Get a enabled plugin by its name. |
|
public |
error_already_registered(arg_plugin_name: string): nothing Error wrapper - on registering an already registered plugin |
|
public |
error_not_registered(arg_plugin_name: string): nothing Error wrapper - a plugin is not registered |
|
public |
Get class name. |
|
public |
get_plugins(): array Get registered plugins list. |
|
public |
get_runtime(): * |
|
public |
get_typed_plugins(arg_type_or_types: string | array): array Get registered plugins list with a filtered type. |
|
public |
load(arg_plugins: array): nothing Load a map of plugins. |
|
public |
load_at_first(arg_plugin: Plugin): nothing Load plugin at first position |
|
public |
Get a registered plugin by its name and its enabled flag. |
|
public |
register_plugin(arg_plugin: object, arg_position: integer): object Register a plugin to be used later, do not active it now. |
|
public |
registered_plugin(arg_name: string): Plugin Get a registered plugin by its name. |
|
public |
unregister_plugin(arg_plugin: object): object Unregister a registered plugin and disble it before if needed. |
Public Constructors
public constructor(arg_runtime: RuntimeBase, arg_log_context: string | undefined, arg_logger_manager: LoggerManager): nothing source
Create an Authorization manager class.
Override:
PluginsManager#constructorReturn:
nothing |
Public Members
public authorization_mode: * source
Public Methods
public authorize(arg_permission: object, arg_credentials: Credentials): object source
Chech permission authorization of a user.
Params:
Name | Type | Attribute | Description |
arg_permission | object | permission plain object. |
|
arg_credentials | Credentials | user credentials plain object. |
public error_bad_plugin(arg_plugin_mode: string): nothing source
Error wrapper - error during plugin loading.
Params:
Name | Type | Attribute | Description |
arg_plugin_mode | string | plugin mode |
Return:
nothing |
public load(arg_settings: object): nothing source
Load security settings
Override:
PluginsManager#loadParams:
Name | Type | Attribute | Description |
arg_settings | object | authorization settings (Immutable object) |
Return:
nothing |