Stud.IP
2.0 Revision 48548
|
Public Member Functions | |
getAllRoles () | |
saveRole ($role) | |
deleteRole ($role) | |
assignRole ($user, $role) | |
getAssignedRoles ($userid, $implicit=false) | |
deleteRoleAssignment ($user, $role) | |
getAllRoleAssignments ($user=null) | |
assignPluginRoles ($pluginid, $roleids) | |
deleteAssignedPluginRoles ($pluginid, $roleids) | |
getAssignedPluginRoles ($pluginid=-1) |
Static Public Member Functions | |
static | isAssignedRole ($userid, $assignedrole) |
Data Fields | |
const | ROLES_CACHE_KEY = 'plugins/rolepersistence/roles' |
const | ROLES_PLUGINS_CACHE_KEY = 'plugins/rolepersistence/roles_plugins/' |
Funktionen für das Rollenmanagement TODO: (mriehe) this is a static class, change the public function in static public functions
assignPluginRoles | ( | $pluginid, | |
$roleids | |||
) |
Enter description here...
int | $pluginid | |
array | $roleids |
assignRole | ( | $user, | |
$role | |||
) |
Saves a role assignment to the database
StudIPUser | $user | |
Role | $role |
deleteAssignedPluginRoles | ( | $pluginid, | |
$roleids | |||
) |
Enter description here...
int | $pluginid | |
array | $roleids |
deleteRole | ( | $role | ) |
Delete role if not a permanent role. System roles cannot be deleted.
unknown_type | $role |
deleteRoleAssignment | ( | $user, | |
$role | |||
) |
Deletes a role assignment from the database
StudIPUser[] | $users | |
Role | $role |
getAllRoleAssignments | ( | $user = null | ) |
Get's all Role-Assignments for a certain user. If no user is set, all role assignments are returned.
StudIPUser | $user |
getAllRoles | ( | ) |
Enter description here...
getAssignedPluginRoles | ( | $pluginid = -1 | ) |
Enter description here...
int | $pluginid |
getAssignedRoles | ( | $userid, | |
$implicit = false |
|||
) |
Gets all assigned roles from the database for a user
int | $userid | |
boolean | $implicit |
|
static |
Checks a role assignment for an user
string | $userid | |
string | $assignedrole |
saveRole | ( | $role | ) |
Inserts the role into the database or does an update, if it's already there
Role | $role |
const ROLES_CACHE_KEY = 'plugins/rolepersistence/roles' |
const ROLES_PLUGINS_CACHE_KEY = 'plugins/rolepersistence/roles_plugins/' |