Jelix 1.7.18

jAcl2
in package

Main class to query the acl system, and to know value of a right.

you should call this class (all method are static) when you want to know if the current user have a right

Tags
subpackage

acl

static

Table of Contents

$driver  : null|jIAcl2Driver|jIAcl2Driver2
check()  : bool
call this method to know if the current user has the right with the given value.
checkByUser()  : bool
call this method to know if the given user has the right with the given value.
clearCache()  : mixed
clear right cache.
unloadDriver()  : mixed
for tests.
_getDriver()  : jIAcl2Driver|jIAcl2Driver2
load the acl2 driver.

Properties

Methods

check()

call this method to know if the current user has the right with the given value.

public static check(string $right[, string $resource = null ]) : bool
Parameters
$right : string

the key of the right to check

$resource : string = null

the id of a resource

Return values
bool

true if yes

checkByUser()

call this method to know if the given user has the right with the given value.

public static checkByUser(string $login, string $subject[, string $resource = null ]) : bool
Parameters
$login : string

the user login. Can be empty/null if anonymous

$subject : string

the key of the subject to check

$resource : string = null

the id of a resource

Tags
since
1.6.29
Return values
bool

true if yes

clearCache()

clear right cache.

public static clearCache() : mixed
Tags
since
1.0b2
Return values
mixed

unloadDriver()

for tests.

public static unloadDriver() : mixed

..

Return values
mixed

Search results