24 include_once
'./Services/AuthShibboleth/classes/class.ilShibbolethRoleAssignmentRule.php';
44 public static function getAllRules() {
51 $query =
"SELECT rule_id FROM shib_role_assignment ORDER BY rule_id";
64 $query =
"SELECT COUNT(*) num FROM shib_role_assignment ";
81 require_once(
'./Services/AuthShibboleth/classes/Config/class.shibConfig.php');
85 $rbacadmin = $DIC[
'rbacadmin'];
86 $rbacreview = $DIC[
'rbacreview'];
88 $query =
"SELECT rule_id,add_on_update,remove_on_update FROM shib_role_assignment " .
"WHERE add_on_update = 1 OR remove_on_update = 1";
93 if ($rule->doesMatch($a_data)
and $row->add_on_update) {
95 $rbacadmin->assignUser($rule->getRoleId(), $a_usr_id);
97 if (! $rule->doesMatch($a_data)
and $row->remove_on_update) {
99 $rbacadmin->deassignUser($rule->getRoleId(), $a_usr_id);
103 if (! array_intersect($rbacreview->assignedRoles($a_usr_id), $rbacreview->getGlobalRoles())) {
106 $rbacadmin->assignUser($default_role, $a_usr_id);
121 $ilDB = $DIC[
'ilDB'];
122 $rbacadmin = $DIC[
'rbacadmin'];
124 $query =
"SELECT rule_id,add_on_update FROM shib_role_assignment WHERE add_on_update = 1";
129 if ($rule->doesMatch($a_data)) {
132 $rbacadmin->assignUser($rule->getRoleId(), $a_usr_id);
136 if (! $num_matches) {
139 $rbacadmin->assignUser($default_role, $a_usr_id);
152 public static function callPlugin($a_plugin_id, $a_user_data) {
154 $ilPluginAdmin = $DIC[
'ilPluginAdmin'];
155 if (self::$active_plugins == NULL) {
156 self::$active_plugins = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
'AuthShibboleth',
'shibhk');
159 foreach (self::$active_plugins as $plugin_name) {
161 $plugin_obj = $ilPluginAdmin->getPluginObject(
IL_COMP_SERVICE,
'AuthShibboleth',
'shibhk', $plugin_name);
163 $ok = $plugin_obj->checkRoleAssignment($a_plugin_id, $a_user_data);
static callPlugin($a_plugin_id, $a_user_data)
static _lookupTitle($a_id)
lookup object title
Shibboleth role assignment rules.
Interface for shibboleth role assignment plugins.
static doAssignments($a_usr_id, $a_data)
Create styles array
The data for the language used.
static updateAssignments($a_usr_id, $a_data)
Shibboleth role assignment rule.