Jelix 1.8.8

dbAcl2Driver
in package
implements jIAcl2Driver2

driver for jAcl2 based on a database.

Tags
subpackage

jacl2db_driver

Interfaces, Classes and Traits

jIAcl2Driver2
interface for jAcl2 drivers.

Table of Contents

$acl  : mixed
$aclres  : mixed
$anonacl  : mixed
$anonaclres  : mixed
__construct()  : mixed
clearCache()  : mixed
clear right cache.
getRight()  : bool
return the value of the right on the given subject (and on the optional resource).
getRightByUser()  : bool
return the value of the right on the given subject for the given user (and on the optional resource).
getAnonymousRight()  : mixed

Properties

$acl

protected static mixed $acl = array()
Tags

$aclres

protected static mixed $aclres = array()
Tags

$anonacl

protected static mixed $anonacl
Tags

$anonaclres

protected static mixed $anonaclres = array()
Tags

Methods

__construct()

public __construct() : mixed
Tags
Return values
mixed

clearCache()

clear right cache.

public clearCache() : mixed
Tags
Return values
mixed

getRight()

return the value of the right on the given subject (and on the optional resource).

public getRight(string $subject[, string $resource = '-' ]) : bool

The resource "-" (meaning 'all resources') has the priority over specific resources. It means that if you give a specific resource, it will be ignored if there is a positive right with "-". The right on the given resource will be checked if there is no rights for "-".

Parameters
$subject : string

the key of the subject

$resource : string = '-'

the id of a resource

Tags
Return values
bool

true if the user has the right on the given subject

getRightByUser()

return the value of the right on the given subject for the given user (and on the optional resource).

public getRightByUser(mixed $login, string $subject[, string $resource = '-' ]) : bool

The resource "-" (meaning 'all resources') has the priority over specific resources. It means that if you give a specific resource, it will be ignored if there is a positive right with "-". The right on the given resource will be checked if there is no rights for "-".

Parameters
$login : mixed
$subject : string

the key of the subject

$resource : string = '-'

the id of a resource

Tags
Return values
bool

true if the user has the right on the given subject

getAnonymousRight()

protected getAnonymousRight(mixed $subject[, mixed $resource = '-' ]) : mixed
Parameters
$subject : mixed
$resource : mixed = '-'
Tags
Return values
mixed

Search results