AUTHORIZE
in package
AUTHORIZE
Logging on and system authorisation class.
Table of Contents
Methods
- __construct() : mixed
- AUTHORIZE
- gatekeep() : bool
- gatekeeper to the system.
- initLogon() : mixed
- Display the empty form for logging on
- isPluginExecutionAuthorised() : bool
- isPluginExecutionAuthorised
- logonCheck() : mixed
- Initial logon to the system.
Methods
__construct()
AUTHORIZE
public
__construct() : mixed
gatekeep()
gatekeeper to the system.
public
gatekeep() : bool
Order is of checking is important!
Return values
boolinitLogon()
Display the empty form for logging on
public
initLogon([string $message = false ]) : mixed
Parameters
- $message : string = false
-
Default is FALSE
isPluginExecutionAuthorised()
isPluginExecutionAuthorised
public
isPluginExecutionAuthorised([int $pluginAuthLevelRequested = 0 ][, bool $promptForLogin = true ]) : bool
Check if the level of auth matchs the level requested by the calling plugin. If $promptForLogin is TRUE, displays the login page instead of returning FALSE, when the plugin is not authorised
Parameters
- $pluginAuthLevelRequested : int = 0
-
Default is 0. Auth level: unknown => always unauthorised, menu item not displayed 0 => menu item displayed for all users (logged or not) 1 => menu item displayed for users logged (with write access) 2 => menu item displayed only for logged admins 3 => menu item displayed only for superAdmin
- $promptForLogin : bool = true
-
Default is TRUE.
Return values
boollogonCheck()
Initial logon to the system.
public
logonCheck(string $username, string $password) : mixed
Public for use with API. If cleared, user environment is set and embargoed resources checked for clearance, otherwise, user is presented with logon prompt again
Parameters
- $username : string
- $password : string