ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAuthShibbolethSettingsGUI Class Reference

Class ilAuthShibbolethSettingsGUI. More...

+ Collaboration diagram for ilAuthShibbolethSettingsGUI:

Public Member Functions

 __construct (private int $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 (int $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
 
Refinery $refinery
 
ilShibbolethRoleAssignmentRule $rule = null
 
ilShibbolethSettings $shib_settings
 
ilTabsGUI $tabs_gui
 
ilGlobalTemplateInterface $tpl
 
WrapperFactory $wrapper
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAuthShibbolethSettingsGUI::__construct ( private int  $ref_id)

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

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

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

+ Here is the call graph for this function:

Member Function Documentation

◆ addRoleAssignmentRule()

ilAuthShibbolethSettingsGUI::addRoleAssignmentRule ( )
protected
Exceptions
ilCtrlException

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

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

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

+ Here is the call graph for this function:

◆ addRoleAutoCompleteObject()

ilAuthShibbolethSettingsGUI::addRoleAutoCompleteObject ( )

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

297 : void
298 {
300 }
static echoAutoCompleteList()
Static asynchronous default auto complete function.

References ilRoleAutoCompleteInputGUI\echoAutoCompleteList().

+ Here is the call graph for this function:

◆ checkInput()

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

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

458 : string
459 {
460 $this->loadRule($a_rule_id);
461
462 return $this->rule->validate();
463 }

References loadRule().

+ Here is the call graph for this function:

◆ confirmDeleteRules()

ilAuthShibbolethSettingsGUI::confirmDeleteRules ( )
protected
Exceptions
ilCtrlException

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

168 : bool
169 {
170 if (!$this->wrapper->post()->has('rule_ids')) {
171 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'));
172 $this->roleAssignment();
173
174 return false;
175 }
176 $this->tabs_gui->activateTab('shib_role_assignment');
177 $c_gui = new ilConfirmationGUI();
178 // set confirm/cancel commands
179 $c_gui->setFormAction($this->ctrl->getFormAction($this, "deleteRules"));
180 $c_gui->setHeaderText($this->lng->txt("shib_confirm_del_role_ass"));
181 $c_gui->setCancel($this->lng->txt("cancel"), "roleAssignment");
182 $c_gui->setConfirm($this->lng->txt("confirm"), "deleteRules");
183
184 $rule_ids = $this->wrapper->post()->retrieve(
185 'rule_ids',
186 $this->refinery->to()->listOf($this->refinery->kindlyTo()->int())
187 );
188 foreach ($rule_ids as $rule_id) {
191 $info .= " (";
193 $info .= ')';
194 $c_gui->addItem('rule_ids[]', $rule_id, $info);
195 }
196 $this->tpl->setContent($c_gui->getHTML());
197 return true;
198 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$info
Definition: entry_point.php:21

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

+ Here is the call graph for this function:

◆ deleteRules()

ilAuthShibbolethSettingsGUI::deleteRules ( )
protected
Exceptions
ilCtrlException

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

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

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

+ Here is the call graph for this function:

◆ editRoleAssignment()

ilAuthShibbolethSettingsGUI::editRoleAssignment ( )
protected
Exceptions
ilCtrlException

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

343 : bool
344 {
345 $this->ctrl->saveParameter($this, self::PARAM_RULE_ID);
346 $this->tabs_gui->activateSubTab('shib_role_assignment');
347 $this->initFormRoleAssignment('update');
348 $this->getRuleValues();
349 $this->tpl->addBlockFile(
350 'ADM_CONTENT',
351 'adm_content',
352 'tpl.shib_role_assignment.html',
353 'components/ILIAS/AuthShibboleth'
354 );
355 $this->tpl->setVariable('NEW_RULE_TABLE', $this->form->getHTML());
356
357 return true;
358 }

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

+ Here is the call graph for this function:

◆ executeCommand()

ilAuthShibbolethSettingsGUI::executeCommand ( )
Exceptions
ilCtrlException
ilException

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

79 : void
80 {
81 $cmd = $this->ctrl->getCmd();
82 if (!$this->access->checkAccess('read', '', $this->ref_id)) {
83 throw new ilException('Permission denied');
84 }
85 if ($cmd !== "settings" && !$this->access->checkAccess('write', '', $this->ref_id)) {
86 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_perm_write'), true);
87 $this->ctrl->redirect($this, "settings");
88 }
89 $this->setSubTabs();
90 if (!$cmd) {
91 $cmd = "settings";
92 }
93 $this->$cmd();
94 }
Base class for ILIAS Exception handling.

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

+ Here is the call graph for this function:

◆ getRuleValues()

ilAuthShibbolethSettingsGUI::getRuleValues ( )
private

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

430 : void
431 {
432 $rule_id = $this->wrapper->query()->has(self::PARAM_RULE_ID)
433 ? $this->wrapper->query()->retrieve(self::PARAM_RULE_ID, $this->refinery->kindlyTo()->int())
434 : 0;
435
437 $role = $rule->getRoleId();
438 if ($this->rbac->review()->isGlobalRole($role)) {
439 $values['role_name'] = 0;
440 $values['role_id'] = $role;
441 } else {
442 $values['role_name'] = 1;
443 $values['role_search'] = ilObject::_lookupTitle($role);
444 }
445 $values['add_missing'] = (int) $rule->isAddOnUpdateEnabled();
446 $values['remove_deprecated'] = (int) $rule->isRemoveOnUpdateEnabled();
447 $values['attr_name'] = $rule->getName();
448 $values['attr_value'] = $rule->getValue();
449 if (!$rule->isPluginActive()) {
450 $values['kind'] = 1;
451 } else {
452 $values['kind'] = 2;
453 $values['plugin_id'] = $rule->getPluginId();
454 }
455 $this->form->setValuesByArray($values);
456 }

References $rule, 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().

+ 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 228 of file class.ilAuthShibbolethSettingsGUI.php.

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

References $id, ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ILIAS\Repository\lng(), and prepareRoleSelect().

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

+ 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 398 of file class.ilAuthShibbolethSettingsGUI.php.

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

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

Referenced by checkInput().

+ 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 151 of file class.ilAuthShibbolethSettingsGUI.php.

151 : string
152 {
154 return '';
155 }
156 $rules_table = new ilShibbolethRoleAssignmentTableGUI($this, 'roleAssignment');
157 $rules_table->setTitle($this->lng->txt('shib_rules_tables'));
158 $rules_table->parse(ilShibbolethRoleAssignmentRules::getAllRules());
159 $rules_table->addMultiCommand("confirmDeleteRules", $this->lng->txt("delete"));
160 $rules_table->setSelectAllCheckbox(self::PARAM_RULE_ID);
161
162 return $rules_table->getHTML();
163 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

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

Referenced by addRoleAssignmentRule(), and roleAssignment().

+ 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 468 of file class.ilAuthShibbolethSettingsGUI.php.

468 : array
469 {
470 $global_roles = ilUtil::_sortIds($this->rbac_review->getGlobalRoles(), 'object_data', 'title', 'obj_id');
471 $select[0] = $this->lng->txt('links_select_one');
472 foreach ($global_roles as $role_id) {
473 $select[$role_id] = ilObject::_lookupTitle($role_id);
474 }
475
476 return $select;
477 }
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,...

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

Referenced by initFormRoleAssignment().

+ 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 130 of file class.ilAuthShibbolethSettingsGUI.php.

130 : bool
131 {
132 $this->tabs_gui->activateSubTab('shib_role_assignment');
133 $this->initFormRoleAssignment();
134 $this->tpl->addBlockFile(
135 'ADM_CONTENT',
136 'adm_content',
137 'tpl.shib_role_assignment.html',
138 'components/ILIAS/AuthShibboleth'
139 );
140 $this->tpl->setVariable('NEW_RULE_TABLE', $this->form->getHTML());
141 if (($html = $this->parseRulesTable()) !== '') {
142 $this->tpl->setVariable('RULE_TABLE', $html);
143 }
144
145 return true;
146 }

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilAuthShibbolethSettingsGUI::save ( )
Exceptions
ilCtrlException

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

113 : void
114 {
116 $this->shib_settings,
117 $this->ctrl->getLinkTarget($this, 'save')
118 );
120 if ($form->saveObject()) {
121 $this->tpl->setOnScreenMessage('success', $this->lng->txt("shib_settings_saved"), true);
122 $this->ctrl->redirect($this, 'settings');
123 }
124 $this->tpl->setContent($form->getHTML());
125 }
Class ilShibbolethSettingsForm.

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

+ Here is the call graph for this function:

◆ setSubTabs()

ilAuthShibbolethSettingsGUI::setSubTabs ( )
protected
Exceptions
ilCtrlException

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

482 : bool
483 {
484 if (!$this->global_settings->get('shib_active', '0')) {
485 return false;
486 }
487 $this->tabs_gui->addSubTabTarget('shib_settings', $this->ctrl->getLinkTarget($this, 'settings'));
488 $this->tabs_gui->addSubTabTarget('shib_role_assignment', $this->ctrl->getLinkTarget($this, 'roleAssignment'));
489
490 return true;
491 }

References ILIAS\Repository\ctrl().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ settings()

ilAuthShibbolethSettingsGUI::settings ( )
Exceptions
ilCtrlException

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

99 : void
100 {
101 $this->tabs_gui->activateSubTab('shib_settings');
103 $this->shib_settings,
104 $this->ctrl->getLinkTarget($this, 'save')
105 );
106
107 $this->tpl->setContent($form->getHTML());
108 }

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

+ Here is the call graph for this function:

◆ updateRoleAssignmentRule()

ilAuthShibbolethSettingsGUI::updateRoleAssignmentRule ( )
protected
Exceptions
ilCtrlException

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

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

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

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilAuthShibbolethSettingsGUI::$access
private

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

◆ $component_repository

ilComponentRepository ilAuthShibbolethSettingsGUI::$component_repository
private

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

◆ $ctrl

ilCtrl ilAuthShibbolethSettingsGUI::$ctrl
private

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

◆ $form

ilPropertyFormGUI ilAuthShibbolethSettingsGUI::$form = null
private

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

Referenced by save(), and settings().

◆ $global_settings

ilSetting ilAuthShibbolethSettingsGUI::$global_settings
private

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

◆ $lng

ilLanguage ilAuthShibbolethSettingsGUI::$lng
private

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

◆ $rbac

RBACServices ilAuthShibbolethSettingsGUI::$rbac
private

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

◆ $rbac_review

ilRbacReview ilAuthShibbolethSettingsGUI::$rbac_review
private

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

◆ $refinery

Refinery ilAuthShibbolethSettingsGUI::$refinery
private

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

◆ $rule

ilShibbolethRoleAssignmentRule ilAuthShibbolethSettingsGUI::$rule = null
private

◆ $shib_settings

ilShibbolethSettings ilAuthShibbolethSettingsGUI::$shib_settings
private

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

◆ $tabs_gui

ilTabsGUI ilAuthShibbolethSettingsGUI::$tabs_gui
private

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

◆ $tpl

ilGlobalTemplateInterface ilAuthShibbolethSettingsGUI::$tpl
private

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

◆ $wrapper

WrapperFactory ilAuthShibbolethSettingsGUI::$wrapper
private

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

◆ PARAM_RULE_ID

const ilAuthShibbolethSettingsGUI::PARAM_RULE_ID = 'rule_id'
private

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


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