24 include_once
'./Services/AuthShibboleth/classes/class.ilShibbolethRoleAssignmentRule.php';
44 public static function getAllRules()
52 $query =
"SELECT rule_id FROM shib_role_assignment ORDER BY rule_id";
66 $query =
"SELECT COUNT(*) num FROM shib_role_assignment ";
84 require_once(
'./Services/AuthShibboleth/classes/Config/class.shibConfig.php');
88 $rbacadmin = $DIC[
'rbacadmin'];
89 $rbacreview = $DIC[
'rbacreview'];
91 $query =
"SELECT rule_id,add_on_update,remove_on_update FROM shib_role_assignment " .
"WHERE add_on_update = 1 OR remove_on_update = 1";
98 $rbacadmin->assignUser(
$rule->getRoleId(), $a_usr_id);
100 if (!
$rule->doesMatch($a_data)
and $row->remove_on_update) {
102 $rbacadmin->deassignUser(
$rule->getRoleId(), $a_usr_id);
106 if (!array_intersect($rbacreview->assignedRoles($a_usr_id), $rbacreview->getGlobalRoles())) {
109 $rbacadmin->assignUser($default_role, $a_usr_id);
125 $ilDB = $DIC[
'ilDB'];
126 $rbacadmin = $DIC[
'rbacadmin'];
128 $query =
"SELECT rule_id,add_on_update FROM shib_role_assignment WHERE add_on_update = 1";
133 if (
$rule->doesMatch($a_data)) {
136 $rbacadmin->assignUser(
$rule->getRoleId(), $a_usr_id);
143 $rbacadmin->assignUser($default_role, $a_usr_id);
156 public static function callPlugin($a_plugin_id, $a_user_data)
159 $ilPluginAdmin = $DIC[
'ilPluginAdmin'];
160 if (self::$active_plugins == null) {
161 self::$active_plugins = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
'AuthShibboleth',
'shibhk');
164 foreach (self::$active_plugins as $plugin_name) {
166 $plugin_obj = $ilPluginAdmin->getPluginObject(
IL_COMP_SERVICE,
'AuthShibboleth',
'shibhk', $plugin_name);
168 $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.
foreach($_POST as $key=> $value) $res
Interface for shibboleth role assignment plugins.
static doAssignments($a_usr_id, $a_data)
static updateAssignments($a_usr_id, $a_data)
Shibboleth role assignment rule.