ILIAS  trunk Revision v13.0_alpha-52-g21c366bbdd4
class.ilObjAuthSettingsGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27
35{
36 private const string CMD_SHOW_APACHE_SETTINGS = 'apacheAuthSettings';
37 private const string CMD_SAVE_APACHE_SETTINGS = 'saveApacheSettings';
38 private const string PROP_AUTH_MODE_KIND = 'kind';
39 private const string PROP_AUTH_MODE_SEQUENCE = 'sequence';
40
42
44
45 public function __construct($a_data, int $a_id, bool $a_call_by_reference, bool $a_prepare_output = true)
46 {
47 $this->type = 'auth';
48 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
49
50 global $DIC;
51 $this->logger = $DIC->logger()->auth();
52
53 $this->lng->loadLanguageModule('administration');
54 $this->lng->loadLanguageModule('registration');
55 $this->lng->loadLanguageModule('auth');
56 $this->lng->loadLanguageModule('content');
57 $this->content_style_gui = $DIC->contentStyle()->gui();
58 }
59
60 public function viewObject(): void
61 {
62 $this->authSettingsObject();
63 }
64
65 private function authSettingsObject(
66 ?ILIAS\UI\Component\Input\Container\Form\Form $auth_mode_determination_form = null,
67 ?ILIAS\UI\Component\Input\Container\Form\Form $registration_role_mapping_form = null
68 ): void {
69 if (!$this->rbac_system->checkAccess('read', $this->object->getRefId())) {
70 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
71 }
72
73 $this->tabs_gui->setTabActive('authentication_settings');
74 $this->setSubTabs('authSettings');
75 $this->tabs_gui->setSubTabActive('auth_settings');
76
77 $generalSettingsTpl = new ilTemplate('tpl.auth_general.html', true, true, 'components/ILIAS/Authentication');
78
79 $generalSettingsTpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this));
80
81 $generalSettingsTpl->setVariable('TXT_AUTH_MODE', $this->lng->txt('auth_mode'));
82 $generalSettingsTpl->setVariable('TXT_AUTH_DEFAULT', $this->lng->txt('default'));
83 $generalSettingsTpl->setVariable('TXT_AUTH_ACTIVE', $this->lng->txt('active'));
84 $generalSettingsTpl->setVariable('TXT_AUTH_NUM_USERS', $this->lng->txt('num_users'));
85
86 $generalSettingsTpl->setVariable('TXT_LOCAL', $this->lng->txt('auth_local'));
87 $generalSettingsTpl->setVariable('TXT_LDAP', $this->lng->txt('auth_ldap'));
88 $generalSettingsTpl->setVariable('TXT_SHIB', $this->lng->txt('auth_shib'));
89
90 $generalSettingsTpl->setVariable('TXT_SCRIPT', $this->lng->txt('auth_script'));
91
92 $generalSettingsTpl->setVariable('TXT_APACHE', $this->lng->txt('auth_apache'));
93
95 $auth_modes = ilAuthUtils::_getAllAuthModes();
96 $valid_modes = [
103 ];
104
105 $icon_ok = $this->ui_renderer->render(
106 $this->ui_factory->symbol()->icon()->custom(
107 ilUtil::getImagePath('standard/icon_ok.svg'),
108 $this->lng->txt('enabled')
109 )
110 );
111 $icon_not_ok = $this->ui_renderer->render(
112 $this->ui_factory->symbol()->icon()->custom(
113 ilUtil::getImagePath('standard/icon_not_ok.svg'),
114 $this->lng->txt('disabled')
115 )
116 );
117
118 $this->logger->debug(print_r($auth_modes, true));
119 $access = $this->rbac_system->checkAccess('write', $this->object->getRefId());
120 foreach ($auth_modes as $mode => $mode_name) {
121 if (!in_array($mode, $valid_modes, true) && !ilLDAPServer::isAuthModeLDAP(
122 (string) $mode
123 ) && !ilSamlIdp::isAuthModeSaml((string) $mode)) {
124 continue;
125 }
126
127 $generalSettingsTpl->setCurrentBlock('auth_mode');
128
129 if (ilLDAPServer::isAuthModeLDAP((string) $mode)) {
131 $generalSettingsTpl->setVariable('AUTH_NAME', $server->getName());
132 $generalSettingsTpl->setVariable('AUTH_ACTIVE', $server->isActive() ? $icon_ok : $icon_not_ok);
133 } elseif (ilSamlIdp::isAuthModeSaml((string) $mode)) {
135 $generalSettingsTpl->setVariable('AUTH_NAME', $idp->getEntityId());
136 $generalSettingsTpl->setVariable('AUTH_ACTIVE', $idp->isActive() ? $icon_ok : $icon_not_ok);
137 } elseif ($mode === ilAuthUtils::AUTH_OPENID_CONNECT) {
138 $generalSettingsTpl->setVariable('AUTH_NAME', $this->lng->txt('auth_' . $mode_name));
139 $generalSettingsTpl->setVariable(
140 'AUTH_ACTIVE',
141 ilOpenIdConnectSettings::getInstance()->getActive() ? $icon_ok : $icon_not_ok
142 );
143 } else {
144 $generalSettingsTpl->setVariable('AUTH_NAME', $this->lng->txt('auth_' . $mode_name));
145 $generalSettingsTpl->setVariable(
146 'AUTH_ACTIVE',
147 $this->ilias->getSetting(
148 $mode_name . '_active'
149 ) || (int) $mode === ilAuthUtils::AUTH_LOCAL ? $icon_ok : $icon_not_ok
150 );
151 }
152
153 $auth_cnt_mode = $auth_cnt[$mode_name] ?? 0;
154 if ($this->settings->get('auth_mode') === (string) $mode) {
155 $generalSettingsTpl->setVariable('AUTH_CHECKED', 'checked="checked"');
156 $auth_cnt_default = $auth_cnt['default'] ?? 0;
157 $generalSettingsTpl->setVariable(
158 'AUTH_USER_NUM',
159 ((int) $auth_cnt_mode + $auth_cnt_default) . ' (' . $this->lng->txt('auth_per_default') .
160 ': ' . $auth_cnt_default . ')'
161 );
162 } else {
163 $generalSettingsTpl->setVariable(
164 'AUTH_USER_NUM',
165 (int) $auth_cnt_mode
166 );
167 }
168 $generalSettingsTpl->setVariable('AUTH_ID', $mode_name);
169 $generalSettingsTpl->setVariable('AUTH_VAL', $mode);
170
171 if (!$access) {
172 $generalSettingsTpl->touchBlock('DISABLED');
173 }
174 $generalSettingsTpl->setCurrentBlock('auth_mode');
175 $generalSettingsTpl->parseCurrentBlock();
176 }
177
178 $generalSettingsTpl->setVariable('TXT_CONFIGURE', $this->lng->txt('auth_configure'));
179
180 if ($this->rbac_system->checkAccess('write', $this->object->getRefId())) {
181 $generalSettingsTpl->setVariable('TXT_AUTH_REMARK', $this->lng->txt('auth_remark_non_local_auth'));
182 $generalSettingsTpl->setCurrentBlock('auth_mode_submit');
183 $generalSettingsTpl->setVariable('TXT_SUBMIT', $this->lng->txt('save'));
184 $generalSettingsTpl->setVariable('CMD_SUBMIT', 'setAuthMode');
185 $generalSettingsTpl->parseCurrentBlock();
186 }
187
188 $page_content = [
189 $this->ui_factory->panel()->standard(
190 $this->lng->txt('auth_select'),
191 $this->ui_factory->legacy()->content(implode('', [
192 $this->ui_renderer->render($this->ui_factory->messageBox()->info(
193 $this->lng->txt('auth_mode_default_change_info')
194 )),
195 $generalSettingsTpl->get()
196 ])),
197 )
198 ];
199
200 $auth_mode_determination_form = $auth_mode_determination_form ?? $this->buildAuthModeDeterminationForm();
201 if ($auth_mode_determination_form !== null) {
202 $page_content[] = $this->ui_factory->panel()->standard(
203 $this->lng->txt('auth_auth_mode_determination'),
204 $auth_mode_determination_form
205 );
206 }
207
208 $page_content[] = $this->ui_factory->panel()->standard(
209 $this->lng->txt('auth_active_roles'),
210 $registration_role_mapping_form ?? $this->buildRegistrationRoleMappingForm()
211 );
212
213 $this->tpl->setContent(
214 $this->ui_renderer->render($page_content)
215 );
216 }
217
218 private function buildRegistrationRoleMappingForm(): ILIAS\UI\Component\Input\Container\Form\Form
219 {
220 $access = $this->rbac_system->checkAccess('write', $this->object->getRefId());
221
222 $fields = [];
224
225 $excluded_auth_names = ['default', 'saml', 'shibboleth', 'ldap', 'lti', 'apache', 'ecs', 'oidc'];
226 // do not list auth modes with external login screen
227 // even not default, because it can easily be set to
228 // a non-working auth mode
229 $active_auth_modes = array_filter(
231 static function (string $auth_name) use ($excluded_auth_names): bool {
232 foreach ($excluded_auth_names as $excluded_auth_name) {
233 if ($auth_name === $excluded_auth_name) {
234 return false;
235 }
236
237 if (str_starts_with($auth_name, $excluded_auth_name)) {
238 return false;
239 }
240 }
241 return true;
242 },
243 ARRAY_FILTER_USE_KEY
244 );
245
246 foreach ($reg_roles as $role) {
247 $options = [];
248 $value = null;
249 foreach ($active_auth_modes as $auth_name => $auth_key) {
250 if ($auth_name === 'default') {
251 $name = $this->lng->txt('auth_' . $auth_name) . ' (' . $this->lng->txt(
252 'auth_' . ilAuthUtils::_getAuthModeName($auth_key)
253 ) . ')';
254 } else {
255 $name = $this->lng->txt('auth_' . $auth_name);
256 }
257
258 $options[$auth_name] = $name;
259
260 if ($role['auth_mode'] === $auth_name) {
261 $value = $auth_name;
262 }
263 }
264
265 if ($options === []) {
266 continue;
267 }
268
270
271 $fields['r_' . $role['id']] = $this->ui_factory
272 ->input()
273 ->field()
274 ->select(
275 $role['title'],
276 $options,
277 $this->lng->txt('auth_role_auth_mode')
278 )
279 ->withRequired(true)
280 ->withValue($value)
281 ->withDedicatedName('r_' . $role['id'])
282 ->withDisabled(!$access);
283 }
284
285 $form = $this->ui_factory
286 ->input()
287 ->container()
288 ->form()
289 ->standard(
290 $access ?
291 $this->ctrl->getFormAction($this, 'updateRegistrationRoleMapping') :
292 $this->ctrl->getFormAction($this, 'authSettings'),
293 $fields
294 )
295 ->withDedicatedName('registration_role_mapping');
296
297 if (!$access) {
298 $form = $form->withSubmitLabel($this->lng->txt('refresh'));
299 }
300
301 return $form;
302 }
303
304 private function updateRegistrationRoleMappingObject(): void
305 {
306 if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
307 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
308 }
309
310 $form = $this->buildRegistrationRoleMappingForm();
311 $form_valid = false;
312 $form_data = null;
313 if ($this->http->request()->getMethod() === 'POST') {
314 $form = $form->withRequest($this->http->request());
315 $form_data = $form->getData();
316 $form_valid = $form_data !== null;
317 }
318
319 if (!$form_valid) {
320 $this->tpl->setOnScreenMessage(
321 $this->tpl::MESSAGE_TYPE_FAILURE,
322 $this->lng->txt('err_wrong_login')
323 );
324 $this->authSettingsObject(null, $form);
325 return;
326 }
327
328 $f_object = [];
329 foreach ($form_data as $role_id => $auth_mode) {
330 $f_object[substr($role_id, 2)] = $auth_mode;
331 }
333
334 $this->tpl->setOnScreenMessage(
335 $this->tpl::MESSAGE_TYPE_SUCCESS,
336 $this->lng->txt('auth_mode_roles_changed'),
337 true
338 );
339 $this->ctrl->redirect($this, 'authSettings');
340 }
341
342 private function buildAuthModeDeterminationForm(): ?ILIAS\UI\Component\Input\Container\Form\Form
343 {
345 if ($det->getCountActiveAuthModes() <= 1) {
346 return null;
347 }
348
349 $access = $this->rbac_system->checkAccess('write', $this->object->getRefId());
350
351 $automatic_options = [];
352 $counter = 1;
353 $auth_sequenced = $det->getAuthModeSequence();
354 foreach ($auth_sequenced as $auth_mode) {
355 $text = '';
356 switch ($auth_mode) {
357 case ilLDAPServer::isAuthModeLDAP((string) $auth_mode):
358 $auth_id = ilLDAPServer::getServerIdByAuthMode($auth_mode);
360 $text = $server->getName();
361 break;
363 $text = $this->lng->txt('auth_local');
364 break;
366 $text = $this->lng->txt('auth_soap');
367 break;
369 $text = $this->lng->txt('auth_apache');
370 break;
371 default:
372 foreach (ilAuthUtils::getAuthPlugins() as $pl) {
373 $option = $pl->getMultipleAuthModeOptions($auth_mode);
374 $text = $option[$auth_mode]['txt'];
375 }
376 break;
377 }
378
379 $automatic_options['m' . $auth_mode] = $this->ui_factory
380 ->input()
381 ->field()
382 ->numeric($text)
383 ->withDedicatedName('m' . $auth_mode)
384 ->withValue($counter++)
385 ->withDisabled(!$access);
386 }
387
388 $options = [
389 (string) ilAuthModeDetermination::TYPE_MANUAL => $this->ui_factory
390 ->input()
391 ->field()
392 ->group(
393 [],
394 $this->lng->txt('auth_by_user')
395 )
396 ->withDedicatedName((string) ilAuthModeDetermination::TYPE_MANUAL)
397 ->withDisabled(!$access),
398 (string) ilAuthModeDetermination::TYPE_AUTOMATIC => $this->ui_factory
399 ->input()
400 ->field()
401 ->group(
402 $automatic_options,
403 $this->lng->txt('auth_automatic')
404 )
405 ->withDedicatedName((string) ilAuthModeDetermination::TYPE_AUTOMATIC)
406 ->withDisabled(!$access)
407 ];
408
409 $sections = [
410 self::PROP_AUTH_MODE_KIND => $this->ui_factory
411 ->input()
412 ->field()
413 ->switchableGroup(
414 $options,
415 $this->lng->txt('auth_kind_determination'),
416 $this->lng->txt('auth_mode_determination_info')
417 )
418 ->withDedicatedName(self::PROP_AUTH_MODE_KIND)
419 ->withValue((string) $det->getKind())
420 ->withDisabled(!$access)
421 ->withRequired(true)
422 ];
423
424 $form = $this->ui_factory
425 ->input()
426 ->container()
427 ->form()
428 ->standard(
429 $access ?
430 $this->ctrl->getFormAction($this, 'updateAuthModeDetermination') :
431 $this->ctrl->getFormAction($this, 'authSettings'),
432 $sections
433 )
434 ->withDedicatedName('auth_mode_determination')
435 ->withAdditionalTransformation(
436 $this->refinery->custom()->transformation(function ($value): array {
437 $auth_mode_kind = (int) ($value[self::PROP_AUTH_MODE_KIND][0] ?? ilAuthModeDetermination::TYPE_MANUAL);
438 $sequence = [];
439 if ($auth_mode_kind === ilAuthModeDetermination::TYPE_AUTOMATIC) {
440 $sequence = (array) ($value[self::PROP_AUTH_MODE_KIND][1] ?? []);
441 }
442
443 $merged_values = array_merge(
444 [
445 self::PROP_AUTH_MODE_KIND => $auth_mode_kind,
446 ],
447 [
448 self::PROP_AUTH_MODE_SEQUENCE => $sequence
449 ]
450 );
451
452 return $merged_values;
453 })
454 );
455
456 if (!$access) {
457 $form = $form->withSubmitLabel($this->lng->txt('refresh'));
458 }
459
460 return $form;
461 }
462
463 private function updateAuthModeDeterminationObject(): void
464 {
465 if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
466 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
467 }
468
469 $form = $this->buildAuthModeDeterminationForm();
470 if ($form === null) {
471 $this->authSettingsObject();
472 return;
473 }
474
475 $form_valid = false;
476 $form_data = null;
477 if ($this->http->request()->getMethod() === 'POST') {
478 $form = $form->withRequest($this->http->request());
479 $form_data = $form->getData();
480 $form_valid = $form_data !== null;
481 }
482
483 if (!$form_valid) {
484 $this->tpl->setOnScreenMessage(
485 $this->tpl::MESSAGE_TYPE_FAILURE,
486 $this->lng->txt('err_wrong_login')
487 );
488 $this->authSettingsObject($form);
489 return;
490 }
491
493 $kind = (int) $form_data[self::PROP_AUTH_MODE_KIND];
494 $det->setKind($kind);
496 $sequence = $form_data[self::PROP_AUTH_MODE_SEQUENCE];
497 $this->logger->debug('pos mode:' . print_r($sequence, true));
498 asort($sequence, SORT_NUMERIC);
499 $this->logger->debug('pos mode:' . print_r($sequence, true));
500 $counter = 0;
501 $position = [];
502 foreach (array_keys($sequence) as $auth_mode) {
503 $position[$counter++] = substr($auth_mode, 1);
504 }
505 $this->logger->debug('position mode:' . print_r($position, true));
506 $det->setAuthModeSequence($position);
507 }
508 $det->save();
509
510 $this->tpl->setOnScreenMessage(
511 $this->tpl::MESSAGE_TYPE_SUCCESS,
512 $this->lng->txt('settings_saved'),
513 true
514 );
515 $this->ctrl->redirect($this, 'authSettings');
516 }
517
518 public function cancelObject(): void
519 {
520 $this->ctrl->redirect($this, 'authSettings');
521 }
522
523 public function setAuthModeObject(): void
524 {
525 if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
526 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
527 }
528 $this->logger->debug('auth mode available:' . $this->request_wrapper->has('auth_mode'));
529
530 if (!$this->http->wrapper()->post()->has('auth_mode')) {
531 $this->ilias->raiseError($this->lng->txt('auth_err_no_mode_selected'), $this->ilias->error_obj->MESSAGE);
532 }
533 $new_auth_mode = $this->http->wrapper()->post()->retrieve('auth_mode', $this->refinery->to()->string());
534 $this->logger->debug('auth mode:' . $new_auth_mode);
535 $current_auth_mode = $this->settings->get('auth_mode', '');
536 if ($new_auth_mode === $current_auth_mode) {
537 $this->tpl->setOnScreenMessage(
538 'info',
539 $this->lng->txt('auth_mode') . ': ' . $this->getAuthModeTitle() . ' ' . $this->lng->txt(
540 'auth_mode_not_changed'
541 ),
542 true
543 );
544 $this->ctrl->redirect($this, 'authSettings');
545 }
546
547 switch ((int) $new_auth_mode) {
549 break;
550
551 // @fix changed from AUTH_SHIB > is not defined
553 if ($this->object->checkAuthSHIB() !== true) {
554 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('auth_shib_not_configured'), true);
556 $this->getReturnLocation(
557 'authSettings',
558 $this->ctrl->getLinkTargetByClass(
559 ilAuthShibbolethSettingsGUI::class,
560 'settings',
561 '',
562 false,
563 false
564 )
565 )
566 );
567 }
568 break;
569
571 if ($this->object->checkAuthScript() !== true) {
572 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('auth_script_not_configured'), true);
574 $this->getReturnLocation(
575 'authSettings',
576 $this->ctrl->getLinkTarget($this, 'editScript', '', false, false)
577 )
578 );
579 }
580 break;
581 }
582
583 $this->ilias->setSetting('auth_mode', $new_auth_mode);
584
585 $this->tpl->setOnScreenMessage(
586 'success',
587 $this->lng->txt('auth_default_mode_changed_to') . ' ' . $this->getAuthModeTitle(),
588 true
589 );
590 $this->ctrl->redirect($this, 'authSettings');
591 }
592
593 private function buildSOAPForm(
594 string $submit_action,
595 string $show_action
596 ): \ILIAS\UI\Component\Input\Container\Form\Form {
597 $role_list = $this->rbac_review->getRolesByFilter(2, $this->object->getId());
598 $roles = [];
599
600 foreach ($role_list as $role) {
601 $roles[$role['obj_id']] = $role['title'];
602 }
603
604 $active = $this->ui_factory
605 ->input()
606 ->field()
607 ->checkbox($this->lng->txt('active'))
608 ->withValue((bool) $this->settings->get('soap_auth_active', ''));
609
610 $server = $this->ui_factory
611 ->input()
612 ->field()
613 ->text(
614 $this->lng->txt('server'),
615 $this->lng->txt('auth_soap_server_desc')
616 )
617 ->withMaxLength(256)
618 ->withRequired(true)
619 ->withValue($this->settings->get('soap_auth_server', ''));
620
621 $port = $this->ui_factory
622 ->input()
623 ->field()
624 ->numeric(
625 $this->lng->txt('port'),
626 $this->lng->txt('auth_soap_port_desc')
627 )
628 ->withAdditionalTransformation($this->refinery->int()->isGreaterThan(0))
629 ->withAdditionalTransformation(
630 $this->refinery->int()->isLessThan(65536)
631 )
632 ->withValue((int) $this->settings->get('soap_auth_port', '0'));
633
634 $use_https = $this->ui_factory
635 ->input()
636 ->field()
637 ->checkbox($this->lng->txt('auth_soap_use_https'))
638 ->withValue((bool) $this->settings->get('soap_auth_use_https', ''));
639
640 $uri = $this->ui_factory
641 ->input()
642 ->field()
643 ->text(
644 $this->lng->txt('uri'),
645 $this->lng->txt('auth_soap_uri_desc')
646 )
647 ->withMaxLength(256)
648 ->withValue($this->settings->get('soap_auth_uri', ''));
649
650 $namespace = $this->ui_factory
651 ->input()
652 ->field()
653 ->text(
654 $this->lng->txt('auth_soap_namespace'),
655 $this->lng->txt('auth_soap_namespace_desc')
656 )
657 ->withMaxLength(256)
658 ->withValue($this->settings->get('soap_auth_namespace', ''));
659
660 $dotnet = $this->ui_factory
661 ->input()
662 ->field()
663 ->checkbox($this->lng->txt('auth_soap_use_dotnet'))
664 ->withValue((bool) $this->settings->get('soap_auth_use_dotnet', ''));
665
666 $createuser = $this->ui_factory
667 ->input()
668 ->field()
669 ->checkbox(
670 $this->lng->txt('auth_create_users'),
671 $this->lng->txt('auth_soap_create_users_desc')
672 )
673 ->withValue((bool) $this->settings->get('soap_auth_create_users', ''));
674
675 $sendmail = $this->ui_factory
676 ->input()
677 ->field()
678 ->checkbox(
679 $this->lng->txt('user_send_new_account_mail'),
680 $this->lng->txt('auth_new_account_mail_desc')
681 )
682 ->withValue((bool) $this->settings->get('soap_auth_account_mail', ''));
683
684 $defaultrole = $this->ui_factory
685 ->input()
686 ->field()
687 ->select(
688 $this->lng->txt('auth_user_default_role'),
689 $roles,
690 $this->lng->txt('auth_soap_user_default_role_desc')
691 )
692 ->withValue($this->settings->get('soap_auth_user_default_role', '4'))
693 ->withAdditionalTransformation($this->refinery->int()->isGreaterThan(0));
694
695 $allowlocal = $this->ui_factory
696 ->input()
697 ->field()
698 ->checkbox(
699 $this->lng->txt('auth_allow_local'),
700 $this->lng->txt('auth_soap_allow_local_desc')
701 )
702 ->withValue((bool) $this->settings->get('soap_auth_user_default_role', ''));
703
704 $access = $this->rbac_system->checkAccess('write', $this->object->getRefId());
705 $inputs = [
706 'active' => $active,
707 'server' => $server,
708 'port' => $port,
709 'use_https' => $use_https,
710 'uri' => $uri,
711 'namespace' => $namespace,
712 'dotnet' => $dotnet,
713 'createuser' => $createuser,
714 'sendmail' => $sendmail,
715 'defaultrole' => $defaultrole,
716 'allowlocal' => $allowlocal
717 ];
718
719 if (!$access) {
720 foreach ($inputs as $key => $input) {
721 $inputs[$key] = $input->withDisabled(true);
722 }
723 }
724
725 $form = $this->ui_factory->input()->container()->form()->standard(
726 $access ? $submit_action : $show_action,
727 $inputs
728 );
729
730 if (!$access) {
731 $form = $form->withSubmitLabel($this->lng->txt('refresh'));
732 }
733
734 return $form;
735 }
736
737 private function buildSOAPTestForm(
738 string $submit_action
739 ): \ILIAS\UI\Component\Input\Container\Form\Form {
740 $ext_uid = $this->ui_factory->input()->field()->text(
741 'ext_uid'
742 );
743 $soap_pw = $this->ui_factory->input()->field()->text(
744 'soap_pw'
745 );
746 $new_user = $this->ui_factory->input()->field()
747 ->checkbox('new_user');
748 return $this->ui_factory->input()->container()->form()->standard(
749 $submit_action,
750 [
751 'ext_uid' => $ext_uid,
752 'soap_pw' => $soap_pw,
753 'new_user' => $new_user
754 ]
755 )->withSubmitLabel($this->lng->txt('send'));
756 }
757
758 public function editSOAPObject(): void
759 {
760 if (!$this->rbac_system->checkAccess('read', $this->object->getRefId())) {
761 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
762 }
763
764 $soap_form = $this->buildSOAPForm(
765 $this->ctrl->getFormAction($this, 'saveSOAP'),
766 $this->ctrl->getFormAction($this, 'editSOAP')
767 );
768 $test_form = $this->buildSOAPTestForm(
769 $this->ctrl->getFormAction($this, 'testSoapAuthConnection'),
770 );
771
772 $this->tabs_gui->setTabActive('auth_soap');
773 $panel = $this->ui_factory->panel()->standard('SOAP', [$soap_form, $test_form]);
774 $this->tpl->setContent($this->ui_renderer->render($panel));
775 }
776
777 public function testSoapAuthConnectionObject(): void
778 {
779 if (!$this->rbac_system->checkAccess('read', $this->object->getRefId())) {
780 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
781 }
782
783 $soap_form = $this->buildSOAPForm(
784 $this->ctrl->getFormAction($this, 'saveSOAP'),
785 $this->ctrl->getFormAction($this, 'editSOAP')
786 );
787 $test_form = $this->buildSOAPTestForm(
788 $this->ctrl->getFormAction($this, 'testSoapAuthConnection')
789 );
790 $panel_content = [$soap_form, $test_form];
791 if ($this->request->getMethod() === 'POST') {
792 $test_form = $test_form->withRequest($this->request);
793 $result = $test_form->getData();
794 if ($result !== null) {
795 $panel_content = array_merge(
796 $panel_content,
797 (new ConnectionTester($this->settings, $this->ui_factory, $this->logger))->testConnection(
798 $result['ext_uid'],
799 $result['soap_pw'],
800 $result['new_user']
801 )
802 );
803 }
804 }
805 $this->tabs_gui->setTabActive('auth_soap');
806 $panel = $this->ui_factory->panel()->standard('SOAP', $panel_content);
807 $this->tpl->setContent($this->ui_renderer->render($panel));
808 }
809
810 public function saveSOAPObject(): void
811 {
812 if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
813 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
814 }
815
816 $soap_form = $this->buildSOAPForm(
817 $this->ctrl->getFormAction($this, 'saveSOAP'),
818 $this->ctrl->getFormAction($this, 'editSOAP')
819 );
820 $test_form = $this->buildSOAPTestForm(
821 $this->ctrl->getFormAction($this, 'testSoapAuthConnection'),
822 );
823 if ($this->request->getMethod() === 'POST') {
824 $soap_form = $soap_form->withRequest($this->request);
825 $result = $soap_form->getData();
826 if ($result !== null) {
827 $this->settings->set('soap_auth_active', (string) $result['active']);
828 $this->settings->set('soap_auth_server', $result['server']);
829 $this->settings->set('soap_auth_port', (string) $result['port']);
830 $this->settings->set('soap_auth_use_https', (string) $result['use_https']);
831 $this->settings->set('soap_auth_uri', $result['uri']);
832 $this->settings->set('soap_auth_namespace', $result['namespace']);
833 $this->settings->set('soap_auth_use_dotnet', (string) $result['dotnet']);
834 $this->settings->set('soap_auth_create_users', (string) $result['createuser']);
835 $this->settings->set('soap_auth_account_mail', (string) $result['sendmail']);
836 $this->settings->set('soap_auth_user_default_role', (string) $result['defaultrole']);
837 $this->settings->set('soap_auth_allow_local', (string) $result['allowlocal']);
838
839 $this->tpl->setOnScreenMessage('success', $this->lng->txt('auth_soap_settings_saved'), true);
840 $this->logger->info('data' . print_r($result, true));
841 $this->ctrl->redirect($this, 'editSOAP');
842 }
843 }
844
845 $this->tabs_gui->setTabActive('auth_soap');
846 $panel = $this->ui_factory->panel()->standard('SOAP', [$soap_form, $test_form]);
847 $this->tpl->setContent($this->ui_renderer->render($panel));
848 }
849
850 public function editScriptObject(): void
851 {
852 if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
853 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
854 }
855
856 if ($_SESSION['error_post_vars']) {
857 $this->tpl->setVariable('AUTH_SCRIPT_NAME', $_SESSION['error_post_vars']['auth_script']['name']);
858 } else {
859 $settings = $this->ilias->getAllSettings();
860
861 $this->tpl->setVariable('AUTH_SCRIPT_NAME', $settings['auth_script_name']);
862 }
863
864 $this->tabs_gui->setTabActive('auth_script');
865
866 $this->tpl->addBlockFile(
867 'ADM_CONTENT',
868 'adm_content',
869 'tpl.auth_script.html',
870 'components/ILIAS/Authentication'
871 );
872
873 $this->tpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this));
874 $this->tpl->setVariable('COLSPAN', 3);
875 $this->tpl->setVariable('TXT_AUTH_SCRIPT_TITLE', $this->lng->txt('auth_script_configure'));
876 $this->tpl->setVariable('TXT_OPTIONS', $this->lng->txt('options'));
877 $this->tpl->setVariable('TXT_AUTH_SCRIPT_NAME', $this->lng->txt('auth_script_name'));
878
879 $this->tpl->setVariable('TXT_REQUIRED_FLD', $this->lng->txt('required_field'));
880 $this->tpl->setVariable('TXT_CANCEL', $this->lng->txt('cancel'));
881 $this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('save'));
882 $this->tpl->setVariable('CMD_SUBMIT', 'saveScript');
883 }
884
885 public function saveScriptObject(): void
886 {
887 if (!$_POST['auth_script']['name']) {
888 $this->ilias->raiseError($this->lng->txt('fill_out_all_required_fields'), $this->ilias->error_obj->MESSAGE);
889 }
890
891 $this->ilias->setSetting('auth_script_name', $_POST['auth_script']['name']);
892 $this->ilias->setSetting('auth_mode', (string) ilAuthUtils::AUTH_SCRIPT);
893
894 $this->tpl->setOnScreenMessage(
895 'success',
896 $this->lng->txt('auth_mode_changed_to') . ' ' . $this->getAuthModeTitle(),
897 true
898 );
899 $this->ctrl->redirect($this, 'editScript');
900 }
901
902 private function getAuthModeTitle(): string
903 {
904 return match ((int) $this->ilias->getSetting('auth_mode')) {
905 ilAuthUtils::AUTH_LOCAL => $this->lng->txt('auth_local'),
906 ilAuthUtils::AUTH_LDAP => $this->lng->txt('auth_ldap'),
907 ilAuthUtils::AUTH_SHIBBOLETH => $this->lng->txt('auth_shib'),
908 ilAuthUtils::AUTH_SAML => $this->lng->txt('auth_saml'),
909 ilAuthUtils::AUTH_SCRIPT => $this->lng->txt('auth_script'),
910 ilAuthUtils::AUTH_APACHE => $this->lng->txt('auth_apache'),
911 default => $this->lng->txt('unknown'),
912 };
913 }
914
915 public function executeCommand(): void
916 {
917 $next_class = $this->ctrl->getNextClass($this) ?? '';
918 $cmd = $this->ctrl->getCmd() ?? '';
919 $this->prepareOutput();
920
921 if (!$this->rbac_system->checkAccess('read', $this->object->getRefId())) {
922 $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->WARNING);
923 }
924
925 switch ($next_class) {
926 case 'ilopenidconnectsettingsgui':
927 $this->tabs_gui->activateTab('auth_oidconnect');
928
929 $oid = new ilOpenIdConnectSettingsGUI($this->object->getRefId());
930 $this->ctrl->forwardCommand($oid);
931 break;
932
933 case 'ilsamlsettingsgui':
934 $this->tabs_gui->setTabActive('auth_saml');
935
936 $os = new ilSamlSettingsGUI($this->object->getRefId());
937 $this->ctrl->forwardCommand($os);
938 break;
939
940 case 'ilregistrationsettingsgui':
941 $this->tabs_gui->setTabActive('registration_settings');
942
943 $registration_gui = new ilRegistrationSettingsGUI();
944 $this->ctrl->forwardCommand($registration_gui);
945 break;
946
947 case 'ilpermissiongui':
948 $this->tabs_gui->setTabActive('perm_settings');
949
950 $perm_gui = new ilPermissionGUI($this);
951 $this->ctrl->forwardCommand($perm_gui);
952 break;
953
954 case 'illdapsettingsgui':
955 $this->tabs_gui->setTabActive('auth_ldap');
956
957 $ldap_settings_gui = new ilLDAPSettingsGUI($this->object->getRefId());
958 $this->ctrl->forwardCommand($ldap_settings_gui);
959 break;
960
961 case 'ilauthshibbolethsettingsgui':
962 $this->tabs_gui->setTabActive('auth_shib');
963
964 $shib_settings_gui = new ilAuthShibbolethSettingsGUI($this->object->getRefId());
965 $this->ctrl->forwardCommand($shib_settings_gui);
966 break;
967
968 case strtolower(ilAuthPageEditorGUI::class):
969 $this->setSubTabs('authSettings');
970 $this->tabs_gui->setTabActive('authentication_settings');
971 $this->tabs_gui->setSubTabActive('auth_login_editor');
972
973 $lpe = new ilAuthPageEditorGUI($this->object->getRefId());
974 $this->ctrl->forwardCommand($lpe);
975 break;
976
977 case strtolower(ilObjectContentStyleSettingsGUI::class):
978 $this->checkPermission('write');
979 $this->setTitleAndDescription();
980 $this->setSubTabs('authSettings');
981 $this->tabs_gui->activateTab('authentication_settings');
982 $this->tabs_gui->activateSubTab('style');
983
984 $settings_gui = $this->content_style_gui
985 ->objectSettingsGUIForRefId(
986 null,
987 $this->object->getRefId()
988 );
989 $this->ctrl->forwardCommand($settings_gui);
990 break;
991
992 case strtolower(ilAuthLogoutBehaviourGUI::class):
993 $this->setSubTabs('authSettings');
994 $this->tabs_gui->setTabActive('authentication_settings');
995 $this->tabs_gui->setSubTabActive('logout_behaviour');
996
997 $gui = new ilAuthLogoutBehaviourGUI($this->object->getRefId());
998 $this->ctrl->forwardCommand($gui);
999 break;
1000
1001 default:
1002 if (!$cmd) {
1003 $cmd = 'authSettings';
1004 }
1005 $cmd .= 'Object';
1006 $this->$cmd();
1007
1008 break;
1009 }
1010 }
1011
1012 public function getAdminTabs(): void
1013 {
1014 $this->getTabs();
1015 }
1016
1017 protected function getTabs(): void
1018 {
1019 $this->ctrl->setParameter($this, 'ref_id', $this->object->getRefId());
1020
1021 if ($this->rbac_system->checkAccess('read', $this->object->getRefId())) {
1022 $this->tabs_gui->addTarget(
1023 'authentication_settings',
1024 $this->ctrl->getLinkTarget($this, 'authSettings'),
1025 '',
1026 '',
1027 ''
1028 );
1029
1030 $this->tabs_gui->addTarget(
1031 'registration_settings',
1032 $this->ctrl->getLinkTargetByClass('ilregistrationsettingsgui', 'view')
1033 );
1034
1035 $this->tabs_gui->addTarget(
1036 'auth_ldap',
1037 $this->ctrl->getLinkTargetByClass('illdapsettingsgui', 'serverList'),
1038 '',
1039 '',
1040 ''
1041 );
1042
1043 $this->tabs_gui->addTarget(
1044 'auth_shib',
1045 $this->ctrl->getLinkTargetByClass('ilauthshibbolethsettingsgui', 'settings')
1046 );
1047
1048 $this->tabs_gui->addTarget(
1049 'auth_soap',
1050 $this->ctrl->getLinkTarget($this, 'editSOAP'),
1051 '',
1052 '',
1053 ''
1054 );
1055
1056 $this->tabs_gui->addTarget(
1057 'apache_auth_settings',
1058 $this->ctrl->getLinkTarget($this, self::CMD_SHOW_APACHE_SETTINGS),
1059 '',
1060 '',
1061 ''
1062 );
1063
1064 $this->tabs_gui->addTarget(
1065 'auth_saml',
1066 $this->ctrl->getLinkTargetByClass('ilsamlsettingsgui', ilSamlSettingsGUI::DEFAULT_CMD),
1067 '',
1068 '',
1069 ''
1070 );
1071
1072 $this->tabs_gui->addTab(
1073 'auth_oidconnect',
1074 $this->lng->txt('auth_oidconnect'),
1075 $this->ctrl->getLinkTargetByClass('ilopenidconnectsettingsgui')
1076 );
1077 }
1078
1079 if ($this->rbac_system->checkAccess('edit_permission', $this->object->getRefId())) {
1080 $this->tabs_gui->addTarget(
1081 'perm_settings',
1082 $this->ctrl->getLinkTargetByClass([get_class($this), 'ilpermissiongui'], 'perm'),
1083 ['perm', 'info', 'owner'],
1084 'ilpermissiongui'
1085 );
1086 }
1087 }
1088
1089 public function setSubTabs(string $a_tab): void
1090 {
1091 $this->lng->loadLanguageModule('auth');
1092
1093 if ($a_tab === 'authSettings' && $this->access->checkAccess('read', '', $this->object->getRefId())) {
1094 $this->tabs_gui->addSubTabTarget(
1095 'auth_settings',
1096 $this->ctrl->getLinkTarget($this, 'authSettings'),
1097 ''
1098 );
1099
1100 foreach (AuthPageEditorContext::cases() as $auth_ipe_context) {
1101 $this->ctrl->setParameterByClass(
1102 ilAuthPageEditorGUI::class,
1104 $auth_ipe_context->value
1105 );
1106 $this->tabs_gui->addSubTabTarget(
1107 $auth_ipe_context->tabIdentifier(),
1108 $this->ctrl->getLinkTargetByClass(
1109 ilAuthPageEditorGUI::class,
1111 )
1112 );
1113 $this->ctrl->setParameterByClass(
1114 ilAuthPageEditorGUI::class,
1116 null
1117 );
1118 }
1119
1120 $this->tabs_gui->addSubTabTarget(
1121 'logout_behaviour',
1122 $this->ctrl->getLinkTargetByClass(ilAuthLogoutBehaviourGUI::class, ''),
1123 ''
1124 );
1125
1126 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
1127 $this->tabs_gui->addSubTab(
1128 'style',
1129 $this->lng->txt('cont_style'),
1130 $this->ctrl->getLinkTargetByClass(ilObjectContentStyleSettingsGUI::class)
1131 );
1132 }
1133 }
1134 }
1135
1136 public function apacheAuthSettingsObject(?StandardForm $form = null): void
1137 {
1138 $this->tabs_gui->setTabActive('apache_auth_settings');
1139
1140 if (!$form) {
1141 $settings = new ilSetting('apache_auth');
1142 $settingsMap = $settings->getAll();
1143
1144 $path = ILIAS_DATA_DIR . '/' . CLIENT_ID . '/apache_auth_allowed_domains.txt';
1145 if (file_exists($path) && is_readable($path)) {
1146 $settingsMap['apache_auth_domains'] = file_get_contents($path);
1147 }
1148
1149 $form = (new ApacheAuthSettingsForm(
1150 $this->ref_id,
1151 $this,
1152 self::CMD_SHOW_APACHE_SETTINGS,
1153 self::CMD_SAVE_APACHE_SETTINGS,
1154 $settingsMap
1155 ))->buildForm();
1156
1157 }
1158
1159 $this->tpl->setContent($this->ui_renderer->render([
1160 $this->ui_factory->item()->standard($this->lng->txt('apache_settings')),
1161 $form
1162 ]));
1163 }
1164
1165 public function saveApacheSettingsObject(): void
1166 {
1167 if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
1168 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
1169 }
1170
1171 $form = (new ApacheAuthSettingsForm(
1172 $this->ref_id,
1173 $this,
1174 self::CMD_SHOW_APACHE_SETTINGS,
1175 self::CMD_SAVE_APACHE_SETTINGS
1176 ))->buildForm()->withRequest($this->http->request());
1177 if (!$form->getError()) {
1178 $data = $form->getData();
1179
1180 $settings = new ilSetting('apache_auth');
1181
1182 $fields = [
1183 'apache_auth_indicator_name',
1184 'apache_auth_indicator_value',
1185 'apache_enable_auth',
1186 'apache_enable_local',
1187 'apache_local_autocreate',
1188 'apache_enable_ldap',
1189 'apache_auth_username_config_type',
1190 'apache_auth_username_direct_mapping_fieldname',
1191 'apache_default_role',
1192 'apache_auth_target_override_login_page',
1193 'apache_auth_enable_override_login_page',
1194 'apache_auth_authenticate_on_login_page',
1195 'apache_ldap_sid'
1196 ];
1197
1198 foreach ($fields as $field) {
1199 $value = match ($field) {
1200 'apache_enable_auth',
1201 'apache_auth_enable_override_login_page',
1202 'apache_auth_username_config',
1203 'apache_auth_security',
1204 'apache_enable_ldap' => (bool) ($data[$field] ?? false),
1205 'apache_auth_username_config_type' => $data['apache_auth_username_config'][$field][0] ?? 1,
1206 'apache_auth_target_override_login_page' => $data['apache_auth_enable_override_login_page'][$field] ?? '',
1207 'apache_auth_username_direct_mapping_fieldname' => $data['apache_auth_username_config']['apache_auth_username_config_type'][1][$field] ?? '',
1208 'apache_auth_domains' => $data['apache_auth_security'][$field] ?? '',
1209 'apache_local_autocreate' => (bool) ($data['apache_enable_auth'][$field] ?? false),
1210 'apache_default_role' => $data['apache_enable_auth']['apache_local_autocreate'][$field] ?? 4,
1211 'apache_ldap_sid' => $data['apache_enable_ldap'][$field] ?? '',
1212 default => $data[$field],
1213 };
1214
1215 $settings->set(
1216 $field,
1217 ilUtil::stripSlashes(trim((string) ($value === false ? '0' : $value)))
1218 );
1219 }
1220
1221 if ($data[$field] ?? false) {
1222 $this->ilias->setSetting('apache_active', '1');
1223 } else {
1224 $this->ilias->setSetting('apache_active', '0');
1225 if ($this->ilias->getSetting('auth_mode', '0') === ilAuthUtils::AUTH_APACHE) {
1226 $this->ilias->setSetting('auth_mode', (string) ilAuthUtils::AUTH_LOCAL);
1227 }
1228 }
1229
1230 $allowed_domains = $this->validateApacheAuthAllowedDomains($data['apache_auth_security']['apache_auth_domains'] ?? '');
1231 file_put_contents(ILIAS_DATA_DIR . '/' . CLIENT_ID . '/apache_auth_allowed_domains.txt', $allowed_domains);
1232
1233 $this->tpl->setOnScreenMessage(
1234 $this->tpl::MESSAGE_TYPE_SUCCESS,
1235 $this->lng->txt('apache_settings_changed_success'),
1236 true
1237 );
1238 $this->ctrl->redirect($this, self::CMD_SHOW_APACHE_SETTINGS);
1239 }
1240
1241 $this->apacheAuthSettingsObject($form);
1242 }
1243
1244 private function validateApacheAuthAllowedDomains(string $text): string
1245 {
1246 return implode("\n", preg_split("/[\r\n]+/", $text));
1247 }
1248
1249 public function registrationSettingsObject(): void
1250 {
1251 $registration_gui = new ilRegistrationSettingsGUI();
1252 $this->ctrl->redirect($registration_gui);
1253 }
1254}
$settings
Definition: index.php:44
Facade for consumer gui interface.
@ilCtrl_isCalledBy ilAuthLogoutBehaviourGUI: ilObjAuthSettingsGUI @ilCtrl_Calls ilAuthLogoutBehaviour...
@ilCtrl_isCalledBy ilAuthPageEditorGUI: ilObjAuthSettingsGUI @ilCtrl_Calls ilAuthPageEditorGUI: ilLog...
final const string CONTEXT_HTTP_PARAM
final const string DEFAULT_COMMAND
Class ilAuthShibbolethSettingsGUI.
const int AUTH_SHIBBOLETH
static _getActiveAuthModes()
const int AUTH_LOCAL
const int AUTH_LDAP
const int AUTH_SAML
const int AUTH_APACHE
static getAuthPlugins()
const int AUTH_SOAP
const int AUTH_SCRIPT
const int AUTH_OPENID_CONNECT
static _getAllAuthModes()
static _getAuthModeName($a_auth_key)
static getInstanceByServerId(int $a_server_id)
Get instance by server id.
static getServerIdByAuthMode(string $a_auth_mode)
Get auth id by auth mode.
static isAuthModeLDAP(string $a_auth_mode)
Check if user auth mode is LDAP.
Component logger with individual log levels by component id.
@ilCtrl_Calls ilObjAuthSettingsGUI: ilPermissionGUI, ilRegistrationSettingsGUI, ilLDAPSettingsGUI @il...
getAdminTabs()
administration tabs show only permissions and trash folder
buildSOAPTestForm(string $submit_action)
apacheAuthSettingsObject(?StandardForm $form=null)
__construct($a_data, int $a_id, bool $a_call_by_reference, bool $a_prepare_output=true)
cancelObject()
cancel action and go back to previous page
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"
getTabs()
@abstract overwrite in derived GUI class of your object type
buildSOAPForm(string $submit_action, string $show_action)
authSettingsObject(?ILIAS\UI\Component\Input\Container\Form\Form $auth_mode_determination_form=null, ?ILIAS\UI\Component\Input\Container\Form\Form $registration_role_mapping_form=null)
static _updateAuthMode(array $a_roles)
static _lookupRegisterAllowed()
get all roles that are activated in user registration
static _getNumberOfUsersPerAuthMode()
get number of users per auth mode
Class ilObjectGUI Basic methods of all Output classes.
ilAccessHandler $access
Class ilRegistrationSettingsGUI.
static getIdpIdByAuthMode(string $a_auth_mode)
static isAuthModeSaml(string $a_auth_mode)
static getInstanceByIdpId(int $a_idp_id)
ILIAS Setting Class.
special template class to simplify handling of ITX/PEAR
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static redirect(string $a_script)
const CLIENT_ID
Definition: constants.php:41
const ILIAS_DATA_DIR
Definition: constants.php:44
$soap_pw
$ext_uid
$new_user
This describes a standard form.
Definition: Standard.php:30
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance)
$_POST['cmd']
Definition: lti.php:31
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
Class ilObjForumAdministration.
if(!file_exists('../ilias.ini.php'))
global $DIC
Definition: shib_login.php:26
$server
Definition: shib_login.php:28
$data
Definition: storeScorm.php:45
$text
Definition: xapiexit.php:21