REST API routing permissions
- Author
- Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL 2 or later
- Since
- Stud.IP 2.6
Checks if access to consumer is allowed for the current user.
- Parameters
-
String | $consumer_id | Id of the consumer |
- Returns
- bool Indicates whether access is allowed
static get |
( |
|
$user_id = null | ) |
|
|
static |
Create a permission object (for a certain user). Permissions object will be cached for each user.
- Parameters
-
mixed | $user_id | Id of user (optional, defaults to global) |
- Returns
- UserPermissions Returns permissions object
Get a list of all consumer the user has granted acces to.
- Returns
- array List of consumer objects
Loads permissions for passed user.
- Returns
- UserPermissions Returns instance of self to allow chaining
set |
( |
|
$user_id, |
|
|
|
$granted = true |
|
) |
| |
Defines whether access is allowed for the current user to the passed route via the passed method.
- Parameters
-
String | $user_id | Id of the user |
mixed | $granted | Granted state (PHP'ish boolean) |
- Returns
- UserPermissions Returns instance of self to allow chaining
Stores the set permissions.
- Returns
- bool Returns true if permissions were stored successfully
The documentation for this class was generated from the following file: