VuFind API Documentation

PrimoPermissionHandler
in package
Uses AuthorizationServiceAwareTrait

Primo Permission Handler.

Tags
category

VuFind

author

Oliver Goldschmidt o.goldschmidt@tuhh.de

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Site

Table of Contents

$instCode  : string
Institution code applicable for the user
$primoConfig  : array<string|int, mixed>
Primo-Config for Institutions.
__construct()  : void
Constructor.
getInstCode()  : string|bool
Determine the institution code Returns false, if no institution can get set
hasPermission()  : bool
Check if the user has permission
instCodeExists()  : bool
Determine if a institution code is set in config file
setInstCode()  : void
Set the institution code (no autodetection)
autodetectCode()  : void
Autodetects the permissions by configuration file
checkConfig()  : void
Checks the config file section for validity
checkLegacySettings()  : void
Legacy settings support
checkPermission()  : bool
Checks, if a rule is granted
getDefaultCode()  : string|bool
Determine the default institution code Returns false, if no default code has been set
getDefaultOnCampusRule()  : string
Determine the default onCampus Rule
getInstCodes()  : array<string|int, mixed>
Gets all possible institution codes from config file
getOnCampusRule()  : string
Determine a onCampus Rule for a certain code

Properties

Methods

__construct()

Constructor.

public __construct(Config|array<string|int, mixed> $primoPermConfig) : void
Parameters
$primoPermConfig : Config|array<string|int, mixed>

Primo-Config for Institutions

Return values
void

getInstCode()

Determine the institution code Returns false, if no institution can get set

public getInstCode() : string|bool
Return values
string|bool

hasPermission()

Check if the user has permission

public hasPermission() : bool
Return values
bool

instCodeExists()

Determine if a institution code is set in config file

public instCodeExists(string $code) : bool
Parameters
$code : string

Code to approve against config file

Return values
bool

setInstCode()

Set the institution code (no autodetection)

public setInstCode(string $code) : void
Parameters
$code : string

Institutioncode

Return values
void

autodetectCode()

Autodetects the permissions by configuration file

protected autodetectCode() : void
Return values
void

checkConfig()

Checks the config file section for validity

protected checkConfig() : void
Return values
void

checkLegacySettings()

Legacy settings support

protected checkLegacySettings() : void
Return values
void

checkPermission()

Checks, if a rule is granted

protected checkPermission(string $code) : bool
Parameters
$code : string

Code to check the rule name for

Return values
bool

getDefaultCode()

Determine the default institution code Returns false, if no default code has been set

protected getDefaultCode() : string|bool
Return values
string|bool

getDefaultOnCampusRule()

Determine the default onCampus Rule

protected getDefaultOnCampusRule() : string
Return values
string

getInstCodes()

Gets all possible institution codes from config file

protected getInstCodes() : array<string|int, mixed>
Return values
array<string|int, mixed>

Array with valid Primo institution codes

getOnCampusRule()

Determine a onCampus Rule for a certain code

protected getOnCampusRule(string $code) : string
Parameters
$code : string

Code to determine the rule name for

Return values
string

Search results