|
| static | getAllRoles () |
| |
| static | saveRole ($role) |
| |
| static | deleteRole ($role) |
| |
| static | assignRole (User $user, $role, $institut_id='') |
| |
| static | getAssignedRoles ($user_id, $implicit=false) |
| |
| static | getAssignedRoleInstitutes ($user_id, $role_id) |
| |
| static | isAssignedRole ($userid, $assignedrole, $institut_id='') |
| |
| static | deleteRoleAssignment (User $user, $role, $institut_id=null) |
| |
| static | getAllRoleAssignments ($user=null) |
| |
| static | assignPluginRoles ($plugin_id, $role_ids) |
| |
| static | deleteAssignedPluginRoles ($plugin_id, $role_ids) |
| |
| static | getAssignedPluginRoles ($plugin_id) |
| |
| static | getStatistics () |
| |
| static | countImplicitUsers ($role_id) |
| |
◆ assignPluginRoles()
| static assignPluginRoles |
( |
|
$plugin_id, |
|
|
|
$role_ids |
|
) |
| |
|
static |
Enter description here...
- Parameters
-
| int | $pluginid | |
| array | $roleids | |
◆ assignRole()
| static assignRole |
( |
User |
$user, |
|
|
|
$role, |
|
|
|
$institut_id = '' |
|
) |
| |
|
static |
Saves a role assignment to the database
- Parameters
-
◆ countImplicitUsers()
| static countImplicitUsers |
( |
|
$role_id | ) |
|
|
static |
Counts the implicitely assigned users for a role.
- Parameters
-
| mixed | $role_id | Role id or array of role ids |
- Returns
- mixed number of implictit for the role (if one role id is given) or associative array [role id => number of implicit users] when given a list of role ids
◆ deleteAssignedPluginRoles()
| static deleteAssignedPluginRoles |
( |
|
$plugin_id, |
|
|
|
$role_ids |
|
) |
| |
|
static |
Removes the given roles' assignments from the given plugin.
- Parameters
-
| int | $pluginid | |
| array | $roleids | |
◆ deleteRole()
| static deleteRole |
( |
|
$role | ) |
|
|
static |
Delete role if not a permanent role. System roles cannot be deleted.
- Parameters
-
◆ deleteRoleAssignment()
| static deleteRoleAssignment |
( |
User |
$user, |
|
|
|
$role, |
|
|
|
$institut_id = null |
|
) |
| |
|
static |
Deletes a role assignment from the database
- Parameters
-
◆ getAllRoleAssignments()
| static getAllRoleAssignments |
( |
|
$user = null | ) |
|
|
static |
Get's all Role-Assignments for a certain user. If no user is set, all role assignments are returned.
- Parameters
-
- Returns
- array with roleids and the assigned userids
- Deprecated:
- seems to be unused (and was corrupt for some versions)
◆ getAllRoles()
Returns all available roles.
- Returns
- array Roles
◆ getAssignedPluginRoles()
| static getAssignedPluginRoles |
( |
|
$plugin_id | ) |
|
|
static |
Return all roles assigned to a plugin.
- Parameters
-
- Returns
- array
◆ getAssignedRoleInstitutes()
| static getAssignedRoleInstitutes |
( |
|
$user_id, |
|
|
|
$role_id |
|
) |
| |
|
static |
Returns institutes for which the given user has the given role.
- Parameters
-
| string | $user_id | User id |
| int | $role_id | Role id |
- Returns
- array of institute ids
◆ getAssignedRoles()
| static getAssignedRoles |
( |
|
$user_id, |
|
|
|
$implicit = false |
|
) |
| |
|
static |
Gets all assigned roles from the database for a user
- Parameters
-
| int | $userid | |
| boolean | $implicit | |
- Returns
- array
◆ getStatistics()
Returns statistic values for each role:
- number of explicitely assigned users
- number of implicitely assigned users
- number of assigned plugins
- Returns
- array
◆ isAssignedRole()
| static isAssignedRole |
( |
|
$userid, |
|
|
|
$assignedrole, |
|
|
|
$institut_id = '' |
|
) |
| |
|
static |
Checks a role assignment for an user optionally check for institute
- Parameters
-
| string | $userid | |
| string | $assignedrole | |
| string | $institut_id | |
- Returns
- boolean
◆ saveRole()
Inserts the role into the database or does an update, if it's already there
- Parameters
-
- Returns
- the role id
◆ ROLES_CACHE_KEY
| const ROLES_CACHE_KEY = 'plugins/rolepersistence/roles' |
◆ ROLES_PLUGINS_CACHE_KEY
| const ROLES_PLUGINS_CACHE_KEY = 'plugins/rolepersistence/roles_plugins/' |
The documentation for this class was generated from the following file: