ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilAuthShibbolethSettingsGUI Class Reference

Class ilAuthShibbolethSettingsGUI. More...

+ Collaboration diagram for ilAuthShibbolethSettingsGUI:

Public Member Functions

 __construct (int $a_auth_ref_id)
 
 executeCommand ()
 
 settings ()
 
 save ()
 
 addRoleAutoCompleteObject ()
 

Protected Member Functions

 roleAssignment ()
 
 parseRulesTable ()
 
 confirmDeleteRules ()
 
 deleteRules ()
 
 initFormRoleAssignment (string $a_mode='default')
 
 addRoleAssignmentRule ()
 
 editRoleAssignment ()
 
 updateRoleAssignmentRule ()
 
 setSubTabs ()
 

Private Member Functions

 loadRule (int $a_rule_id=0)
 
 getRuleValues ()
 
 checkInput ($a_rule_id=0)
 
 prepareRoleSelect ()
 

Private Attributes

const PARAM_RULE_ID = 'rule_id'
 
ilAccessHandler $access
 
ilComponentRepository $component_repository
 
ilCtrl $ctrl
 
ilPropertyFormGUI $form = null
 
ilSetting $global_settings
 
ilLanguage $lng
 
RBACServices $rbac
 
ilRbacReview $rbac_review
 
int $ref_id
 
Refinery $refinery
 
ilShibbolethRoleAssignmentRule $rule = null
 
ilShibbolethSettings $shib_settings
 
ilTabsGUI $tabs_gui
 
ilGlobalTemplateInterface $tpl
 
WrapperFactory $wrapper
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAuthShibbolethSettingsGUI::__construct ( int  $a_auth_ref_id)

Definition at line 53 of file class.ilAuthShibbolethSettingsGUI.php.

References $DIC, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\rbac(), and ILIAS\Repository\refinery().

54  {
55  global $DIC;
56 
57  $this->access = $DIC->access();
58  $this->component_repository = $DIC["component.repository"];
59  $this->ctrl = $DIC->ctrl();
60  $this->global_settings = $DIC->settings();
61  $this->lng = $DIC->language();
62  $this->lng->loadLanguageModule('shib');
63  $this->rbac = $DIC->rbac();
64  $this->rbac_review = $DIC->rbac()->review();
65  $this->ref_id = $a_auth_ref_id;
66  $this->refinery = $DIC->refinery();
67  $this->shib_settings = new ilShibbolethSettings();
68  $this->tabs_gui = $DIC->tabs();
69  $this->tpl = $DIC->ui()->mainTemplate();
70  $this->wrapper = $DIC->http()->wrapper();
71  }
global $DIC
Definition: shib_login.php:25
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Member Function Documentation

◆ addRoleAssignmentRule()

ilAuthShibbolethSettingsGUI::addRoleAssignmentRule ( )
protected
Exceptions
ilCtrlException

Definition at line 303 of file class.ilAuthShibbolethSettingsGUI.php.

References ILIAS\Repository\access(), checkInput(), ILIAS\Repository\form(), initFormRoleAssignment(), ILIAS\Repository\lng(), parseRulesTable(), and roleAssignment().

303  : bool
304  {
305  if (!$this->access->checkAccess('write', '', $this->ref_id)) {
306  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
307  $this->roleAssignment();
308 
309  return false;
310  }
311  $this->initFormRoleAssignment();
312  if (!$this->form->checkInput() || ($err = $this->checkInput())) {
313  if (isset($err)) {
314  $this->tpl->setOnScreenMessage('failure', $this->lng->txt($err));
315  }
316  $this->tabs_gui->activateSubTab('shib_role_assignment');
317  $this->form->setValuesByPost();
318  $this->tpl->addBlockFile(
319  'ADM_CONTENT',
320  'adm_content',
321  'tpl.shib_role_assignment.html',
322  'components/ILIAS/AuthShibboleth'
323  );
324  $this->tpl->setVariable('NEW_RULE_TABLE', $this->form->getHTML());
325  if (($html = $this->parseRulesTable()) !== '') {
326  $this->tpl->setVariable('RULE_TABLE', $html);
327  }
328 
329  return true;
330  }
331  $this->rule->add();
332  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'));
333  $this->roleAssignment();
334 
335  return true;
336  }
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ addRoleAutoCompleteObject()

ilAuthShibbolethSettingsGUI::addRoleAutoCompleteObject ( )

Definition at line 295 of file class.ilAuthShibbolethSettingsGUI.php.

References ilRoleAutoCompleteInputGUI\echoAutoCompleteList().

295  : void
296  {
298  }
static echoAutoCompleteList()
Static asynchronous default auto complete function.
+ Here is the call graph for this function:

◆ checkInput()

ilAuthShibbolethSettingsGUI::checkInput (   $a_rule_id = 0)
private

Definition at line 456 of file class.ilAuthShibbolethSettingsGUI.php.

References loadRule().

Referenced by addRoleAssignmentRule(), and updateRoleAssignmentRule().

456  : string
457  {
458  $this->loadRule($a_rule_id);
459 
460  return $this->rule->validate();
461  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmDeleteRules()

ilAuthShibbolethSettingsGUI::confirmDeleteRules ( )
protected
Exceptions
ilCtrlException

Definition at line 166 of file class.ilAuthShibbolethSettingsGUI.php.

References ilObject\_lookupTitle(), ilShibbolethRoleAssignmentRule\conditionToString(), ILIAS\Repository\ctrl(), ilShibbolethRoleAssignmentRule\getRoleId(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and roleAssignment().

166  : bool
167  {
168  if (!$this->wrapper->post()->has('rule_ids')) {
169  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'));
170  $this->roleAssignment();
171 
172  return false;
173  }
174  $this->tabs_gui->activateTab('shib_role_assignment');
175  $c_gui = new ilConfirmationGUI();
176  // set confirm/cancel commands
177  $c_gui->setFormAction($this->ctrl->getFormAction($this, "deleteRules"));
178  $c_gui->setHeaderText($this->lng->txt("shib_confirm_del_role_ass"));
179  $c_gui->setCancel($this->lng->txt("cancel"), "roleAssignment");
180  $c_gui->setConfirm($this->lng->txt("confirm"), "deleteRules");
181 
182  $rule_ids = $this->wrapper->post()->retrieve(
183  'rule_ids',
184  $this->refinery->to()->listOf($this->refinery->kindlyTo()->int())
185  );
186  foreach ($rule_ids as $rule_id) {
187  $rule = new ilShibbolethRoleAssignmentRule($rule_id);
189  $info .= " (";
190  $info .= $rule->conditionToString();
191  $info .= ')';
192  $c_gui->addItem('rule_ids[]', $rule_id, $info);
193  }
194  $this->tpl->setContent($c_gui->getHTML());
195  return true;
196  }
static _lookupTitle(int $obj_id)
+ Here is the call graph for this function:

◆ deleteRules()

ilAuthShibbolethSettingsGUI::deleteRules ( )
protected
Exceptions
ilCtrlException

Definition at line 201 of file class.ilAuthShibbolethSettingsGUI.php.

References ilShibbolethRoleAssignmentRule\delete(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and roleAssignment().

201  : bool
202  {
203  if (!$this->wrapper->post()->has('rule_ids')) {
204  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_once'));
205  $this->roleAssignment();
206 
207  return false;
208  }
209  $rule_ids = $this->wrapper->post()->retrieve(
210  'rule_ids',
211  $this->refinery->to()->listOf($this->refinery->kindlyTo()->int())
212  );
213  foreach ($rule_ids as $rule_id) {
214  $rule = new ilShibbolethRoleAssignmentRule($rule_id);
215  $rule->delete();
216  }
217  $this->tpl->setOnScreenMessage('success', $this->lng->txt('shib_deleted_rule'));
218  $this->roleAssignment();
219 
220  return true;
221  }
+ Here is the call graph for this function:

◆ editRoleAssignment()

ilAuthShibbolethSettingsGUI::editRoleAssignment ( )
protected
Exceptions
ilCtrlException

Definition at line 341 of file class.ilAuthShibbolethSettingsGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\form(), getRuleValues(), and initFormRoleAssignment().

341  : bool
342  {
343  $this->ctrl->saveParameter($this, self::PARAM_RULE_ID);
344  $this->tabs_gui->activateSubTab('shib_role_assignment');
345  $this->initFormRoleAssignment('update');
346  $this->getRuleValues();
347  $this->tpl->addBlockFile(
348  'ADM_CONTENT',
349  'adm_content',
350  'tpl.shib_role_assignment.html',
351  'components/ILIAS/AuthShibboleth'
352  );
353  $this->tpl->setVariable('NEW_RULE_TABLE', $this->form->getHTML());
354 
355  return true;
356  }
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ executeCommand()

ilAuthShibbolethSettingsGUI::executeCommand ( )
Exceptions
ilCtrlException
ilException

Definition at line 77 of file class.ilAuthShibbolethSettingsGUI.php.

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and setSubTabs().

77  : void
78  {
79  $cmd = $this->ctrl->getCmd();
80  if (!$this->access->checkAccess('read', '', $this->ref_id)) {
81  throw new ilException('Permission denied');
82  }
83  if ($cmd !== "settings" && !$this->access->checkAccess('write', '', $this->ref_id)) {
84  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_perm_write'), true);
85  $this->ctrl->redirect($this, "settings");
86  }
87  $this->setSubTabs();
88  if (!$cmd) {
89  $cmd = "settings";
90  }
91  $this->$cmd();
92  }
+ Here is the call graph for this function:

◆ getRuleValues()

ilAuthShibbolethSettingsGUI::getRuleValues ( )
private

Definition at line 428 of file class.ilAuthShibbolethSettingsGUI.php.

References ilObject\_lookupTitle(), ILIAS\Repository\form(), ilShibbolethRoleAssignmentRule\getName(), ilShibbolethRoleAssignmentRule\getPluginId(), ilShibbolethRoleAssignmentRule\getRoleId(), ilShibbolethRoleAssignmentRule\getValue(), ILIAS\Repository\int(), ilShibbolethRoleAssignmentRule\isAddOnUpdateEnabled(), ilShibbolethRoleAssignmentRule\isPluginActive(), ilShibbolethRoleAssignmentRule\isRemoveOnUpdateEnabled(), ILIAS\Repository\rbac(), and ILIAS\Repository\refinery().

Referenced by editRoleAssignment().

428  : void
429  {
430  $rule_id = $this->wrapper->query()->has(self::PARAM_RULE_ID)
431  ? $this->wrapper->query()->retrieve(self::PARAM_RULE_ID, $this->refinery->kindlyTo()->int())
432  : 0;
433 
434  $rule = new ilShibbolethRoleAssignmentRule($rule_id);
435  $role = $rule->getRoleId();
436  if ($this->rbac->review()->isGlobalRole($role)) {
437  $values['role_name'] = 0;
438  $values['role_id'] = $role;
439  } else {
440  $values['role_name'] = 1;
441  $values['role_search'] = ilObject::_lookupTitle($role);
442  }
443  $values['add_missing'] = (int) $rule->isAddOnUpdateEnabled();
444  $values['remove_deprecated'] = (int) $rule->isRemoveOnUpdateEnabled();
445  $values['attr_name'] = $rule->getName();
446  $values['attr_value'] = $rule->getValue();
447  if (!$rule->isPluginActive()) {
448  $values['kind'] = 1;
449  } else {
450  $values['kind'] = 2;
451  $values['plugin_id'] = $rule->getPluginId();
452  }
453  $this->form->setValuesByArray($values);
454  }
static _lookupTitle(int $obj_id)
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormRoleAssignment()

ilAuthShibbolethSettingsGUI::initFormRoleAssignment ( string  $a_mode = 'default')
protected
Exceptions
ilCtrlException

Definition at line 226 of file class.ilAuthShibbolethSettingsGUI.php.

References $id, ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ILIAS\Repository\lng(), prepareRoleSelect(), ilRadioOption\setInfo(), ilFormPropertyGUI\setRequired(), and ilRadioGroupInputGUI\setValue().

Referenced by addRoleAssignmentRule(), editRoleAssignment(), roleAssignment(), and updateRoleAssignmentRule().

226  : void
227  {
228  $this->form = new ilPropertyFormGUI();
229  $this->form->setFormAction($this->ctrl->getFormAction($this, 'cancel'));
230  $this->form->setTitle($this->lng->txt('shib_role_ass_table'));
231  if ($a_mode === 'default') {
232  $this->form->setTitle($this->lng->txt('shib_role_ass_table'));
233  $this->form->addCommandButton('addRoleAssignmentRule', $this->lng->txt('shib_new_rule'));
234  $this->form->addCommandButton('settings', $this->lng->txt('cancel'));
235  } else {
236  $this->form->setTitle($this->lng->txt('shib_update_role_ass_table'));
237  $this->form->addCommandButton('updateRoleAssignmentRule', $this->lng->txt('save'));
238  $this->form->addCommandButton('roleAssignment', $this->lng->txt('cancel'));
239  }
240  // Role selection
241  $role = new ilRadioGroupInputGUI($this->lng->txt('shib_role_name'), 'role_name');
242  $role->setRequired(true);
243  $global = new ilRadioOption($this->lng->txt('shib_global_role'), 0);
244  $role->addOption($global);
245  $role_select = new ilSelectInputGUI('', 'role_id');
246  $role_select->setOptions($this->prepareRoleSelect());
247  $global->addSubItem($role_select);
248  $local = new ilRadioOption($this->lng->txt('shib_local_role'), 1);
249  $role->addOption($local);
250  $role_search = new ilRoleAutoCompleteInputGUI('', 'role_search', self::class, 'addRoleAutoCompleteObject');
251  $role_search->setSize(40);
252  $local->addSubItem($role_search);
253  $role->setInfo($this->lng->txt('shib_role_name_info'));
254  $this->form->addItem($role);
255  // Update options
256  $update = new ilNonEditableValueGUI($this->lng->txt('shib_update_roles'), 'update_roles');
257  $update->setValue($this->lng->txt('shib_check_role_assignment'));
258  $add = new ilCheckboxInputGUI('', 'add_missing');
259  $add->setOptionTitle($this->lng->txt('shib_add_missing'));
260  $add->setValue(1);
261  $update->addSubItem($add);
262  $remove = new ilCheckboxInputGUI('', 'remove_deprecated');
263  $remove->setOptionTitle($this->lng->txt('shib_remove_deprecated'));
264  $remove->setValue(1);
265  $update->addSubItem($remove);
266  $this->form->addItem($update);
267  // Assignment type
268  $kind = new ilRadioGroupInputGUI($this->lng->txt('shib_assignment_type'), 'kind');
269  $kind->setValue(1);
270  $kind->setRequired(true);
271  $attr = new ilRadioOption($this->lng->txt('shib_attribute'), 1);
272  $attr->setInfo($this->lng->txt('shib_attr_info'));
273  $name = new ilTextInputGUI($this->lng->txt('shib_attribute_name'), 'attr_name');
274  $name->setSize(32);
275  $attr->addSubItem($name);
276  $value = new ilTextInputGUI($this->lng->txt('shib_attribute_value'), 'attr_value');
277  $value->setSize(32);
278  $attr->addSubItem($value);
279  $kind->addOption($attr);
280  $pl_active = $this->component_repository->getPluginSlotById('shibhk')->hasActivePlugins();
281  $pl = new ilRadioOption($this->lng->txt('shib_plugin'), 2);
282  $pl->setInfo($this->lng->txt('shib_plugin_info'));
283  $pl->setDisabled(!$pl_active);
284  $id = new ilNumberInputGUI($this->lng->txt('shib_plugin_id'), 'plugin_id');
285  $id->setDisabled(!$pl_active);
286  $id->setSize(3);
287  $id->setMaxLength(3);
288  $id->setMaxValue(999);
289  $id->setMinValue(1);
290  $pl->addSubItem($id);
291  $kind->addOption($pl);
292  $this->form->addItem($kind);
293  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a selection list property in a property form.
setInfo(string $a_info)
This class represents a property in a property form.
setRequired(bool $a_required)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
form( $class_path, string $cmd, string $submit_caption="")
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadRule()

ilAuthShibbolethSettingsGUI::loadRule ( int  $a_rule_id = 0)
private

Definition at line 396 of file class.ilAuthShibbolethSettingsGUI.php.

References $res, $rule, ILIAS\Repository\form(), ilQueryParser\QP_COMBINATION_AND, and ilQueryParser\setMinWordLength().

Referenced by checkInput().

397  {
398  $this->rule = new ilShibbolethRoleAssignmentRule($a_rule_id);
399  if ((int) $this->form->getInput('role_name') === 0) {
400  $this->rule->setRoleId($this->form->getInput('role_id'));
401  } elseif ($this->form->getInput('role_search')) {
402  $parser = new ilQueryParser($this->form->getInput('role_search'));
403  // TODO: Handle minWordLength
404  $parser->setMinWordLength(1);
405  $parser->setCombination(ilQueryParser::QP_COMBINATION_AND);
406  $parser->parse();
407  $object_search = new ilLikeObjectSearch($parser);
408  $object_search->setFilter(array('role'));
409  $res = $object_search->performSearch();
410  $entries = $res->getEntries();
411  if (count($entries) === 1) {
412  $role = current($entries);
413  $this->rule->setRoleId($role['obj_id']);
414  } elseif (count($entries) > 1) {
415  $this->rule->setRoleId(-1);
416  }
417  }
418  $this->rule->setName($this->form->getInput('attr_name'));
419  $this->rule->setValue($this->form->getInput('attr_value'));
420  $this->rule->enableAddOnUpdate($this->form->getInput('add_missing'));
421  $this->rule->enableRemoveOnUpdate($this->form->getInput('remove_deprecated'));
422  $this->rule->enablePlugin((int) $this->form->getInput('kind') === 2);
423  $this->rule->setPluginId($this->form->getInput('plugin_id'));
424 
425  return $this->rule;
426  }
$res
Definition: ltiservices.php:69
setMinWordLength(int $a_length)
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseRulesTable()

ilAuthShibbolethSettingsGUI::parseRulesTable ( )
protected
Exceptions
ilCtrlException

Definition at line 149 of file class.ilAuthShibbolethSettingsGUI.php.

References ilShibbolethRoleAssignmentRules\getCountRules(), and ILIAS\Repository\lng().

Referenced by addRoleAssignmentRule(), and roleAssignment().

149  : string
150  {
152  return '';
153  }
154  $rules_table = new ilShibbolethRoleAssignmentTableGUI($this, 'roleAssignment');
155  $rules_table->setTitle($this->lng->txt('shib_rules_tables'));
156  $rules_table->parse(ilShibbolethRoleAssignmentRules::getAllRules());
157  $rules_table->addMultiCommand("confirmDeleteRules", $this->lng->txt("delete"));
158  $rules_table->setSelectAllCheckbox(self::PARAM_RULE_ID);
159 
160  return $rules_table->getHTML();
161  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareRoleSelect()

ilAuthShibbolethSettingsGUI::prepareRoleSelect ( )
private
Returns
array<int|string, string>

Definition at line 466 of file class.ilAuthShibbolethSettingsGUI.php.

References ilObject\_lookupTitle(), ilUtil\_sortIds(), and ILIAS\Repository\lng().

Referenced by initFormRoleAssignment().

466  : array
467  {
468  $global_roles = ilUtil::_sortIds($this->rbac_review->getGlobalRoles(), 'object_data', 'title', 'obj_id');
469  $select[0] = $this->lng->txt('links_select_one');
470  foreach ($global_roles as $role_id) {
471  $select[$role_id] = ilObject::_lookupTitle($role_id);
472  }
473 
474  return $select;
475  }
static _lookupTitle(int $obj_id)
static _sortIds(array $a_ids, string $a_table, string $a_field, string $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),&#39;usr_data&#39;,&#39;lastname&#39;,&#39;usr_id&#39;) => sorts by lastname.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ roleAssignment()

ilAuthShibbolethSettingsGUI::roleAssignment ( )
protected
Exceptions
ilCtrlException

Definition at line 128 of file class.ilAuthShibbolethSettingsGUI.php.

References ILIAS\Repository\form(), initFormRoleAssignment(), and parseRulesTable().

Referenced by addRoleAssignmentRule(), confirmDeleteRules(), deleteRules(), and updateRoleAssignmentRule().

128  : bool
129  {
130  $this->tabs_gui->activateSubTab('shib_role_assignment');
131  $this->initFormRoleAssignment();
132  $this->tpl->addBlockFile(
133  'ADM_CONTENT',
134  'adm_content',
135  'tpl.shib_role_assignment.html',
136  'components/ILIAS/AuthShibboleth'
137  );
138  $this->tpl->setVariable('NEW_RULE_TABLE', $this->form->getHTML());
139  if (($html = $this->parseRulesTable()) !== '') {
140  $this->tpl->setVariable('RULE_TABLE', $html);
141  }
142 
143  return true;
144  }
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilAuthShibbolethSettingsGUI::save ( )
Exceptions
ilCtrlException

Definition at line 111 of file class.ilAuthShibbolethSettingsGUI.php.

References ILIAS\Repository\ctrl(), ilPropertyFormGUI\getHTML(), ILIAS\Repository\lng(), and ilPropertyFormGUI\setValuesByPost().

111  : void
112  {
114  $this->shib_settings,
115  $this->ctrl->getLinkTarget($this, 'save')
116  );
118  if ($form->saveObject()) {
119  $this->tpl->setOnScreenMessage('success', $this->lng->txt("shib_settings_saved"), true);
120  $this->ctrl->redirect($this, 'settings');
121  }
122  $this->tpl->setContent($form->getHTML());
123  }
Class ilShibbolethSettingsForm.
+ Here is the call graph for this function:

◆ setSubTabs()

ilAuthShibbolethSettingsGUI::setSubTabs ( )
protected
Exceptions
ilCtrlException

Definition at line 480 of file class.ilAuthShibbolethSettingsGUI.php.

References ILIAS\Repository\ctrl().

Referenced by executeCommand().

480  : bool
481  {
482  if (!$this->global_settings->get('shib_active', '0')) {
483  return false;
484  }
485  $this->tabs_gui->addSubTabTarget('shib_settings', $this->ctrl->getLinkTarget($this, 'settings'));
486  $this->tabs_gui->addSubTabTarget('shib_role_assignment', $this->ctrl->getLinkTarget($this, 'roleAssignment'));
487 
488  return true;
489  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ settings()

ilAuthShibbolethSettingsGUI::settings ( )
Exceptions
ilCtrlException

Definition at line 97 of file class.ilAuthShibbolethSettingsGUI.php.

References ILIAS\Repository\ctrl(), and ilPropertyFormGUI\getHTML().

97  : void
98  {
99  $this->tabs_gui->activateSubTab('shib_settings');
101  $this->shib_settings,
102  $this->ctrl->getLinkTarget($this, 'save')
103  );
104 
105  $this->tpl->setContent($form->getHTML());
106  }
Class ilShibbolethSettingsForm.
+ Here is the call graph for this function:

◆ updateRoleAssignmentRule()

ilAuthShibbolethSettingsGUI::updateRoleAssignmentRule ( )
protected
Exceptions
ilCtrlException

Definition at line 361 of file class.ilAuthShibbolethSettingsGUI.php.

References ILIAS\Repository\access(), checkInput(), ILIAS\Repository\form(), initFormRoleAssignment(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and roleAssignment().

361  : bool
362  {
363  if (!$this->access->checkAccess('write', '', $this->ref_id)) {
364  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
365  $this->roleAssignment();
366 
367  return false;
368  }
369  $this->initFormRoleAssignment();
370  $err = false;
371  $role_id = $this->wrapper->query()->retrieve(self::PARAM_RULE_ID, $this->refinery->kindlyTo()->int());
372 
373  if (!$this->form->checkInput() || $err = $this->checkInput($role_id)) {
374  if ($err) {
375  $this->tpl->setOnScreenMessage('failure', $this->lng->txt($err));
376  }
377  $this->tabs_gui->activateSubTab('shib_role_assignment');
378  $this->form->setValuesByPost();
379  $this->tpl->addBlockFile(
380  'ADM_CONTENT',
381  'adm_content',
382  'tpl.shib_role_assignment.html',
383  'components/ILIAS/AuthShibboleth'
384  );
385  $this->tpl->setVariable('NEW_RULE_TABLE', $this->form->getHTML());
386 
387  return true;
388  }
389  $this->rule->update();
390  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'));
391  $this->roleAssignment();
392 
393  return true;
394  }
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilAuthShibbolethSettingsGUI::$access
private

Definition at line 35 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $component_repository

ilComponentRepository ilAuthShibbolethSettingsGUI::$component_repository
private

Definition at line 36 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $ctrl

ilCtrl ilAuthShibbolethSettingsGUI::$ctrl
private

Definition at line 37 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $form

ilPropertyFormGUI ilAuthShibbolethSettingsGUI::$form = null
private

Definition at line 38 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $global_settings

ilSetting ilAuthShibbolethSettingsGUI::$global_settings
private

Definition at line 39 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $lng

ilLanguage ilAuthShibbolethSettingsGUI::$lng
private

Definition at line 41 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $rbac

RBACServices ilAuthShibbolethSettingsGUI::$rbac
private

Definition at line 42 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $rbac_review

ilRbacReview ilAuthShibbolethSettingsGUI::$rbac_review
private

Definition at line 43 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $ref_id

int ilAuthShibbolethSettingsGUI::$ref_id
private

Definition at line 44 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $refinery

Refinery ilAuthShibbolethSettingsGUI::$refinery
private

Definition at line 45 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $rule

ilShibbolethRoleAssignmentRule ilAuthShibbolethSettingsGUI::$rule = null
private

Definition at line 46 of file class.ilAuthShibbolethSettingsGUI.php.

Referenced by loadRule().

◆ $shib_settings

ilShibbolethSettings ilAuthShibbolethSettingsGUI::$shib_settings
private

Definition at line 47 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $tabs_gui

ilTabsGUI ilAuthShibbolethSettingsGUI::$tabs_gui
private

Definition at line 48 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $tpl

ilGlobalTemplateInterface ilAuthShibbolethSettingsGUI::$tpl
private

Definition at line 49 of file class.ilAuthShibbolethSettingsGUI.php.

◆ $wrapper

WrapperFactory ilAuthShibbolethSettingsGUI::$wrapper
private

Definition at line 50 of file class.ilAuthShibbolethSettingsGUI.php.

◆ PARAM_RULE_ID

const ilAuthShibbolethSettingsGUI::PARAM_RULE_ID = 'rule_id'
private

Definition at line 33 of file class.ilAuthShibbolethSettingsGUI.php.


The documentation for this class was generated from the following file: