Stud.IP  3.4 Revision
RolePersistence Class Reference
Collaboration diagram for RolePersistence:
Collaboration graph

Static Public Member Functions

static getAllRoles ()
 
static saveRole ($role)
 
static deleteRole ($role)
 
static assignRole ($user, $role, $institut_id='')
 
static getAssignedRoles ($userid, $implicit=false)
 
static getAssignedRoleInstitutes ($user_id, $role_id)
 
static isAssignedRole ($userid, $assignedrole, $institut_id='')
 
static deleteRoleAssignment ($user, $role, $institut_id=null)
 
static getAllRoleAssignments ($user=null)
 
static assignPluginRoles ($pluginid, $roleids)
 
static deleteAssignedPluginRoles ($pluginid, $roleids)
 
static getAssignedPluginRoles ($pluginid=-1)
 

Data Fields

const ROLES_CACHE_KEY = 'plugins/rolepersistence/roles'
 
const ROLES_PLUGINS_CACHE_KEY = 'plugins/rolepersistence/roles_plugins/'
 

Detailed Description

Funktionen für das Rollenmanagement TODO: (mriehe) this is a static class, change the public function in static public functions

Member Function Documentation

◆ assignPluginRoles()

static assignPluginRoles (   $pluginid,
  $roleids 
)
static

Enter description here...

Parameters
int$pluginid
array$roleids
Here is the call graph for this function:
Here is the caller graph for this function:

◆ assignRole()

static assignRole (   $user,
  $role,
  $institut_id = '' 
)
static

Saves a role assignment to the database

Parameters
StudIPUser$user
Role$role
string$institut_id
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteAssignedPluginRoles()

static deleteAssignedPluginRoles (   $pluginid,
  $roleids 
)
static

Enter description here...

Parameters
int$pluginid
array$roleids
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteRole()

static deleteRole (   $role)
static

Delete role if not a permanent role. System roles cannot be deleted.

Parameters
unknown_type$role
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteRoleAssignment()

static deleteRoleAssignment (   $user,
  $role,
  $institut_id = null 
)
static

Deletes a role assignment from the database

Parameters
StudIPUser[]$users
Role$role
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
StudIPUser$user
Returns
array with roleids and the assigned userids
Here is the call graph for this function:

◆ getAllRoles()

static getAllRoles ( )
static

Enter description here...

Returns
array Roles
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAssignedPluginRoles()

static getAssignedPluginRoles (   $pluginid = -1)
static

Enter description here...

Parameters
int$pluginid
Returns
array
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAssignedRoleInstitutes()

static getAssignedRoleInstitutes (   $user_id,
  $role_id 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAssignedRoles()

static getAssignedRoles (   $userid,
  $implicit = false 
)
static

Gets all assigned roles from the database for a user

Parameters
int$userid
boolean$implicit
Returns
array
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveRole()

static saveRole (   $role)
static

Inserts the role into the database or does an update, if it's already there

Parameters
Role$role
Returns
the role id
Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ 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: