19 declare(strict_types=1);
72 $this->
ctrl = $DIC->ctrl();
73 $this->tabs_gui = $DIC->tabs();
74 $this->
lng = $DIC->language();
75 $this->
lng->loadLanguageModule(
'ldap');
76 $this->ilErr = $DIC[
'ilErr'];
78 $this->component_repository = $DIC[
"component.repository"];
79 $this->rbacReview = $DIC->rbac()->review();
80 $this->rbacSystem = $DIC->rbac()->system();
81 $this->
toolbar = $DIC->toolbar();
82 $this->main_tpl = $DIC->ui()->mainTemplate();
84 $this->tpl = $DIC->ui()->mainTemplate();
86 if ($this->
ctrl->getCmd() !==
"addServerSettings") {
87 $this->
ctrl->saveParameter($this,
'ldap_server_id');
90 $http_wrapper = $DIC->http()->wrapper();
91 $is_post_request = $DIC->http()->request()->getMethod() ===
"POST";
93 if ($http_wrapper->query()->has(
"rule_id")) {
94 $this->rule_id = $http_wrapper->query()->retrieve(
99 if ($http_wrapper->query()->has(
"ldap_server_id")) {
100 $this->ldap_server_id = $http_wrapper->query()->retrieve(
105 if ($http_wrapper->query()->has(
"mapping_id")) {
106 $this->mapping_id = $http_wrapper->query()->retrieve(
111 if ($is_post_request) {
112 if ($http_wrapper->post()->has(
'rule_ids')) {
113 $this->rule_ids = $http_wrapper->post()->retrieve(
118 if ($http_wrapper->post()->has(
'role_id')) {
119 $this->role_id = $http_wrapper->post()->retrieve(
124 if ($http_wrapper->post()->has(
'mappings')) {
125 $this->mappings = $http_wrapper->post()->retrieve(
130 if ($http_wrapper->post()->has(
'server_ids')) {
131 $this->server_ids = $http_wrapper->post()->retrieve(
136 if ($http_wrapper->post()->has(
'mapping_template')) {
137 $this->mapping_template = $http_wrapper->post()->retrieve(
142 if ($http_wrapper->post()->has(
'role_bind_user')) {
148 if ($http_wrapper->post()->has(
'role_bind_pass')) {
154 if ($http_wrapper->post()->has(
'role_sync_active')) {
155 $this->role_sync_active = $http_wrapper->post()->retrieve(
161 if ($http_wrapper->post()->has(
$key .
'_value')) {
165 )), $http_wrapper->post()->has(
$key .
'_update')];
167 $this->attribute_mappings[
$key] = [
"",
false];
172 $this->ref_id = $a_auth_ref_id;
183 $next_class = $this->
ctrl->getNextClass($this);
184 $cmd = $this->
ctrl->getCmd();
186 if ($cmd !==
"serverList" && !$this->rbacSystem->checkAccess(
"visible,read", $this->ref_id)) {
187 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_perm_write'),
true);
188 $this->
ctrl->redirect($this,
"serverList");
190 switch ($next_class) {
203 if (!$this->
ilAccess->checkAccess($a_permission,
'', $this->ref_id)) {
204 $this->ilErr->raiseError($this->
lng->txt(
'msg_no_perm_read'), $this->ilErr->WARNING);
219 $keys[] =
'udf_' . $definition[
'field_id'];
239 $this->tabs_gui->activateTab(
'role_assignments');
241 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ldap_role_assignments.html',
'Services/LDAP');
245 $this->tpl->setVariable(
'NEW_ASSIGNMENT_TBL', $this->
form->getHTML());
250 $table_gui->setTitle($this->
lng->txt(
"ldap_tbl_role_ass"));
251 $table_gui->parse($rules);
252 $table_gui->addMultiCommand(
"confirmDeleteRules", $this->
lng->txt(
"delete"));
253 $table_gui->setSelectAllCheckbox(
"rule_id");
254 $this->tpl->setVariable(
'RULES_TBL', $table_gui->getHTML());
264 if (!$this->rule_id) {
265 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
270 $this->tabs_gui->activateTab(
'role_assignments');
272 $this->
ctrl->saveParameter($this,
'rule_id');
278 $this->tpl->setContent($this->
form->getHTML());
287 $role_id = $this->role_mapping_rule->getRoleId();
288 if ($this->rbacReview->isGlobalRole($role_id)) {
289 $val[
'role_name'] = 0;
292 $val[
'role_name'] = 1;
295 $val[
'add_missing'] = (
int) $this->role_mapping_rule->isAddOnUpdateEnabled();
296 $val[
'remove_deprecated'] = (
int) $this->role_mapping_rule->isRemoveOnUpdateEnabled();
297 $val[
'type'] = $this->role_mapping_rule->getType();
298 $val[
'dn'] = $this->role_mapping_rule->getDN();
299 $val[
'at'] = $this->role_mapping_rule->getMemberAttribute();
300 $val[
'isdn'] = $this->role_mapping_rule->isMemberAttributeDN();
301 $val[
'name'] = $this->role_mapping_rule->getAttributeName();
302 $val[
'value'] = $this->role_mapping_rule->getAttributeValue();
303 $val[
'plugin_id'] = $this->role_mapping_rule->getPluginId();
305 $this->
form->setValuesByArray($val);
313 if (!$this->
ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
314 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
321 $formWithoutErrors = $this->
form->checkInput();
323 if (!$formWithoutErrors || $roleErrorMessage !==
'') {
324 if ($roleErrorMessage !==
'') {
325 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt($roleErrorMessage));
328 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ldap_role_assignments.html',
'Services/LDAP');
330 $this->
form->setValuesByPost();
331 $this->tpl->setVariable(
'NEW_ASSIGNMENT_TBL', $this->
form->getHTML());
332 $this->tabs_gui->activateSubTab(
'role_assignments');
338 $this->
ctrl->redirect($this,
'showRoleSelection');
340 $this->rule->update();
341 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'));
355 if (!$this->rule_ids) {
356 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
361 $this->tabs_gui->activateTab(
'role_assignments');
366 $c_gui->setFormAction($this->
ctrl->getFormAction($this,
"deleteRules"));
367 $c_gui->setHeaderText($this->
lng->txt(
"ldap_confirm_del_role_ass"));
368 $c_gui->setCancel($this->
lng->txt(
"cancel"),
"roleAssignments");
369 $c_gui->setConfirm($this->
lng->txt(
"confirm"),
"deleteRules");
372 foreach ($this->rule_ids as $rule_id) {
376 $this->tpl->setContent($c_gui->getHTML());
384 if (!$this->rule_ids) {
385 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_once'));
389 foreach ($this->rule_ids as $rule_id) {
393 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'ldap_deleted_rule'));
394 $this->
ctrl->redirect($this,
'roleAssignments');
402 if (!$this->
ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
403 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
409 $formWithoutErrors = $this->
form->checkInput();
411 if (!$formWithoutErrors || $roleErrorMessage !==
'') {
412 if ($roleErrorMessage !==
'') {
413 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt($roleErrorMessage));
416 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ldap_role_assignments.html',
'Services/LDAP');
419 $this->
form->setValuesByPost();
420 $this->tpl->setVariable(
'NEW_ASSIGNMENT_TBL', $this->
form->getHTML());
422 $this->tabs_gui->activateSubTab(
'role_assignments');
427 $this->
ctrl->redirect($this,
'showRoleSelection');
429 $this->rule->create();
430 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'));
431 $this->
ctrl->redirect($this,
'roleAssignments');
438 if ($this->rule->getRoleId() > 0) {
442 $rule[
'server_id'] = $this->
getServer()->getServerId();
443 $rule[
'rule_id'] = $this->rule_id ?: 0;
444 $rule[
'role_search'] = $this->
form->getInput(
'role_search');
445 $rule[
'add_on_update'] = $this->
form->getInput(
'add_missing');
446 $rule[
'remove_on_update'] = $this->
form->getInput(
'remove_deprecated');
447 $rule[
'type'] = $this->
form->getInput(
'type');
448 $rule[
'dn'] = $this->
form->getInput(
'dn');
449 $rule[
'at'] = $this->
form->getInput(
'at');
450 $rule[
'isdn'] = $this->
form->getInput(
'isdn');
451 $rule[
'name'] = $this->
form->getInput(
'name');
452 $rule[
'value'] = $this->
form->getInput(
'value');
453 $rule[
'plugin'] = $this->
form->getInput(
'plugin_id');
455 $this->
ctrl->saveParameter($this,
'rule_id');
467 $this->tabs_gui->activateTab(
'role_assignment');
468 $this->
ctrl->saveParameter($this,
'rule_id');
471 $parser->setMinWordLength(1);
476 $object_search->setFilter(array(
'role'));
477 $res = $object_search->performSearch();
479 $entries =
$res->getEntries();
482 $table->setTitle($this->
lng->txt(
'ldap_role_selection'));
483 $table->addMultiCommand(
'saveRoleSelection', $this->
lng->txt(
'ldap_choose_role'));
484 $table->parse($entries);
486 $this->tpl->setContent($table->getHTML());
496 if (!$this->
ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
497 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
502 if (!$this->role_id) {
503 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
509 $this->rule->setRoleId($this->role_id);
511 if ($this->rule_id) {
512 $this->rule->update();
514 $this->rule->create();
517 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'));
529 $this->rule->validate();
530 return $this->ilErr->getMessage();
540 $table_gui->setTitle($this->
lng->txt(
"ldap_tbl_role_ass"));
541 $table_gui->parse($rules);
542 $table_gui->addMultiCommand(
"confirmDeleteRules", $this->
lng->txt(
"delete"));
543 $table_gui->setSelectAllCheckbox(
"rule_id");
544 return $table_gui->getHTML();
555 if (is_object($this->rule)) {
561 if ($load_from_form) {
562 if ($this->
form->getInput(
'role_name') ===
'0') {
563 $this->rule->setRoleId((
int) $this->
form->getInput(
'role_id'));
564 } elseif ($this->
form->getInput(
'role_search')) {
573 $object_search->setFilter(array(
'role'));
574 $res = $object_search->performSearch();
576 $entries =
$res->getEntries();
577 if (count($entries) === 1) {
578 $role = current($entries);
579 $this->rule->setRoleId($role[
'obj_id']);
580 } elseif (count($entries) > 1) {
581 $this->rule->setRoleId(-1);
585 $this->rule->setAttributeName($this->
form->getInput(
'name'));
586 $this->rule->setAttributeValue($this->
form->getInput(
'value'));
587 $this->rule->setDN($this->
form->getInput(
'dn'));
588 $this->rule->setMemberAttribute($this->
form->getInput(
'at'));
589 $this->rule->setMemberIsDN((
bool) $this->
form->getInput(
'isdn'));
590 $this->rule->enableAddOnUpdate((
bool) $this->
form->getInput(
'add_missing'));
591 $this->rule->enableRemoveOnUpdate((
bool) $this->
form->getInput(
'remove_deprecated'));
592 $this->rule->setPluginId((
int) $this->
form->getInput(
'plugin_id'));
593 $this->rule->setType((
int) $this->
form->getInput(
'type'));
594 $this->rule->setServerId($this->
getServer()->getServerId());
599 $this->rule->setServerId($this->
getServer()->getServerId());
600 $rule = unserialize(
ilSession::get(
'ldap_role_ass'), [
"allowed_classes" =>
false]);
602 $this->rule->enableAddOnUpdate((
bool) ($rule[
'add_on_update'] ??
false));
603 $this->rule->enableRemoveOnUpdate((
bool) ($rule[
'remove_on_update'] ??
false));
617 if (!$this->mappings) {
618 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
625 foreach ($this->mappings as $mapping_id) {
626 $this->role_mapping->delete($mapping_id);
628 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'ldap_deleted_role_mapping'));
635 if (!$this->mapping_template) {
641 $this->mapping->clearRules();
644 $this->mapping->setRule(
$key, $value,
false);
652 $this->tabs_gui->activateTab(
'role_mapping');
655 $this->mapping->setRule(
657 $this->attribute_mappings[$key][0],
658 $this->attribute_mappings[$key][1]
662 foreach ($this->udf->getDefinitions() as $definition) {
663 $key =
'udf_' . $definition[
'field_id'];
664 $this->mapping->setRule(
666 $this->attribute_mappings[$key][0],
667 $this->attribute_mappings[$key][1]
671 $this->mapping->save();
674 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'));
679 if (!$this->rbacSystem->checkAccess(
"visible,read", $this->ref_id)) {
680 $this->ilErr->raiseError($this->
lng->txt(
'msg_no_perm_read'), $this->ilErr->WARNING);
684 $this->main_tpl->setOnScreenMessage(
'failure',
'Missing LDAP libraries. Please ensure that the PHP LDAP module is installed on your server.');
687 if ($this->rbacSystem->checkAccess(
"write", $this->ref_id)) {
689 $this->
lng->txt(
"add_ldap_server"),
690 $this->
ctrl->getLinkTarget($this,
"addServerSettings")
696 $this->tpl->setContent($table->getHTML());
701 $this->form_gui->setValuesByArray(array(
702 'active' => $this->server->isActive(),
703 'ds' => !$this->server->isAuthenticationEnabled(),
704 'server_name' => $this->server->getName(),
705 'server_url' => $this->server->getUrlString(),
706 'version' => $this->server->getVersion(),
707 'base_dn' => $this->server->getBaseDN(),
708 'referrals' => $this->server->isActiveReferrer(),
709 'tls' => $this->server->isActiveTLS(),
710 'binding_type' => $this->server->getBindingType(),
711 'bind_dn' => $this->server->getBindUser(),
712 'bind_pass' => $this->server->getBindPassword(),
713 'bind_pass_retype' => $this->server->getBindPassword(),
714 'search_base' => $this->server->getSearchBase(),
715 'user_scope' => $this->server->getUserScope(),
716 'user_attribute' => $this->server->getUserAttribute(),
717 'filter' => $this->server->getFilter(),
718 'group_dn' => $this->server->getGroupDN(),
719 'group_scope' => $this->server->getGroupScope(),
720 'group_filter' => $this->server->getGroupFilter(),
721 'group_member' => $this->server->getGroupMember(),
722 'memberisdn' => $this->server->enabledGroupMemberIsDN(),
723 'group' => $this->server->getGroupName(),
724 'group_attribute' => $this->server->getGroupAttribute(),
725 'group_optional' => $this->server->isMembershipOptional(),
726 'group_user_filter' => $this->server->getGroupUserFilter(),
727 'sync_on_login' => $this->server->enabledSyncOnLogin(),
728 'sync_per_cron' => $this->server->enabledSyncPerCron(),
730 'migration' => (
int) $this->server->isAccountMigrationEnabled(),
731 "name_filter" => $this->server->getUsernameFilter(),
732 'escape_dn' => $this->server->enabledEscapeDN()
739 $this->form_gui->setFormAction($this->
ctrl->getFormAction($this,
'save'));
740 $this->form_gui->setTitle($this->
lng->txt(
'ldap_configure'));
744 $this->form_gui->addItem($active);
748 $ds->setInfo($this->
lng->txt(
'ldap_as_ds_info'));
749 $this->form_gui->addItem($ds);
751 $servername =
new ilTextInputGUI($this->
lng->txt(
'ldap_server_name'),
'server_name');
752 $servername->setRequired(
true);
753 $servername->setInfo($this->
lng->txt(
'ldap_server_name_info'));
754 $servername->setSize(32);
755 $servername->setMaxLength(32);
756 $this->form_gui->addItem($servername);
759 $namefilter =
new ilTextInputGUI($this->
lng->txt(
'ldap_username_filter'),
"name_filter");
760 $namefilter->setInfo($this->
lng->txt(
"ldap_username_filter_info"));
761 $namefilter->setSize(64);
762 $namefilter->setMaxLength(255);
763 $this->form_gui->addItem($namefilter);
767 $serverurl->setRequired(
true);
768 $serverurl->setInfo($this->
lng->txt(
'ldap_server_url_info'));
769 $serverurl->setSize(64);
770 $serverurl->setMaxLength(255);
771 $this->form_gui->addItem($serverurl);
774 $version->setOptions(array(2 => 2, 3 => 3));
775 $version->setInfo($this->
lng->txt(
'ldap_server_version_info'));
779 $basedsn->setRequired(
true);
780 $basedsn->setSize(64);
781 $basedsn->setMaxLength(255);
782 $this->form_gui->addItem($basedsn);
786 $referrals->setInfo($this->
lng->txt(
'ldap_referrals_info'));
787 $this->form_gui->addItem($referrals);
790 $section_security->setTitle($this->
lng->txt(
'ldap_server_security_settings'));
791 $this->form_gui->addItem($section_security);
795 $this->form_gui->addItem($tls);
799 $binding->addOption($anonymous);
803 $dn->setMaxLength(255);
804 $user->addSubItem($dn);
808 $pass->setMaxLength(100);
809 $user->addSubItem($pass);
810 $binding->addOption($user);
811 $this->form_gui->addItem($binding);
814 $section_auth->setTitle($this->
lng->txt(
'ldap_authentication_settings'));
815 $this->form_gui->addItem($section_auth);
817 $search_base =
new ilTextInputGUI($this->
lng->txt(
'ldap_user_dn'),
'search_base');
818 $search_base->setInfo($this->
lng->txt(
'ldap_search_base_info'));
819 $search_base->setSize(64);
820 $search_base->setMaxLength(255);
821 $this->form_gui->addItem($search_base);
826 $user_scope->setInfo($this->
lng->txt(
'ldap_user_scope_info'));
827 $this->form_gui->addItem($user_scope);
829 $user_attribute =
new ilTextInputGUI($this->
lng->txt(
'ldap_user_attribute'),
'user_attribute');
830 $user_attribute->setSize(16);
831 $user_attribute->setMaxLength(64);
832 $user_attribute->setRequired(
true);
833 $this->form_gui->addItem($user_attribute);
836 $filter->setInfo($this->
lng->txt(
'ldap_filter_info'));
837 $filter->setSize(64);
838 $filter->setMaxLength(512);
839 $this->form_gui->addItem($filter);
842 $section_restrictions->setTitle($this->
lng->txt(
'ldap_group_restrictions'));
843 $this->form_gui->addItem($section_restrictions);
845 $group_dn =
new ilTextInputGUI($this->
lng->txt(
'ldap_group_search_base'),
'group_dn');
846 $group_dn->setInfo($this->
lng->txt(
'ldap_group_dn_info'));
847 $group_dn->setSize(64);
848 $group_dn->setMaxLength(255);
849 $this->form_gui->addItem($group_dn);
854 $group_scope->setInfo($this->
lng->txt(
'ldap_group_scope_info'));
855 $this->form_gui->addItem($group_scope);
857 $group_filter =
new ilTextInputGUI($this->
lng->txt(
'ldap_group_filter'),
'group_filter');
858 $group_filter->setInfo($this->
lng->txt(
'ldap_group_filter_info'));
859 $group_filter->setSize(64);
860 $group_filter->setMaxLength(255);
861 $this->form_gui->addItem($group_filter);
863 $group_member =
new ilTextInputGUI($this->
lng->txt(
'ldap_group_member'),
'group_member');
864 $group_member->setInfo($this->
lng->txt(
'ldap_group_member_info'));
865 $group_member->setSize(32);
866 $group_member->setMaxLength(255);
867 $this->form_gui->addItem($group_member);
871 #$group_member_isdn->setInfo($this->lng->txt('ldap_group_member_info')); 872 $this->form_gui->addItem($group_member_isdn);
873 #$group_member->addSubItem($group_member_isdn); 877 $escapedn->setInfo($this->
lng->txt(
'ldap_escapedn_info'));
878 $this->form_gui->addItem($escapedn);
881 $group->setInfo($this->
lng->txt(
'ldap_group_name_info'));
883 $group->setMaxLength(255);
884 $this->form_gui->addItem($group);
886 $group_atrr =
new ilTextInputGUI($this->
lng->txt(
'ldap_group_attribute'),
'group_attribute');
887 $group_atrr->setInfo($this->
lng->txt(
'ldap_group_attribute_info'));
888 $group_atrr->setSize(16);
889 $group_atrr->setMaxLength(64);
890 $this->form_gui->addItem($group_atrr);
892 $group_optional =
new ilCheckboxInputGUI($this->
lng->txt(
'ldap_group_membership'),
'group_optional');
894 $group_optional->setInfo($this->
lng->txt(
'ldap_group_optional_info'));
895 $group_optional->setValue(
"1");
896 $group_user_filter =
new ilTextInputGUI($this->
lng->txt(
'ldap_group_user_filter'),
'group_user_filter');
897 $group_user_filter->setSize(64);
898 $group_user_filter->setMaxLength(255);
899 $group_optional->addSubItem($group_user_filter);
900 $this->form_gui->addItem($group_optional);
903 $section_sync->setTitle($this->
lng->txt(
'ldap_user_sync'));
904 $this->form_gui->addItem($section_sync);
908 $sync_on_login->setValue(
"1");
912 $ci_gui->addSubItem($sync_per_cron);
913 $ci_gui->setInfo($this->
lng->txt(
'ldap_user_sync_info'));
914 $this->form_gui->addItem($ci_gui);
916 $global_role =
new ilSelectInputGUI($this->
lng->txt(
'ldap_global_role_assignment'),
'global_role');
918 $global_role->setInfo($this->
lng->txt(
'ldap_global_role_info'));
919 $this->form_gui->addItem($global_role);
922 $migr->
setInfo($this->
lng->txt(
'auth_ldap_migration_info'));
923 $migr->setValue(
"1");
924 $this->form_gui->addItem($migr);
932 $this->form_gui->addCommandButton(
'save', $this->
lng->txt(
'save'));
933 if ($this->
ctrl->getCmd() ===
"addServerSettings") {
934 $this->form_gui->addCommandButton(
'serverList', $this->
lng->txt(
'cancel'));
944 $this->tabs_gui->setTabActive(
'settings');
947 if ($this->form_gui->checkInput()) {
948 $this->server->toggleActive((
bool) $this->form_gui->getInput(
'active'));
949 $this->server->enableAuthentication(!(
bool) $this->form_gui->getInput(
'ds'));
950 $this->server->setName($this->form_gui->getInput(
'server_name'));
951 $this->server->setUrl($this->form_gui->getInput(
'server_url'));
952 $this->server->setVersion((
int) $this->form_gui->getInput(
'version'));
953 $this->server->setBaseDN($this->form_gui->getInput(
'base_dn'));
954 $this->server->toggleReferrer((
bool) $this->form_gui->getInput(
'referrals'));
955 $this->server->toggleTLS((
bool) $this->form_gui->getInput(
'tls'));
956 $this->server->setBindingType((
int) $this->form_gui->getInput(
'binding_type'));
957 $this->server->setBindUser($this->form_gui->getInput(
'bind_dn'));
958 $this->server->setBindPassword($this->form_gui->getInput(
'bind_pass'));
959 $this->server->setSearchBase($this->form_gui->getInput(
'search_base'));
960 $this->server->setUserScope((
int) $this->form_gui->getInput(
'user_scope'));
961 $this->server->setUserAttribute($this->form_gui->getInput(
'user_attribute'));
962 $this->server->setFilter($this->form_gui->getInput(
'filter'));
963 $this->server->setGroupDN($this->form_gui->getInput(
'group_dn'));
964 $this->server->setGroupScope((
int) $this->form_gui->getInput(
'group_scope'));
965 $this->server->setGroupFilter($this->form_gui->getInput(
'group_filter'));
966 $this->server->setGroupMember($this->form_gui->getInput(
'group_member'));
967 $this->server->enableGroupMemberIsDN((
bool) $this->form_gui->getInput(
'memberisdn'));
968 $this->server->setGroupName($this->form_gui->getInput(
'group'));
969 $this->server->setGroupAttribute($this->form_gui->getInput(
'group_attribute'));
970 $this->server->setGroupUserFilter($this->form_gui->getInput(
'group_user_filter'));
971 $this->server->toggleMembershipOptional((
bool) $this->form_gui->getInput(
'group_optional'));
972 $this->server->enableSyncOnLogin((
bool) $this->form_gui->getInput(
'sync_on_login'));
973 $this->server->enableSyncPerCron((
bool) $this->form_gui->getInput(
'sync_per_cron'));
974 $this->server->setGlobalRole((
int) $this->form_gui->getInput(
'global_role'));
975 $this->server->enableAccountMigration((
bool) $this->form_gui->getInput(
'migration'));
976 $this->server->setUsernameFilter($this->form_gui->getInput(
"name_filter"));
977 $this->server->enableEscapeDN((
bool) $this->form_gui->getInput(
'escape_dn'));
978 if (!$this->server->validate()) {
979 $this->main_tpl->setOnScreenMessage(
'failure', $this->ilErr->getMessage());
980 $this->form_gui->setValuesByPost();
981 $this->tpl->setContent($this->form_gui->getHTML());
986 if ($this->server->getServerId()) {
987 $this->server->update();
989 $this->server->create();
994 $this->mapping->setRule(
'global_role', (
string) $this->form_gui->getInput(
'global_role'),
false);
995 $this->mapping->save();
997 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
998 $this->
ctrl->redirect($this,
'serverList');
1002 $this->form_gui->setValuesByPost();
1003 $this->tpl->setContent($this->form_gui->getHTML());
1014 $this->tabs_gui->clearTargets();
1016 $this->tabs_gui->setBackTarget(
1017 $this->
lng->txt(
"back"),
1018 $this->
ctrl->getLinkTarget($this,
'serverList')
1022 $this->tabs_gui->addTab(
1024 $this->
lng->txt(
"ldap_settings"),
1025 $this->
ctrl->getLinkTarget($this,
'editServerSettings')
1033 $this->tabs_gui->addTab(
1035 $this->
lng->txt(
"ldap_user_mapping"),
1036 $this->
ctrl->getLinkTarget($this,
'userMapping')
1039 $this->tabs_gui->addTab(
1041 $this->
lng->txt(
'ldap_role_assignments'),
1042 $this->
ctrl->getLinkTarget($this,
'roleAssignments')
1045 $this->tabs_gui->addTab(
1047 $this->
lng->txt(
"ldap_role_mapping"),
1048 $this->
ctrl->getLinkTarget($this,
'roleMapping')
1056 if ($this->ldap_server_id) {
1080 $this->rbacReview->getGlobalRoles(),
1086 $select[0] = $this->
lng->txt(
'links_select_one');
1087 foreach ($global_roles as $role_id) {
1095 return array(
'gender' => $this->
lng->txt(
'gender'),
1096 'firstname' => $this->
lng->txt(
'firstname'),
1097 'lastname' => $this->
lng->txt(
'lastname'),
1098 'title' => $this->
lng->txt(
'person_title'),
1099 'institution' => $this->
lng->txt(
'institution'),
1100 'department' => $this->
lng->txt(
'department'),
1101 'street' => $this->
lng->txt(
'street'),
1102 'city' => $this->
lng->txt(
'city'),
1103 'zipcode' => $this->
lng->txt(
'zipcode'),
1104 'country' => $this->
lng->txt(
'country'),
1105 'phone_office' => $this->
lng->txt(
'phone_office'),
1106 'phone_home' => $this->
lng->txt(
'phone_home'),
1107 'phone_mobile' => $this->
lng->txt(
'phone_mobile'),
1108 'fax' => $this->
lng->txt(
'fax'),
1109 'email' => $this->
lng->txt(
'email'),
1110 'second_email' => $this->
lng->txt(
'second_email'),
1111 'hobby' => $this->
lng->txt(
'hobby'),
1112 'matriculation' => $this->
lng->txt(
'matriculation'));
1123 $this->mapping_template,
1125 [0 => $this->
lng->txt(
'ldap_mapping_template'),
1126 "inetOrgPerson" =>
'inetOrgPerson',
1127 "organizationalPerson" =>
'organizationalPerson',
1128 "person" =>
'person',
1129 "ad_2003" =>
'Active Directory (Win 2003)' 1144 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
1148 $this->
form->setTitle($this->
lng->txt(
'ldap_edit_role_ass_rule'));
1149 $this->
form->addCommandButton(
'updateRoleAssignment', $this->
lng->txt(
'save'));
1153 $this->
form->setTitle($this->
lng->txt(
'ldap_add_role_ass_rule'));
1154 $this->
form->addCommandButton(
'addRoleAssignment', $this->
lng->txt(
'ldap_btn_add_role_ass'));
1165 $role->addOption($global);
1169 $global->addSubItem($role_select);
1173 $role->addOption($local);
1176 $role_search->setSize(40);
1177 $local->addSubItem($role_search);
1179 $role->setInfo($this->
lng->txt(
'ldap_role_name_info'));
1180 $this->
form->addItem($role);
1184 $update->setValue($this->
lng->txt(
'ldap_check_role_assignment'));
1187 $add->setOptionTitle($this->
lng->txt(
'ldap_add_missing'));
1191 $remove->setOptionTitle($this->
lng->txt(
'ldap_remove_deprecated'));
1200 #$group->setValue($current_rule->getType()); 1207 #$dn->setValue($current_rule->getDN()); 1209 $dn->setMaxLength(512);
1210 $dn->setInfo($this->
lng->txt(
'ldap_role_grp_dn_info'));
1211 $radio_group->addSubItem($dn);
1213 #$at->setValue($current_rule->getMemberAttribute()); 1215 $at->setMaxLength(128);
1216 $radio_group->addSubItem($at);
1218 #$isdn->setChecked($current_rule->isMemberAttributeDN()); 1219 $isdn->
setInfo($this->
lng->txt(
'ldap_group_member_info'));
1220 $radio_group->addSubItem($isdn);
1221 $radio_group->setInfo($this->
lng->txt(
'ldap_role_grp_info'));
1223 $group->addOption($radio_group);
1228 #$name->setValue($current_rule->getAttributeName()); 1230 $name->setMaxLength(128);
1231 #$name->setInfo($this->lng->txt('ldap_role_at_name_info')); 1232 $radio_attribute->addSubItem(
$name);
1236 #$val->setValue($current_rule->getAttributeValue()); 1238 $val->setMaxLength(128);
1239 #$val->setInfo($this->lng->txt('ldap_role_at_value_info')); 1240 $radio_attribute->addSubItem($val);
1241 $radio_attribute->setInfo($this->
lng->txt(
'ldap_role_at_info'));
1243 $group->addOption($radio_attribute);
1246 $pl_active = $this->component_repository->getPluginSlotById(
"ldaphk")->hasActivePlugins();
1249 $pl->
setInfo($this->
lng->txt(
'ldap_plugin_info'));
1250 $pl->setDisabled(!$pl_active);
1253 $id->setDisabled(!$pl_active);
1255 $id->setMaxLength(3);
1256 $id->setMaxValue(999);
1257 $id->setMinValue(1);
1258 $pl->addSubItem(
$id);
1260 $group->addOption($pl);
1261 $this->
form->addItem($group);
1279 $select_form->setPostVar(
"mapping_template");
1281 "" => $this->
lng->txt(
'ldap_mapping_template'),
1282 "inetOrgPerson" =>
'inetOrgPerson',
1283 "organizationalPerson" =>
'organizationalPerson',
1284 "person" =>
'person',
1285 "ad_2003" =>
'Active Directory (Win 2003)');
1286 $select_form->setOptions($options);
1287 $select_form->setValue($this->mapping_template);
1289 $this->
toolbar->addInputItem($select_form);
1290 $this->
toolbar->addFormButton($this->
lng->txt(
'show'),
"chooseMapping");
1291 $this->
toolbar->setFormAction($this->
ctrl->getFormAction($this,
"chooseMapping"));
1300 $propertie_form->setTitle($this->
lng->txt(
'ldap_mapping_table'));
1301 $propertie_form->setFormAction($this->
ctrl->getFormAction($this,
'saveMapping'));
1302 $propertie_form->addCommandButton(
'saveMapping', $this->
lng->txt(
'save'));
1306 $text_form->setPostVar($mapping .
"_value");
1307 $text_form->setValue($this->mapping->getValue($mapping));
1308 $text_form->setSize(32);
1309 $text_form->setMaxLength(255);
1310 $propertie_form->addItem($text_form);
1313 $checkbox_form->setPostVar($mapping .
"_update");
1314 $checkbox_form->setChecked($this->mapping->enabledUpdate($mapping));
1315 $checkbox_form->setOptionTitle($this->
lng->txt(
'ldap_update_field_info'));
1316 $propertie_form->addItem($checkbox_form);
1320 foreach ($this->udf->getDefinitions() as $definition) {
1322 $text_form->setPostVar(
'udf_' . $definition[
'field_id'] .
'_value');
1323 $text_form->setValue($this->mapping->getValue(
'udf_' . $definition[
'field_id']));
1324 $text_form->setSize(32);
1325 $text_form->setMaxLength(255);
1326 $propertie_form->addItem($text_form);
1329 $checkbox_form->setPostVar(
'udf_' . $definition[
'field_id'] .
'_update');
1330 $checkbox_form->setChecked($this->mapping->enabledUpdate(
'udf_' . $definition[
'field_id']));
1331 $checkbox_form->setOptionTitle($this->
lng->txt(
'ldap_update_field_info'));
1332 $propertie_form->addItem($checkbox_form);
1335 return $propertie_form;
1344 $this->tabs_gui->setTabActive(
'role_mapping');
1346 $this->
lng->txt(
"ldap_new_role_assignment"),
1347 $this->
ctrl->getLinkTarget($this,
'addRoleMapping')
1352 $propertie_form->setTitle($this->
lng->txt(
'ldap_role_settings'));
1353 $propertie_form->setFormAction($this->
ctrl->getFormAction($this,
"saveSyncronizationSettings"));
1354 $propertie_form->addCommandButton(
"saveSyncronizationSettings", $this->
lng->txt(
'save'));
1356 $role_active->
setPostVar(
'role_sync_active');
1357 $role_active->setChecked($this->server->enabledRoleSynchronization());
1358 $propertie_form->addItem($role_active);
1360 $binding->
setInfo($this->
lng->txt(
'ldap_role_bind_user_info'));
1362 $user->setPostVar(
"role_bind_user");
1363 $user->setValue($this->server->getRoleBindDN());
1365 $user->setMaxLength(255);
1366 $binding->addCombinationItem(
"0", $user, $this->
lng->txt(
'ldap_role_bind_user'));
1369 $pass->setPostVar(
"role_bind_pass");
1370 $pass->setValue($this->server->getRoleBindPassword());
1372 $pass->setMaxLength(100);
1373 $pass->setRetype(
false);
1374 $binding->addCombinationItem(
"1", $pass, $this->
lng->txt(
'ldap_role_bind_pass'));
1376 $propertie_form->addItem($binding);
1378 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ldap_role_mappings.html',
'Services/LDAP');
1379 $this->tpl->setVariable(
"NEW_ASSIGNMENT_TBL", $propertie_form->getHTML());
1383 $mappings = $mapping_instance->getMappings();
1384 if (count($mappings)) {
1386 $table_gui->
setTitle($this->
lng->txt(
'ldap_role_group_assignments'));
1387 $table_gui->setData($mappings);
1388 $this->tpl->setVariable(
"RULES_TBL", $table_gui->getHTML());
1401 $propertie_form->setTitle($this->
lng->txt(
'ldap_edit_role_assignment'));
1402 if ($propertie_form->getItemByPostVar(
"url")) {
1403 $propertie_form->getItemByPostVar(
"url")->setValue($mapping->getURL());
1405 if ($propertie_form->getItemByPostVar(
"dn")) {
1406 $propertie_form->getItemByPostVar(
"dn")->setValue($mapping->getDN());
1408 if ($propertie_form->getItemByPostVar(
"member")) {
1409 $propertie_form->getItemByPostVar(
"member")->setValue($mapping->getMemberAttribute());
1411 if ($propertie_form->getItemByPostVar(
"memberisdn")) {
1412 $propertie_form->getItemByPostVar(
"memberisdn")->setChecked($mapping->getMemberISDN());
1414 if ($propertie_form->getItemByPostVar(
"role")) {
1415 $propertie_form->getItemByPostVar(
"role")->setValue($mapping->getRoleName());
1417 if ($propertie_form->getItemByPostVar(
"info")) {
1418 $propertie_form->getItemByPostVar(
"info")->setValue($mapping->getMappingInfo());
1420 if ($propertie_form->getItemByPostVar(
"info_type")) {
1421 $propertie_form->getItemByPostVar(
"info_type")->setChecked($mapping->getMappingInfoType());
1424 $this->tpl->setContent($propertie_form->getHTML());
1436 if ($propertie_form->checkInput() && $this->rbacReview->roleExists($propertie_form->getInput(
"role"))) {
1438 $mapping->setServerId($this->server->getServerId());
1439 $mapping->setURL($propertie_form->getInput(
"url"));
1440 $mapping->setDN($propertie_form->getInput(
"dn"));
1441 $mapping->setMemberAttribute($propertie_form->getInput(
"member"));
1442 $mapping->setMemberISDN((
bool) $propertie_form->getInput(
"memberisdn"));
1443 $mapping->setRoleByName($propertie_form->getInput(
"role"));
1444 $mapping->setMappingInfo($propertie_form->getInput(
"info"));
1445 $mapping->setMappingInfoType((
bool) $propertie_form->getInput(
"info_type"));
1448 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
1449 $this->
ctrl->redirect($this,
"roleMapping");
1451 if (!$this->rbacReview->roleExists($propertie_form->getInput(
"role"))) {
1452 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"ldap_role_not_exists") .
" " .
1453 $propertie_form->getInput(
"role"));
1455 $propertie_form->setValuesByPost();
1456 $this->tpl->setContent($propertie_form->getHTML());
1465 if (!$this->mappings) {
1466 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
1467 $this->
ctrl->redirect($this,
"roleMapping");
1474 $c_gui->setFormAction($this->
ctrl->getFormAction($this,
"deleteRoleMapping"));
1475 $c_gui->setHeaderText($this->
lng->txt(
"ldap_confirm_del_role_ass"));
1476 $c_gui->setCancel($this->
lng->txt(
"cancel"),
"roleMapping");
1477 $c_gui->setConfirm($this->
lng->txt(
"confirm"),
"deleteRoleMapping");
1479 foreach ($this->mappings as
$id) {
1482 $txt = $this->
lng->txt(
'obj_role') .
": " . $mapping->getRoleName() .
", ";
1483 $txt .= $this->
lng->txt(
'ldap_group_dn') .
": " . $mapping->getDN() .
", ";
1484 $txt .= $this->
lng->txt(
'ldap_server_short') .
" " . $mapping->getURL() .
", ";
1485 $txt .= $this->
lng->txt(
'ldap_group_member_short') .
" " . $mapping->getMemberAttribute();
1487 $c_gui->addItem(
"mappings[]", (
string) $id,
$txt);
1489 $this->tpl->setContent($c_gui->getHTML());
1496 $this->
ctrl->clearParameters($this);
1499 $this->tpl->setContent($this->form_gui->getHTML());
1507 $this->tabs_gui->setTabActive(
'settings');
1511 $this->tpl->setContent($this->form_gui->getHTML());
1522 if (!$this->ldap_server_id) {
1523 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1531 $c_gui->setFormAction($this->
ctrl->getFormAction($this,
"deleteServerSettings"));
1532 $c_gui->setHeaderText($this->
lng->txt(
"ldap_confirm_del_server_settings"));
1533 $c_gui->setCancel($this->
lng->txt(
"cancel"),
"serverList");
1534 $c_gui->setConfirm($this->
lng->txt(
"confirm"),
"deleteServerSettings");
1538 $c_gui->addItem(
'server_ids[]', (
string) $setting->getServerId(), $setting->getName());
1540 $this->tpl->setContent($c_gui->getHTML());
1548 if (!$this->server_ids) {
1549 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1554 foreach ($this->server_ids as $server_id) {
1558 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'deleted'));
1559 $this->
ctrl->redirect($this,
"serverlist");
1570 $this->tabs_gui->activateTab(
'user_mapping');
1575 $this->tpl->setContent($propertie_form->getHTML());
1584 $this->server->toggleActive(
true);
1585 $this->server->update();
1593 $this->server->toggleActive(
false);
1594 $this->server->update();
1608 $this->tabs_gui->activateTab(
'role_mapping');
1610 if ($this->mapping_id) {
1611 $this->
ctrl->setParameter($this,
'mapping_id', $this->mapping_id);
1615 $propertie_form->setTitle($this->
lng->txt(
'ldap_mapping_table'));
1616 $propertie_form->setFormAction($this->
ctrl->getFormAction($this, $command));
1617 $propertie_form->addCommandButton($command, $this->
lng->txt(
'save'));
1618 $propertie_form->addCommandButton(
"roleMapping", $this->
lng->txt(
'cancel'));
1621 $url->setPostVar(
"url");
1623 $url->setMaxLength(255);
1624 $url->setRequired(
true);
1627 $group_dn->setPostVar(
"dn");
1628 $group_dn->setSize(50);
1629 $group_dn->setMaxLength(255);
1630 $group_dn->setInfo($this->
lng->txt(
'ldap_dn_info'));
1631 $group_dn->setRequired(
true);
1634 $member->setPostVar(
"member");
1635 $member->setSize(32);
1636 $member->setMaxLength(255);
1637 $member->setInfo($this->
lng->txt(
'ldap_member_info'));
1638 $member->setRequired(
true);
1641 $member_isdn->setPostVar(
"memberisdn");
1642 $member_isdn->setOptionTitle($this->
lng->txt(
'ldap_memberisdn'));
1645 $role->setPostVar(
"role");
1647 $role->setMaxLength(255);
1648 $role->setInfo($this->
lng->txt(
'ldap_role_info'));
1649 $role->setRequired(
true);
1655 $info->setInfo($this->
lng->txt(
'ldap_info_text_info'));
1658 $info_type->setPostVar(
"info_type");
1659 $info_type->setOptionTitle($this->
lng->txt(
'ldap_mapping_info_type'));
1661 $propertie_form->addItem(
$url);
1662 $propertie_form->addItem($group_dn);
1663 $propertie_form->addItem($member);
1664 $propertie_form->addItem($member_isdn);
1665 $propertie_form->addItem($role);
1666 $propertie_form->addItem($info);
1667 $propertie_form->addItem($info_type);
1669 return $propertie_form;
1680 if ($propertie_form->getItemByPostVar(
"url")) {
1681 $propertie_form->getItemByPostVar(
"url")->setValue($this->server->getUrl());
1683 if ($this->mapping_id) {
1686 if ($propertie_form->getItemByPostVar(
"url")) {
1687 $propertie_form->getItemByPostVar(
"url")->setValue($mapping->getURL());
1689 if ($propertie_form->getItemByPostVar(
"dn")) {
1690 $propertie_form->getItemByPostVar(
"dn")->setValue($mapping->getDN());
1692 if ($propertie_form->getItemByPostVar(
"member")) {
1693 $propertie_form->getItemByPostVar(
"member")->setValue($mapping->getMemberAttribute());
1695 if ($propertie_form->getItemByPostVar(
"memberisdn")) {
1696 $propertie_form->getItemByPostVar(
"memberisdn")->setChecked($mapping->getMemberISDN());
1698 if ($propertie_form->getItemByPostVar(
"role")) {
1699 $propertie_form->getItemByPostVar(
"role")->setValue($mapping->getRoleName());
1701 if ($propertie_form->getItemByPostVar(
"info")) {
1702 $propertie_form->getItemByPostVar(
"info")->setValue($mapping->getMappingInfo());
1704 if ($propertie_form->getItemByPostVar(
"info_type")) {
1705 $propertie_form->getItemByPostVar(
"info_type")->setChecked($mapping->getMappingInfoType());
1709 $this->tpl->setContent($propertie_form->getHTML());
1720 if ($propertie_form->checkInput() && $this->rbacReview->roleExists($propertie_form->getInput(
"role"))) {
1722 $mapping->setServerId($this->server->getServerId());
1723 $mapping->setURL($propertie_form->getInput(
"url"));
1724 $mapping->setDN($propertie_form->getInput(
"dn"));
1725 $mapping->setMemberAttribute($propertie_form->getInput(
"member"));
1726 $mapping->setMemberISDN((
bool) $propertie_form->getInput(
"memberisdn"));
1727 $mapping->setRoleByName($propertie_form->getInput(
"role"));
1728 $mapping->setMappingInfo($propertie_form->getInput(
"info"));
1729 $mapping->setMappingInfoType((
bool) $propertie_form->getInput(
"info_type"));
1732 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
1733 $this->
ctrl->redirect($this,
"roleMapping");
1735 if (!$this->rbacReview->roleExists($propertie_form->getInput(
"role"))) {
1736 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"ldap_role_not_exists") .
" " .
1737 $propertie_form->getInput(
"role"));
1739 $propertie_form->setValuesByPost();
1740 $this->tpl->setContent($propertie_form->getHTML());
1749 $this->server->setRoleBindDN($this->role_bind_user);
1750 $this->server->setRoleBindPassword($this->role_bind_pass);
1751 $this->server->enableRoleSynchronization($this->role_sync_active);
1754 if ($this->server->getServerId()) {
1755 $this->server->update();
1757 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
1758 $this->
ctrl->redirect($this,
"roleMapping");
static checkLDAPLib()
Check if ldap module is installed.
confirmDeleteRules()
Confirm delete rules.
userMappingToolbar()
Create Toolbar.
static get(string $a_var)
checkRoleAssignmentInput(int $a_rule_id=0)
Check role assignment input.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Readable part of repository interface to ilComponentDataDB.
createRoleMapping()
Check add screen input and save to db.
loadRoleAssignmentRule(int $a_rule_id, bool $load_from_form=true)
Load input from form.
ilLDAPRoleGroupMappingSettings $role_mapping
__construct(int $a_auth_ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initFormRoleAssignments(string $a_mode)
Init form table for new role assignments.
saveSyncronizationSettings()
save Syncronization Settings on Role Mapping screen
static _getServerList()
Get list of all configured servers.
Additional user data fields definition.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
prepareGlobalRoleSelection()
New implementation for InputForm.
getServer()
Get server settings.
updateRoleMapping()
Check edit screen input and save to db.
setSubTabs()
Set sub tabs for ldap section.
editRoleAssignment()
Edit role assignment.
static _getMappingRulesByClass(string $a_class)
Get mapping rule by objectClass.
setValuesByArray()
set values of form array
ilGlobalTemplateInterface $main_tpl
showRoleSelection()
show role selection
ilGlobalTemplateInterface $tpl
confirmDeleteRoleMapping()
confirm delete role mappings
static _getRules($a_server_id)
Get all rules.
setMinWordLength(int $a_length)
ilPropertyFormGUI $form_gui
checkAccess(string $a_permission)
addRoleMapping()
Add Assigments for role mapping.
ilAccessHandler $ilAccess
ilComponentRepository $component_repository
const LDAP_BIND_ANONYMOUS
confirmDeleteServerSettings()
Confirm delete rules.
static _lookupTitle(int $obj_id)
deleteRules()
delete role assignment rule
ilLDAPAttributeMapping $mapping
addRoleAutoCompleteObject()
Add Member for autoComplete.
addRoleAssignment()
add new role assignment
static _lookupGlobalRole(int $a_server_id)
userMapping()
Ldap User Mapping.
roleAssignments()
Edit role assignments.
roleMapping()
Role Mapping Tab.
updateRoleAssignment()
update role assignment
form( $class_path, string $cmd)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
array $attribute_mappings
This class stores the settings that define the mapping between LDAP attribute and user profile fields...
static _sortIds(array $a_ids, string $a_table, string $a_field, string $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname.
initUserMappingForm()
Create Property Form GUI for User Mapping.
saveRoleSelection()
Save role selection.
static _getInstanceByRuleId(int $a_rule_id)
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 of class.
Error Handling & global info handling uses PEAR error class.
read()
Read mapping settings from db.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAttributeMappingKeys()
Get all possible attribute keys for mapping ldap attribute to ilias user attributes.
This class represents a text area property in a property form.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
save()
Save mapping rules to db.
ilLDAPRoleAssignmentRule $rule
initRoleMappingForm(string $command)
init propertyformgui for Assignment of LDAP Attributes to ILIAS User Profile
static set(string $a_var, $a_val)
Set a value.
static _getInstanceByServerId(int $a_server_id)
ilLDAPRoleAssignmentRule $role_mapping_rule
getRoleAssignmentTable()
Show active role assignments.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
editRoleMapping()
Edit Assigments for role mapping.
Refinery Factory $refinery