ILIAS  release_8 Revision v8.24
class.ilObjAuthSettingsGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
29{
33 private ILIAS\Http\Services $http;
34
36
37 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output = true)
38 {
39 $this->type = "auth";
40 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
41
42 global $DIC;
43 $this->logger = $DIC->logger()->auth();
44
45 $this->ui = $DIC->ui()->factory();
46 $this->renderer = $DIC->ui()->renderer();
47 $this->http = $DIC->http();
48
49 $this->lng->loadLanguageModule('registration');
50 $this->lng->loadLanguageModule('auth');
51 }
52
53 public function viewObject(): void
54 {
55 $this->authSettingsObject();
56 }
57
61 public function authSettingsObject(): void
62 {
63 if (!$this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
64 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
65 }
66
67 $this->tabs_gui->setTabActive('authentication_settings');
68 $this->setSubTabs('authSettings');
69 $this->tabs_gui->setSubTabActive("auth_settings");
70
71 $generalSettingsTpl = new ilTemplate('tpl.auth_general.html', true, true, 'Services/Authentication');
72
73 $generalSettingsTpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
74 $generalSettingsTpl->setVariable("TXT_AUTH_TITLE", $this->lng->txt("auth_select"));
75
76 $generalSettingsTpl->setVariable("TXT_AUTH_MODE", $this->lng->txt("auth_mode"));
77 $generalSettingsTpl->setVariable("TXT_AUTH_DEFAULT", $this->lng->txt("default"));
78 $generalSettingsTpl->setVariable("TXT_AUTH_ACTIVE", $this->lng->txt("active"));
79 $generalSettingsTpl->setVariable("TXT_AUTH_NUM_USERS", $this->lng->txt("num_users"));
80
81 $generalSettingsTpl->setVariable("TXT_LOCAL", $this->lng->txt("auth_local"));
82 $generalSettingsTpl->setVariable("TXT_LDAP", $this->lng->txt("auth_ldap"));
83 $generalSettingsTpl->setVariable("TXT_SHIB", $this->lng->txt("auth_shib"));
84
85 $generalSettingsTpl->setVariable("TXT_CAS", $this->lng->txt("auth_cas"));
86
87 $generalSettingsTpl->setVariable("TXT_SCRIPT", $this->lng->txt("auth_script"));
88
89 $generalSettingsTpl->setVariable("TXT_APACHE", $this->lng->txt("auth_apache"));
90
92 $auth_modes = ilAuthUtils::_getAllAuthModes();
93 $valid_modes = [
101 ];
102 // icon handlers
103
104 $icon_ok = $this->renderer->render(
105 $this->ui->symbol()->icon()->custom(ilUtil::getImagePath("icon_ok.svg"), $this->lng->txt("enabled"))
106 );
107 $icon_not_ok = $this->renderer->render(
108 $this->ui->symbol()->icon()->custom(ilUtil::getImagePath("icon_not_ok.svg"), $this->lng->txt("disabled"))
109 );
110
111 $this->logger->debug(print_r($auth_modes, true));
112 foreach ($auth_modes as $mode => $mode_name) {
113 if (!in_array($mode, $valid_modes, true) && !ilLDAPServer::isAuthModeLDAP((string) $mode) && !ilSamlIdp::isAuthModeSaml((string) $mode)) {
114 continue;
115 }
116
117 $generalSettingsTpl->setCurrentBlock('auth_mode');
118
119 if (ilLDAPServer::isAuthModeLDAP((string) $mode)) {
121 $generalSettingsTpl->setVariable("AUTH_NAME", $server->getName());
122 $generalSettingsTpl->setVariable('AUTH_ACTIVE', $server->isActive() ? $icon_ok : $icon_not_ok);
123 } elseif (ilSamlIdp::isAuthModeSaml((string) $mode)) {
125 $generalSettingsTpl->setVariable('AUTH_NAME', $idp->getEntityId());
126 $generalSettingsTpl->setVariable('AUTH_ACTIVE', $idp->isActive() ? $icon_ok : $icon_not_ok);
127 } elseif ($mode === ilAuthUtils::AUTH_OPENID_CONNECT) {
128 $generalSettingsTpl->setVariable("AUTH_NAME", $this->lng->txt("auth_" . $mode_name));
129 $generalSettingsTpl->setVariable('AUTH_ACTIVE', ilOpenIdConnectSettings::getInstance()->getActive() ? $icon_ok : $icon_not_ok);
130 } else {
131 $generalSettingsTpl->setVariable("AUTH_NAME", $this->lng->txt("auth_" . $mode_name));
132 $generalSettingsTpl->setVariable('AUTH_ACTIVE', $this->ilias->getSetting($mode_name . '_active') || (int) $mode === ilAuthUtils::AUTH_LOCAL ? $icon_ok : $icon_not_ok);
133 }
134
135 $auth_cnt_mode = $auth_cnt[$mode_name] ?? 0;
136 if ($this->settings->get('auth_mode') === (string) $mode) {
137 $generalSettingsTpl->setVariable("AUTH_CHECKED", "checked=\"checked\"");
138 $auth_cnt_default = $auth_cnt["default"] ?? 0;
139 $generalSettingsTpl->setVariable(
140 "AUTH_USER_NUM",
141 ((int) $auth_cnt_mode + $auth_cnt_default) . " (" . $this->lng->txt("auth_per_default") .
142 ": " . $auth_cnt_default . ")"
143 );
144 } else {
145 $generalSettingsTpl->setVariable(
146 "AUTH_USER_NUM",
147 (int) $auth_cnt_mode
148 );
149 }
150 $generalSettingsTpl->setVariable("AUTH_ID", $mode_name);
151 $generalSettingsTpl->setVariable("AUTH_VAL", $mode);
152 $generalSettingsTpl->parseCurrentBlock();
153 }
154
155 $generalSettingsTpl->setVariable("TXT_CONFIGURE", $this->lng->txt("auth_configure"));
156
157 if ($this->rbac_system->checkAccess("write", $this->object->getRefId())) {
158 $generalSettingsTpl->setVariable("TXT_AUTH_REMARK", $this->lng->txt("auth_remark_non_local_auth"));
159 $generalSettingsTpl->setCurrentBlock('auth_mode_submit');
160 $generalSettingsTpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
161 $generalSettingsTpl->setVariable("CMD_SUBMIT", "setAuthMode");
162 $generalSettingsTpl->parseCurrentBlock();
163 }
164
165 // auth mode determinitation
166 if ($this->initAuthModeDetermination()) {
167 $generalSettingsTpl->setVariable('TABLE_AUTH_DETERMINATION', $this->form->getHTML());
168 }
169
170 // roles table
171 $generalSettingsTpl->setVariable(
172 "FORMACTION_ROLES",
173 $this->ctrl->getFormAction($this)
174 );
175 $generalSettingsTpl->setVariable("TXT_AUTH_ROLES", $this->lng->txt("auth_active_roles"));
176 $generalSettingsTpl->setVariable("TXT_ROLE", $this->lng->txt("obj_role"));
177 $generalSettingsTpl->setVariable("TXT_ROLE_AUTH_MODE", $this->lng->txt("auth_role_auth_mode"));
178 if ($this->rbac_system->checkAccess("write", $this->object->getRefId())) {
179 $generalSettingsTpl->setVariable("CMD_SUBMIT_ROLES", "updateAuthRoles");
180 $generalSettingsTpl->setVariable('BTN_SUBMIT_ROLES', $this->lng->txt('save'));
181 }
182
184
185 // auth mode selection
186 $active_auth_modes = ilAuthUtils::_getActiveAuthModes();
187
188 foreach ($reg_roles as $role) {
189 foreach ($active_auth_modes as $auth_name => $auth_key) {
190 // do not list auth modes with external login screen
191 // even not default, because it can easily be set to
192 // a non-working auth mode
193 if ($auth_name === "default" || $auth_name === "cas"
194 || $auth_name === 'saml'
195 || $auth_name === "shibboleth" || $auth_name === 'ldap'
196 || $auth_name === 'apache' || $auth_name === "ecs"
197 || $auth_name === "openid") {
198 continue;
199 }
200
201 $generalSettingsTpl->setCurrentBlock("auth_mode_selection");
202
203 if ($auth_name === 'default') {
204 $name = $this->lng->txt('auth_' . $auth_name) . " (" . $this->lng->txt('auth_' . ilAuthUtils::_getAuthModeName($auth_key)) . ")";
205 } elseif ($id = ilLDAPServer::getServerIdByAuthMode((string) $auth_key)) {
207 $name = $server->getName();
208 } elseif ($id = ilSamlIdp::getIdpIdByAuthMode((string) $auth_key)) {
210 $name = $idp->getEntityId();
211 } else {
212 $name = $this->lng->txt('auth_' . $auth_name);
213 }
214
215 $generalSettingsTpl->setVariable("AUTH_MODE_NAME", $name);
216
217 $generalSettingsTpl->setVariable("AUTH_MODE", $auth_name);
218
219 if ($role['auth_mode'] === $auth_name) {
220 $generalSettingsTpl->setVariable("SELECTED_AUTH_MODE", "selected=\"selected\"");
221 }
222
223 $generalSettingsTpl->parseCurrentBlock();
224 }
225
226 $generalSettingsTpl->setCurrentBlock("roles");
227 $generalSettingsTpl->setVariable("ROLE", $role['title']);
228 // r_ is add to the role id only for the dictOf transformation used later to parse the input
229 $generalSettingsTpl->setVariable("ROLE_ID", "r_" . $role['id']);
230 $generalSettingsTpl->parseCurrentBlock();
231 }
232
233 $this->tpl->setContent($generalSettingsTpl->get());
234 }
235
236
242 public function loginInfoObject(): void
243 {
244 if (!$this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
245 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
246 }
247
248 $this->tabs_gui->setTabActive("authentication_settings");
249 $this->setSubTabs("authSettings");
250 $this->tabs_gui->setSubTabActive("auth_login_editor");
251
252 $this->lng->loadLanguageModule("meta");
253
254 $this->tpl->addBlockFile(
255 "ADM_CONTENT",
256 "adm_content",
257 "tpl.auth_login_messages.html",
258 "Services/Authentication"
259 );
260 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
261 $this->tpl->setVariable("TXT_HEADLINE", $this->lng->txt("login_information"));
262 $this->tpl->setVariable("TXT_DESCRIPTION", $this->lng->txt("login_information_desc"));
263 $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
264 $this->tpl->setVariable('LOGIN_INFO', $this->form->getHTML());
265 }
266
267
268 public function cancelObject(): void
269 {
270 $this->ctrl->redirect($this, "authSettings");
271 }
272
273 public function setAuthModeObject(): void
274 {
275 if (!$this->rbac_system->checkAccess("write", $this->object->getRefId())) {
276 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
277 }
278 $this->logger->debug('auth mode available:' . $this->request_wrapper->has("auth_mode"));
279
280 if (!$this->http->wrapper()->post()->has("auth_mode")) {
281 $this->ilias->raiseError($this->lng->txt("auth_err_no_mode_selected"), $this->ilias->error_obj->MESSAGE);
282 }
283 $new_auth_mode = $this->http->wrapper()->post()->retrieve("auth_mode", $this->refinery->to()->string());
284 $this->logger->debug('auth mode:' . $new_auth_mode);
285 $current_auth_mode = $this->settings->get('auth_mode', '');
286 if ($new_auth_mode === $current_auth_mode) {
287 $this->tpl->setOnScreenMessage('info', $this->lng->txt("auth_mode") . ": " . $this->getAuthModeTitle() . " " . $this->lng->txt("auth_mode_not_changed"), true);
288 $this->ctrl->redirect($this, 'authSettings');
289 }
290
291 switch ((int) $new_auth_mode) {
293 break;
294
296
297 /*
298 if ($this->object->checkAuthLDAP() !== true)
299 {
300 ilUtil::sendInfo($this->lng->txt("auth_ldap_not_configured"),true);
301 ilUtil::redirect($this->getReturnLocation("authSettings",$this->ctrl->getLinkTarget($this,"editLDAP", "", false, false)));
302 }
303 */
304 break;
305
306 // @fix changed from AUTH_SHIB > is not defined
308 if ($this->object->checkAuthSHIB() !== true) {
309 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("auth_shib_not_configured"), true);
311 $this->getReturnLocation(
312 'authSettings',
313 $this->ctrl->getLinkTargetByClass(
314 ilAuthShibbolethSettingsGUI::class,
315 'settings',
316 '',
317 false,
318 false
319 )
320 )
321 );
322 }
323 break;
324
326 if ($this->object->checkAuthScript() !== true) {
327 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("auth_script_not_configured"), true);
328 ilUtil::redirect($this->getReturnLocation("authSettings", $this->ctrl->getLinkTarget($this, "editScript", "", false, false)));
329 }
330 break;
331 }
332
333 $this->ilias->setSetting("auth_mode", $new_auth_mode);
334
335 $this->tpl->setOnScreenMessage('success', $this->lng->txt("auth_default_mode_changed_to") . " " . $this->getAuthModeTitle(), true);
336 $this->ctrl->redirect($this, 'authSettings');
337 }
338
339 private function buildSOAPForm(
340 string $submit_action
341 ): \ILIAS\UI\Component\Input\Container\Form\Form {
342 // compose role list
343 $role_list = $this->rbac_review->getRolesByFilter(2, $this->object->getId());
344 $roles = [];
345
346 foreach ($role_list as $role) {
347 $roles[$role['obj_id']] = $role['title'];
348 }
349
350 $active = $this->ui->input()->field()
351 ->checkbox($this->lng->txt("active"))
352 ->withValue((bool) $this->settings->get("soap_auth_active", ""));
353
354 $server = $this->ui->input()->field()->text(
355 $this->lng->txt("server"),
356 $this->lng->txt("auth_soap_server_desc")
357 )->withRequired(true)
358 ->withMaxLength(256)
359 ->withValue($this->settings->get("soap_auth_server", ""));
360
361 $port = $this->ui->input()->field()->numeric(
362 $this->lng->txt("port"),
363 $this->lng->txt("auth_soap_port_desc")
364 )->withAdditionalTransformation($this->refinery->int()->isGreaterThan(0))
365 ->withAdditionalTransformation(
366 $this->refinery->int()->isLessThan(65536)
367 )->withValue((int) $this->settings->get("soap_auth_port", "0"));
368
369 $use_https = $this->ui->input()->field()->checkbox($this->lng->txt("auth_soap_use_https"))
370 ->withValue((bool) $this->settings->get("soap_auth_use_https", ""));
371
372 $uri = $this->ui->input()->field()->text(
373 $this->lng->txt("uri"),
374 $this->lng->txt("auth_soap_uri_desc")
375 )->withMaxLength(256)
376 ->withValue($this->settings->get("soap_auth_uri", ""));
377
378 $namespace = $this->ui->input()->field()->text(
379 $this->lng->txt("auth_soap_namespace"),
380 $this->lng->txt("auth_soap_namespace_desc")
381 )->withMaxLength(256)
382 ->withValue($this->settings->get("soap_auth_namespace", ""));
383
384 $dotnet = $this->ui->input()->field()->checkbox($this->lng->txt("auth_soap_use_dotnet"))
385 ->withValue((bool) $this->settings->get("soap_auth_use_dotnet", ""));
386
387 $createuser = $this->ui->input()->field()->checkbox(
388 $this->lng->txt("auth_create_users"),
389 $this->lng->txt("auth_soap_create_users_desc")
390 )->withValue((bool) $this->settings->get("soap_auth_create_users", ""));
391
392 $sendmail = $this->ui->input()->field()->checkbox(
393 $this->lng->txt("user_send_new_account_mail"),
394 $this->lng->txt("auth_new_account_mail_desc")
395 )->withValue((bool) $this->settings->get("soap_auth_account_mail", ""));
396
397 $defaultrole = $this->ui->input()->field()->select(
398 $this->lng->txt("auth_user_default_role"),
399 $roles,
400 $this->lng->txt("auth_soap_user_default_role_desc")
401 )->withValue($this->settings->get("soap_auth_user_default_role", "4"))
402 ->withAdditionalTransformation($this->refinery->int()->isGreaterThan(0));
403
404 $allowlocal = $this->ui->input()->field()->checkbox(
405 $this->lng->txt("auth_allow_local"),
406 $this->lng->txt("auth_soap_allow_local_desc")
407 )->withValue((bool) $this->settings->get("soap_auth_user_default_role", ""));
408
409 $form = $this->ui->input()->container()->form()->standard(
410 $submit_action,
411 [ "active" => $active,
412 "server" => $server,
413 "port" => $port,
414 "use_https" => $use_https,
415 "uri" => $uri,
416 "namespace" => $namespace,
417 "dotnet" => $dotnet,
418 "createuser" => $createuser,
419 "sendmail" => $sendmail,
420 "defaultrole" => $defaultrole,
421 "allowlocal" => $allowlocal
422 ]
423 );
424 return $form;
425 }
426
427 private function buildSOAPTestForm(
428 string $submit_action
429 ): \ILIAS\UI\Component\Input\Container\Form\Form {
430 $ext_uid = $this->ui->input()->field()->text(
431 "ext_uid"
432 );
433 $soap_pw = $this->ui->input()->field()->text(
434 "soap_pw"
435 );
436 $new_user = $this->ui->input()->field()
437 ->checkbox("new_user");
438 $form = $this->ui->input()->container()->form()->standard(
439 $submit_action,
440 [ "ext_uid" => $ext_uid,
441 "soap_pw" => $soap_pw,
442 "new_user" => $new_user
443 ]
444 )->withSubmitCaption("Send");
445 return $form;
446 }
447
448
452 public function editSOAPObject(): void
453 {
454 if (!$this->rbac_system->checkAccess("read", $this->object->getRefId())) {
455 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
456 }
457
458 $soap_form = $this->buildSOAPForm($this->ctrl->getFormAction($this, "saveSOAP"));
459 $test_form = $this->buildSOAPTestForm($this->ctrl->getFormAction($this, "testSoapAuthConnection"));
460
461 $this->tabs_gui->setTabActive('auth_soap');
462 $panel = $this->ui->panel()->standard("SOAP", [$soap_form, $test_form]);
463 $this->tpl->setContent($this->renderer->render($panel));
464 }
465
466 public function testSoapAuthConnectionObject(): void
467 {
468 if (!$this->rbac_system->checkAccess("read", $this->object->getRefId())) {
469 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
470 }
471
472
473 $soap_form = $this->buildSOAPForm($this->ctrl->getFormAction($this, "saveSOAP"));
474 $test_form = $this->buildSOAPTestForm($this->ctrl->getFormAction($this, "testSoapAuthConnection"));
475 $panel_content = [$soap_form, $test_form];
476 if ($this->request->getMethod() == "POST") {
477 $test_form = $test_form->withRequest($this->request);
478 $result = $test_form->getData();
479 if (!is_null($result)) {
480 $panel_content[] = $this->ui->legacy(
481 ilSOAPAuth::testConnection($result["ext_uid"], $result["soap_pw"], $result["new_user"])
482 );
483 }
484 }
485 $this->tabs_gui->setTabActive('auth_soap');
486 $panel = $this->ui->panel()->standard("SOAP", $panel_content);
487 $this->tpl->setContent($this->renderer->render($panel));
488 }
489
493 public function saveSOAPObject(): void
494 {
495 if (!$this->rbac_system->checkAccess("write", $this->object->getRefId())) {
496 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
497 }
498
499 $soap_form = $this->buildSOAPForm($this->ctrl->getFormAction($this, "saveSOAP"));
500 $test_form = $this->buildSOAPTestForm($this->ctrl->getFormAction($this, "testSoapAuthConnection"));
501 if ($this->request->getMethod() === "POST") {
502 $soap_form = $soap_form->withRequest($this->request);
503 $result = $soap_form->getData();
504 if (!is_null($result)) {
505 $this->settings->set("soap_auth_active", (string) $result["active"]);
506 $this->settings->set("soap_auth_server", $result["server"]);
507 $this->settings->set("soap_auth_port", (string) $result["port"]);
508 $this->settings->set("soap_auth_use_https", (string) $result["use_https"]);
509 $this->settings->set("soap_auth_uri", $result["uri"]);
510 $this->settings->set("soap_auth_namespace", $result["namespace"]);
511 $this->settings->set("soap_auth_use_dotnet", (string) $result["dotnet"]);
512 $this->settings->set("soap_auth_create_users", (string) $result["createuser"]);
513 $this->settings->set("soap_auth_account_mail", (string) $result["sendmail"]);
514 $this->settings->set("soap_auth_user_default_role", (string) $result["defaultrole"]);
515 $this->settings->set("soap_auth_allow_local", (string) $result["allowlocal"]);
516
517 $this->tpl->setOnScreenMessage('success', $this->lng->txt("auth_soap_settings_saved"), true);
518 $this->logger->info("data" . print_r($result, true));
519 $this->ctrl->redirect($this, 'editSOAP');
520 }
521 }
522
523 $this->tabs_gui->setTabActive('auth_soap');
524 $panel = $this->ui->panel()->standard("SOAP", [$soap_form, $test_form]);
525 $this->tpl->setContent($this->renderer->render($panel));
526 }
527
531 public function editScriptObject(): void
532 {
533 if (!$this->rbac_system->checkAccess("write", $this->object->getRefId())) {
534 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
535 }
536
537 if ($_SESSION["error_post_vars"]) {
538 $this->tpl->setVariable("AUTH_SCRIPT_NAME", $_SESSION["error_post_vars"]["auth_script"]["name"]);
539 } else {
540 // set already saved data
541 $settings = $this->ilias->getAllSettings();
542
543 $this->tpl->setVariable("AUTH_SCRIPT_NAME", $settings["auth_script_name"]);
544 }
545
546 $this->tabs_gui->setTabActive('auth_script');
547
548 $this->tpl->addBlockFile(
549 "ADM_CONTENT",
550 "adm_content",
551 "tpl.auth_script.html",
552 "Services/Authentication"
553 );
554
555 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
556 $this->tpl->setVariable("COLSPAN", 3);
557 $this->tpl->setVariable("TXT_AUTH_SCRIPT_TITLE", $this->lng->txt("auth_script_configure"));
558 $this->tpl->setVariable("TXT_OPTIONS", $this->lng->txt("options"));
559 $this->tpl->setVariable("TXT_AUTH_SCRIPT_NAME", $this->lng->txt("auth_script_name"));
560
561 $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
562 $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
563 $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
564 $this->tpl->setVariable("CMD_SUBMIT", "saveScript");
565 }
566
570 public function saveScriptObject(): void
571 {
572 // validate required data
573 if (!$_POST["auth_script"]["name"]) {
574 $this->ilias->raiseError($this->lng->txt("fill_out_all_required_fields"), $this->ilias->error_obj->MESSAGE);
575 }
576
577 // validate script url
578 /*
579 if (( TODO ,$_POST["ldap"]["server"])) == false)
580 {
581 $this->ilias->raiseError($this->lng->txt("err_invalid_server"),$this->ilias->error_obj->MESSAGE);
582 }*/
583
584 // TODO: check connection to server
585
586 // all ok. save settings and activate auth by external script
587 $this->ilias->setSetting("auth_script_name", $_POST["auth_script"]["name"]);
588 $this->ilias->setSetting("auth_mode", (string) ilAuthUtils::AUTH_SCRIPT);
589
590 $this->tpl->setOnScreenMessage('success', $this->lng->txt("auth_mode_changed_to") . " " . $this->getAuthModeTitle(), true);
591 $this->ctrl->redirect($this, 'editScript');
592 }
593
594
600 public function getAuthModeTitle(): string
601 {
602 switch ($this->ilias->getSetting("auth_mode")) {
604 return $this->lng->txt("auth_local");
605 break;
606
608 return $this->lng->txt("auth_ldap");
609 break;
610
612 return $this->lng->txt("auth_shib");
613 break;
614
616 return $this->lng->txt("auth_saml");
617 break;
618
619
621 return $this->lng->txt("auth_script");
622 break;
623
625 return $this->lng->txt("auth_apache");
626 break;
627
628 default:
629 return $this->lng->txt("unknown");
630 break;
631 }
632 }
633
634 public function updateAuthRolesObject(): void
635 {
636 if (!$this->rbac_system->checkAccess("write", $this->object->getRefId())) {
637 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
638 }
639 if (!$this->http->wrapper()->post()->has("Fobject")) {
640 $this->ilias->raiseError($this->lng->txt("auth_err_no_mode_selected"), $this->ilias->error_obj->MESSAGE);
641 }
642 $f_object_unconverted = $this->http->wrapper()->post()->retrieve(
643 "Fobject",
644 $this->refinery->to()->dictOf($this->refinery->to()->string())
645 );
646 // remove the r_ from the role id. It is only added for the dictOf transformation
647 $f_object = [];
648 foreach ($f_object_unconverted as $role_id => $auth_mode) {
649 $f_object[substr($role_id, 2)] = $auth_mode;
650 }
652
653 $this->tpl->setOnScreenMessage('success', $this->lng->txt("auth_mode_roles_changed"), true);
654 $this->ctrl->redirect($this, 'authSettings');
655 }
656
660 protected function initAuthModeDetermination(): bool
661 {
662 if (isset($this->form) && is_object($this->form)) {
663 return true;
664 }
665
666 $this->form = new ilPropertyFormGUI();
667 $this->form->setFormAction($this->ctrl->getFormAction($this));
668 $this->form->setTableWidth('100%');
669 $this->form->setTitle($this->lng->txt('auth_auth_settings'));
670
671 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
672 $this->form->addCommandButton('updateAuthModeDetermination', $this->lng->txt('save'));
673 }
674
676 if ($det->getCountActiveAuthModes() <= 1) {
677 return false;
678 }
679
680 $header = new ilFormSectionHeaderGUI();
681 $header->setTitle($this->lng->txt('auth_auth_mode_determination'));
682 $this->form->addItem($header);
683
684 $kind = new ilRadioGroupInputGUI($this->lng->txt('auth_kind_determination'), 'kind');
685 $kind->setInfo($this->lng->txt('auth_mode_determination_info'));
686 $kind->setValue((string) $det->getKind());
687 $kind->setRequired(true);
688
689 $option_user = new ilRadioOption($this->lng->txt('auth_by_user'), "0");
690 $kind->addOption($option_user);
691
692 $option_determination = new ilRadioOption($this->lng->txt('auth_automatic'), "1");
693
694 $auth_sequenced = $det->getAuthModeSequence();
695 $counter = 1;
696 $text = "";
697 foreach ($auth_sequenced as $auth_mode) {
698 switch ($auth_mode) {
699 case ilLDAPServer::isAuthModeLDAP((string) $auth_mode):
700 $auth_id = ilLDAPServer::getServerIdByAuthMode($auth_mode);
702 $text = $server->getName();
703 break;
705 $text = $this->lng->txt('auth_local');
706 break;
708 $text = $this->lng->txt('auth_soap');
709 break;
711 $text = $this->lng->txt('auth_apache');
712 break;
713 default:
714 foreach (ilAuthUtils::getAuthPlugins() as $pl) {
715 $option = $pl->getMultipleAuthModeOptions($auth_mode);
716 $text = $option[$auth_mode]['txt'];
717 }
718 break;
719 }
720
721 $pos = new ilTextInputGUI($text, 'position[m' . $auth_mode . ']');
722 $pos->setValue($counter++);
723 $pos->setSize(1);
724 $pos->setMaxLength(1);
725 $option_determination->addSubItem($pos);
726 }
727 $kind->addOption($option_determination);
728 $this->form->addItem($kind);
729 return true;
730 }
731
735 public function updateAuthModeDeterminationObject(): void
736 {
737 if (!$this->rbac_system->checkAccess("write", $this->object->getRefId())) {
738 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
739 }
740
741 if (!$this->http->wrapper()->post()->has("kind")) {
742 $this->ilias->raiseError($this->lng->txt("auth_err_no_mode_selected"), $this->ilias->error_obj->MESSAGE);
743 }
744 $kind = $this->http->wrapper()->post()->retrieve("kind", $this->refinery->kindlyTo()->int());
745 if ($kind === ilAuthModeDetermination::TYPE_AUTOMATIC && !$this->http->wrapper()->post()->has("position")) {
746 $this->ilias->raiseError($this->lng->txt("auth_err_no_mode_selected"), $this->ilias->error_obj->MESSAGE);
747 }
748
750
751 $det->setKind($kind);
753 $pos = $this->http->wrapper()->post()->retrieve(
754 "position",
755 $this->refinery->to()->dictOf($this->refinery->kindlyTo()->int())
756 );
757 $this->logger->debug('pos mode:' . print_r($pos, true));
758 asort($pos, SORT_NUMERIC);
759 $this->logger->debug('pos mode:' . print_r($pos, true));
760 $counter = 0;
761 $position = [];
762 foreach (array_keys($pos) as $auth_mode) {
763 $position[$counter++] = substr($auth_mode, 1);
764 }
765 $this->logger->debug('position mode:' . print_r($position, true));
766 $det->setAuthModeSequence($position);
767 }
768 $det->save();
769
770 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'));
771 $this->ctrl->redirect($this, 'authSettings');
772 }
773
777 public function executeCommand(): void
778 {
779 $next_class = $this->ctrl->getNextClass($this);
780 $cmd = $this->ctrl->getCmd();
781 $this->prepareOutput();
782
783 if (!$this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
784 $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->WARNING);
785 }
786
787 switch ($next_class) {
788 case 'ilopenidconnectsettingsgui':
789
790 $this->tabs_gui->activateTab('auth_oidconnect');
791
792 $oid = new ilOpenIdConnectSettingsGUI($this->object->getRefId());
793 $this->ctrl->forwardCommand($oid);
794 break;
795
796 case 'ilsamlsettingsgui':
797 $this->tabs_gui->setTabActive('auth_saml');
798
799 $os = new ilSamlSettingsGUI($this->object->getRefId());
800 $this->ctrl->forwardCommand($os);
801 break;
802
803 case 'ilregistrationsettingsgui':
804
805 // Enable tabs
806 $this->tabs_gui->setTabActive('registration_settings');
807 $registration_gui = new ilRegistrationSettingsGUI();
808 $this->ctrl->forwardCommand($registration_gui);
809 break;
810
811 case 'ilpermissiongui':
812
813 // Enable tabs
814 $this->tabs_gui->setTabActive('perm_settings');
815
816 $perm_gui = new ilPermissionGUI($this);
817 $this->ctrl->forwardCommand($perm_gui);
818 break;
819
820 case 'illdapsettingsgui':
821
822 // Enable Tabs
823 $this->tabs_gui->setTabActive('auth_ldap');
824
825 $ldap_settings_gui = new ilLDAPSettingsGUI($this->object->getRefId());
826 $this->ctrl->forwardCommand($ldap_settings_gui);
827 break;
828
829 case 'ilauthshibbolethsettingsgui':
830
831 $this->tabs_gui->setTabActive('auth_shib');
832 $shib_settings_gui = new ilAuthShibbolethSettingsGUI($this->object->getRefId());
833 $this->ctrl->forwardCommand($shib_settings_gui);
834 break;
835
836 case 'ilcassettingsgui':
837
838 $this->tabs_gui->setTabActive('auth_cas');
839 $cas_settings = new ilCASSettingsGUI($this->object->getRefId());
840 $this->ctrl->forwardCommand($cas_settings);
841 break;
842
843 case 'ilauthloginpageeditorgui':
844
845 $this->setSubTabs("authSettings");
846 $this->tabs_gui->setTabActive('authentication_settings');
847 $this->tabs_gui->setSubTabActive("auth_login_editor");
848
849 $lpe = new ilAuthLoginPageEditorGUI($this->object->getRefId());
850 $this->ctrl->forwardCommand($lpe);
851 break;
852
853 default:
854 if (!$cmd) {
855 $cmd = "authSettings";
856 }
857 $cmd .= "Object";
858 $this->$cmd();
859
860 break;
861 }
862 }
863
864 public function getAdminTabs(): void
865 {
866 $this->getTabs();
867 }
868
872 protected function getTabs(): void
873 {
874 $this->ctrl->setParameter($this, "ref_id", $this->object->getRefId());
875
876 if ($this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
877 $this->tabs_gui->addTarget(
878 "authentication_settings",
879 $this->ctrl->getLinkTarget($this, "authSettings"),
880 "",
881 "",
882 ""
883 );
884
885 $this->tabs_gui->addTarget(
886 'registration_settings',
887 $this->ctrl->getLinkTargetByClass('ilregistrationsettingsgui', 'view')
888 );
889
890 $this->tabs_gui->addTarget(
891 "auth_ldap",
892 $this->ctrl->getLinkTargetByClass('illdapsettingsgui', 'serverList'),
893 "",
894 "",
895 ""
896 );
897
898
899 #$this->tabs_gui->addTarget("auth_ldap", $this->ctrl->getLinkTarget($this, "editLDAP"),
900 # "", "", "");
901
902 $this->tabs_gui->addTarget('auth_shib', $this->ctrl->getLinkTargetByClass('ilauthshibbolethsettingsgui', 'settings'));
903
904 $this->tabs_gui->addTarget(
905 'auth_cas',
906 $this->ctrl->getLinkTargetByClass('ilcassettingsgui', 'settings')
907 );
908
909 $this->tabs_gui->addTarget(
910 "auth_soap",
911 $this->ctrl->getLinkTarget($this, "editSOAP"),
912 "",
913 "",
914 ""
915 );
916
917 $this->tabs_gui->addTarget(
918 "apache_auth_settings",
919 $this->ctrl->getLinkTarget($this, 'apacheAuthSettings'),
920 "",
921 "",
922 ""
923 );
924
925 $this->tabs_gui->addTarget(
926 'auth_saml',
927 $this->ctrl->getLinkTargetByClass('ilsamlsettingsgui', ilSamlSettingsGUI::DEFAULT_CMD),
928 '',
929 '',
930 ''
931 );
932
933 $this->tabs_gui->addTab(
934 'auth_oidconnect',
935 $this->lng->txt('auth_oidconnect'),
936 $this->ctrl->getLinkTargetByClass('ilopenidconnectsettingsgui')
937 );
938 }
939
940 if ($this->rbac_system->checkAccess('edit_permission', $this->object->getRefId())) {
941 $this->tabs_gui->addTarget(
942 "perm_settings",
943 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
944 array("perm","info","owner"),
945 'ilpermissiongui'
946 );
947 }
948 }
949
953 public function setSubTabs(string $a_tab): void
954 {
955 $this->lng->loadLanguageModule('auth');
956
957 if ($a_tab === 'authSettings') {
958 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
959 $this->tabs_gui->addSubTabTarget(
960 "auth_settings",
961 $this->ctrl->getLinkTarget($this, 'authSettings'),
962 ""
963 );
964 }
965 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
966 $this->tabs_gui->addSubTabTarget(
967 'auth_login_editor',
968 $this->ctrl->getLinkTargetByClass('ilauthloginpageeditorgui', ''),
969 ''
970 );
971 }
972 }
973 }
974
975
976 public function apacheAuthSettingsObject(?ilPropertyFormGUI $form = null): void
977 {
978 $this->tabs_gui->setTabActive("apache_auth_settings");
979
980 if (null === $form) {
981 $form = $this->getApacheAuthSettingsForm();
982
983 $settings = new ilSetting('apache_auth');
984 $settingsMap = $settings->getAll();
985
986 $path = ILIAS_DATA_DIR . '/' . CLIENT_ID . '/apache_auth_allowed_domains.txt';
987 if (file_exists($path) && is_readable($path)) {
988 $settingsMap['apache_auth_domains'] = file_get_contents($path);
989 }
990
991 $form->setValuesByArray($settingsMap);
992 }
993 $this->tpl->setVariable('ADM_CONTENT', $form->getHtml());
994 }
995
996 public function saveApacheSettingsObject(): void
997 {
998 $form = $this->getApacheAuthSettingsForm();
999 $form->setValuesByPost();
1000 if ($form->checkInput()) {
1001 $settings = new ilSetting('apache_auth');
1002 $fields = [
1003 'apache_auth_indicator_name', 'apache_auth_indicator_value',
1004 'apache_enable_auth', 'apache_enable_local', 'apache_local_autocreate',
1005 'apache_enable_ldap', 'apache_auth_username_config_type',
1006 'apache_auth_username_direct_mapping_fieldname',
1007 'apache_default_role', 'apache_auth_target_override_login_page',
1008 'apache_auth_enable_override_login_page',
1009 'apache_auth_authenticate_on_login_page',
1010 'apache_ldap_sid'
1011 ];
1012
1013 foreach ($fields as $field) {
1014 $settings->set($field, (string) $form->getInput($field));
1015 }
1016
1017 if ($form->getInput('apache_enable_auth')) {
1018 $this->ilias->setSetting('apache_active', '1');
1019 } else {
1020 $this->ilias->setSetting('apache_active', '0');
1021 global $DIC;
1022
1023 $ilSetting = $DIC['ilSetting'];
1024 if ((int) $ilSetting->get("auth_mode", '0') === ilAuthUtils::AUTH_APACHE) {
1025 $ilSetting->set("auth_mode", (string) ilAuthUtils::AUTH_LOCAL);
1026 }
1027 }
1028
1029 $allowedDomains = $this->validateApacheAuthAllowedDomains((string) $form->getInput('apache_auth_domains'));
1030 file_put_contents(ILIAS_DATA_DIR . '/' . CLIENT_ID . '/apache_auth_allowed_domains.txt', $allowedDomains);
1031
1032 $this->tpl->setOnScreenMessage('success', $this->lng->txt('apache_settings_changed_success'), true);
1033 $this->ctrl->redirect($this, 'apacheAuthSettings');
1034 } else {
1035 $this->apacheAuthSettingsObject($form);
1036 }
1037 }
1038
1040 {
1041 $form = new ilPropertyFormGUI();
1042 $form->setFormAction($this->ctrl->getFormAction($this));
1043 $form->setTitle($this->lng->txt('apache_settings'));
1044
1045 $chb_enabled = new ilCheckboxInputGUI($this->lng->txt('apache_enable_auth'), 'apache_enable_auth');
1046 $chb_enabled->setValue('1');
1047 $form->addItem($chb_enabled);
1048
1049 $chb_local_create_account = new ilCheckboxInputGUI($this->lng->txt('apache_autocreate'), 'apache_local_autocreate');
1050 $chb_local_create_account->setValue('1');
1051 $chb_enabled->addSubitem($chb_local_create_account);
1052
1053 $roles = $this->rbac_review->getGlobalRolesArray();
1054 $select = new ilSelectInputGUI($this->lng->txt('apache_default_role'), 'apache_default_role');
1055 $roleOptions = [];
1056 foreach ($roles as $role) {
1057 $roleOptions[$role['obj_id']] = ilObject::_lookupTitle($role['obj_id']);
1058 }
1059 $select->setOptions($roleOptions);
1060 $select->setValue(4);
1061
1062 $chb_local_create_account->addSubitem($select);
1063
1064 $chb_local = new ilCheckboxInputGUI($this->lng->txt('apache_enable_local'), 'apache_enable_local');
1065 $chb_local->setValue('1');
1066 $form->addItem($chb_local);
1067
1068 $chb_ldap = new ilCheckboxInputGUI($this->lng->txt('apache_enable_ldap'), 'apache_enable_ldap');
1069 $chb_local->setValue('1');
1070
1071 $chb_ldap->setInfo($this->lng->txt('apache_ldap_hint_ldap_must_be_configured'));
1072
1073 $this->lng->loadLanguageModule('auth');
1074
1075 $servers = ilLDAPServer::getServerIds();
1076 if (count($servers)) {
1077 $ldap_server_select = new ilSelectInputGUI($this->lng->txt('auth_ldap_server_ds'), 'apache_ldap_sid');
1078 $options[0] = $this->lng->txt('select_one');
1079 foreach ($servers as $server_id) {
1080 $ldap_server = new ilLDAPServer($server_id);
1081 $options[$server_id] = $ldap_server->getName();
1082 }
1083 $ldap_server_select->setOptions($options);
1084 $ldap_server_select->setRequired(true);
1085
1087 $ldap_server_select->setValue($ds);
1088
1089 $chb_ldap->addSubItem($ldap_server_select);
1090 }
1091 $form->addItem($chb_ldap);
1092
1093 $txt = new ilTextInputGUI($this->lng->txt('apache_auth_indicator_name'), 'apache_auth_indicator_name');
1094 $txt->setRequired(true);
1095 $form->addItem($txt);
1096
1097 $txt = new ilTextInputGUI($this->lng->txt('apache_auth_indicator_value'), 'apache_auth_indicator_value');
1098 $txt->setRequired(true);
1099 $form->addItem($txt);
1100
1101 $chb = new ilCheckboxInputGUI($this->lng->txt('apache_auth_enable_override_login'), 'apache_auth_enable_override_login_page');
1102 $chb->setValue('1');
1103 $form->addItem($chb);
1104
1105 $txt = new ilTextInputGUI($this->lng->txt('apache_auth_target_override_login'), 'apache_auth_target_override_login_page');
1106 $txt->setRequired(true);
1107 $chb->addSubItem($txt);
1108
1109 $chb = new ilCheckboxInputGUI($this->lng->txt('apache_auth_authenticate_on_login_page'), 'apache_auth_authenticate_on_login_page');
1110 $chb->setValue('1');
1111 $form->addItem($chb);
1112
1113 $sec = new ilFormSectionHeaderGUI();
1114 $sec->setTitle($this->lng->txt('apache_auth_username_config'));
1115 $form->addItem($sec);
1116
1117 $rag = new ilRadioGroupInputGUI($this->lng->txt('apache_auth_username_config_type'), 'apache_auth_username_config_type');
1118 $form->addItem($rag);
1119
1120 $rao = new ilRadioOption($this->lng->txt('apache_auth_username_direct_mapping'), "1");
1121 $rag->addOption($rao);
1122
1123 $txt = new ilTextInputGUI($this->lng->txt('apache_auth_username_direct_mapping_fieldname'), 'apache_auth_username_direct_mapping_fieldname');
1124 //$txt->setRequired(true);
1125 $rao->addSubItem($txt);
1126
1127 $rao = new ilRadioOption($this->lng->txt('apache_auth_username_extended_mapping'), "2");
1128 $rao->setDisabled(true);
1129 $rag->addOption($rao);
1130
1131 $rao = new ilRadioOption($this->lng->txt('apache_auth_username_by_function'), "3");
1132 $rag->addOption($rao);
1133
1134 $sec = new ilFormSectionHeaderGUI();
1135 $sec->setTitle($this->lng->txt('apache_auth_security'));
1136 $form->addItem($sec);
1137
1138 $txt = new ilTextAreaInputGUI($this->lng->txt('apache_auth_domains'), 'apache_auth_domains');
1139 $txt->setInfo($this->lng->txt('apache_auth_domains_description'));
1140
1141 $form->addItem($txt);
1142
1143 if ($this->access->checkAccess('write', '', $this->ref_id)) {
1144 $form->addCommandButton('saveApacheSettings', $this->lng->txt('save'));
1145 }
1146 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
1147
1148 return $form;
1149 }
1150
1151 private function validateApacheAuthAllowedDomains(string $text): string
1152 {
1153 return implode("\n", preg_split("/[\r\n]+/", $text));
1154 }
1155
1156 public function registrationSettingsObject(): void
1157 {
1158 $registration_gui = new ilRegistrationSettingsGUI();
1159 $this->ctrl->redirect($registration_gui);
1160 }
1161}
error(string $a_errmsg)
Login page editor settings GUI ILIAS page editor or richtext editor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getActiveAuthModes()
const AUTH_OPENID_CONNECT
static getAuthPlugins()
Get active enabled auth plugins.
static _getAllAuthModes()
static _getAuthModeName($a_auth_key)
This class represents a checkbox property in a property form.
setFormAction(string $a_formaction)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceByServerId(int $a_server_id)
Get instance by server id.
static getDataSource(int $a_auth_mode)
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.
static getServerIds()
Get all server ids.
Component logger with individual log levels by component id.
getAdminTabs()
administration tabs show only permissions and trash folder
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
apacheAuthSettingsObject(?ilPropertyFormGUI $form=null)
saveScriptObject()
validates all input data, save them to database if correct and active chosen auth mode
updateAuthModeDeterminationObject()
update auth mode determination
loginInfoObject()
displays login information of all installed languages
buildSOAPTestForm(string $submit_action)
getAuthModeTitle()
get the title of auth mode
editSOAPObject()
Configure soap settings.
cancelObject()
cancel action and go back to previous page
authSettingsObject()
display settings menu
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"
initAuthModeDetermination()
init auth mode determinitation form
saveSOAPObject()
validates all input data, save them to database if correct and active chosen auth mode
setSubTabs(string $a_tab)
set sub tabs
buildSOAPForm(string $submit_action)
editScriptObject()
Configure Custom settings.
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.
getReturnLocation(string $cmd, string $default_location="")
Get return location for command (command is method name without "Object", e.g.
static _lookupTitle(int $obj_id)
Class ilOpenIdConnectSettingsGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a property form user interface.
setValuesByArray(array $a_values, bool $a_restrict_to_value_keys=false)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
This class represents a property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilRegistrationSettingsGUI.
static testConnection(string $a_ext_uid, string $a_soap_pw, bool $a_new_user)
static getIdpIdByAuthMode(string $a_auth_mode)
static isAuthModeSaml(string $a_auth_mode)
static getInstanceByIdpId(int $a_idp_id)
Class ilSamlSettingsGUI.
This class represents a selection list property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static redirect(string $a_script)
const CLIENT_ID
Definition: constants.php:41
const ILIAS_DATA_DIR
Definition: constants.php:44
$soap_pw
$ext_uid
if($err=$client->getError()) $namespace
$new_user
$server
$txt
Definition: error.php:13
global $DIC
Definition: feed.php:28
if(isset($_FILES['img_file']) &&is_array($_FILES['img_file'])) $panel
Definition: imgupload.php:198
This is how the factory for UI elements looks.
Definition: Factory.php:38
An entity that renders components to a string output.
Definition: Renderer.php:31
$path
Definition: ltiservices.php:32
if($format !==null) $name
Definition: metadata.php:247
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
form( $class_path, string $cmd)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.
Class Factory.
header include for all ilias files.
global $ilSetting
Definition: privfeed.php:17