![]() |
Jeff PHP framework
0.99
Modular, extensible, OOP, MVC, lightweight php framework designed to ease the programmers in the development of web applications.
|
Class used to check the user privileges. More...
Static Public Member Functions | |
static | check ($class=null, $pids=null, $opts=null) |
Checks if the user has the right privileges to acess the requested content. | |
static | hasGroup ($group_ids) |
Checks if the user belongs to at least one of the given groups. |
Class used to check the user privileges.
Provides methods to check if the user may access the desired content.
Jeff privileges are defined by a 'class' and an 'identifier'. So each class may use as many privileges as needed, each one with a different identifier. All the available privileges are stores in the database table sys_privileges. Since in many cases it's enough to deal with generic privileges Jeff has some default and reserved privileges classes and identifiers, which may be checked using the following class parameters and null as $pids.
Definition at line 46 of file access.class.php.
static access::check | ( | $ | class = null , |
$ | pids = null , |
||
$ | opts = null |
||
) | [static] |
Checks if the user has the right privileges to acess the requested content.
string | $class | the privilege class (a standard identifier or a real class) |
mixed | $pids | the privilege identifier for the given class |
mixed | $opts | associative array of options:
|
Definition at line 58 of file access.class.php.
static access::hasGroup | ( | $ | group_ids | ) | [static] |
Checks if the user belongs to at least one of the given groups.
array | $group_ids | array containing all the identifiers of the groups to check. |
Definition at line 116 of file access.class.php.