43 $this->tabs_gui = $ilTabs;
45 $this->lng->loadLanguageModule(
'ldap');
49 if (
$_GET[
"cmd"] !=
"addServerSettings") {
50 $this->ctrl->saveParameter($this,
'ldap_server_id');
54 $this->ref_id = $a_auth_ref_id;
64 $next_class = $this->ctrl->getNextClass($this);
65 $cmd = $this->ctrl->getCmd();
67 if (!$ilAccess->checkAccess(
'write',
'', $this->ref_id) && $cmd !=
"serverList") {
69 $ilCtrl->redirect($this,
"serverList");
73 switch ($next_class) {
104 $this->tabs_gui->setTabActive(
'role_assignments');
106 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ldap_role_assignments.html',
'Services/LDAP');
108 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
110 $this->tpl->setVariable(
'NEW_ASSIGNMENT_TBL', $this->form->getHTML());
114 include_once(
"./Services/LDAP/classes/class.ilLDAPRoleAssignmentTableGUI.php");
116 $table_gui->setTitle($this->lng->txt(
"ldap_tbl_role_ass"));
117 $table_gui->parse($rules);
118 $table_gui->addMultiCommand(
"confirmDeleteRules", $this->lng->txt(
"delete"));
119 $table_gui->setSelectAllCheckbox(
"rule_id");
120 $this->tpl->setVariable(
'RULES_TBL', $table_gui->getHTML());
132 if (!(
int)
$_GET[
'rule_id']) {
138 $this->tabs_gui->setTabActive(
'role_assignments');
140 $this->ctrl->saveParameter($this,
'rule_id', (
int) $_GET[
'rule_id']);
141 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
147 $this->tpl->setContent($this->form->getHTML());
159 $role_id = $this->role_mapping_rule->getRoleId();
160 if ($rbacreview->isGlobalRole($role_id)) {
161 $val[
'role_name'] = 0;
162 $val[
'role_id'] = $role_id;
164 $val[
'role_name'] = 1;
167 $val[
'add_missing'] = (int) $this->role_mapping_rule->isAddOnUpdateEnabled();
168 $val[
'remove_deprecated'] = (int) $this->role_mapping_rule->isRemoveOnUpdateEnabled();
169 $val[
'type'] = (int) $this->role_mapping_rule->getType();
170 $val[
'dn'] = $this->role_mapping_rule->getDN();
171 $val[
'at'] = $this->role_mapping_rule->getMemberAttribute();
172 $val[
'isdn'] = $this->role_mapping_rule->isMemberAttributeDN();
173 $val[
'name'] = $this->role_mapping_rule->getAttributeName();
174 $val[
'value'] = $this->role_mapping_rule->getAttributeValue();
175 $val[
'plugin_id'] = $this->role_mapping_rule->getPluginId();
177 $this->form->setValuesByArray($val);
190 if (!$ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
192 $this->roleAssignment();
196 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
197 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
205 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ldap_role_assignments.html',
'Services/LDAP');
208 $this->form->setValuesByPost();
209 $this->tpl->setVariable(
'NEW_ASSIGNMENT_TBL', $this->form->getHTML());
210 #$this->tpl->setVariable('RULES_TBL',$this->getRoleAssignmentTable()); 211 $this->tabs_gui->setSubTabActive(
'shib_role_assignment');
218 $this->rule->update();
233 if (!is_array(
$_POST[
'rule_ids'])) {
239 $this->tabs_gui->setTabActive(
'role_assignments');
241 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
245 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteRules"));
246 $c_gui->setHeaderText($this->lng->txt(
"ldap_confirm_del_role_ass"));
247 $c_gui->setCancel($this->lng->txt(
"cancel"),
"roleAssignments");
248 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteRules");
251 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
252 foreach (
$_POST[
"rule_ids"] as $rule_id) {
254 $c_gui->addItem(
'rule_ids[]', $rule_id,
$rule->conditionToString());
256 $this->tpl->setContent($c_gui->getHTML());
267 if (!is_array(
$_POST[
'rule_ids'])) {
272 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
273 foreach (
$_POST[
"rule_ids"] as $rule_id) {
292 if (!$ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
294 $this->roleAssignment();
298 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
299 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
307 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ldap_role_assignments.html',
'Services/LDAP');
310 $this->form->setValuesByPost();
311 $this->tpl->setVariable(
'NEW_ASSIGNMENT_TBL', $this->form->getHTML());
313 $this->tabs_gui->setSubTabActive(
'shib_role_assignment');
320 $this->rule->create();
333 if ($this->rule->getRoleId() > 0) {
337 $_SESSION[
'ldap_role_ass'][
'rule_id'] = $_REQUEST[
'rule_id'] ? $_REQUEST[
'rule_id'] : 0;
338 $_SESSION[
'ldap_role_ass'][
'role_search'] = $this->form->getInput(
'role_search');
339 $_SESSION[
'ldap_role_ass'][
'add_on_update'] = $this->form->getInput(
'add_missing');
340 $_SESSION[
'ldap_role_ass'][
'remove_on_update'] = $this->form->getInput(
'remove_deprecated');
341 $_SESSION[
'ldap_role_ass'][
'type'] = $this->form->getInput(
'type');
342 $_SESSION[
'ldap_role_ass'][
'dn'] = $this->form->getInput(
'dn');
343 $_SESSION[
'ldap_role_ass'][
'at'] = $this->form->getInput(
'at');
344 $_SESSION[
'ldap_role_ass'][
'isdn'] = $this->form->getInput(
'isdn');
345 $_SESSION[
'ldap_role_ass'][
'name'] = $this->form->getInput(
'name');
346 $_SESSION[
'ldap_role_ass'][
'value'] = $this->form->getInput(
'value');
347 $_SESSION[
'ldap_role_ass'][
'plugin'] = $this->form->getInput(
'plugin_id');
350 $this->ctrl->saveParameter($this,
'rule_id');
351 $this->ctrl->redirect($this,
'showRoleSelection');
363 $this->tabs_gui->setTabActive(
'role_assignment');
364 $this->ctrl->saveParameter($this,
'rule_id');
366 include_once
'./Services/Search/classes/class.ilQueryParser.php';
368 $parser->setMinWordLength(1,
true);
372 include_once
'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
374 $object_search->setFilter(
array(
'role'));
375 $res = $object_search->performSearch();
377 $entries =
$res->getEntries();
379 include_once
'./Services/AccessControl/classes/class.ilRoleSelectionTableGUI.php';
381 $table->setTitle($this->lng->txt(
'ldap_role_selection'));
382 $table->addMultiCommand(
'saveRoleSelection', $this->lng->txt(
'ldap_choose_role'));
383 #$table->addCommandButton('roleAssignment',$this->lng->txt('cancel')); 386 $this->tpl->setContent(
$table->getHTML());
398 if (!$ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
400 $this->roleAssignment();
404 if (!(
int) $_REQUEST[
'role_id']) {
411 $this->rule->setRoleId((
int) $_REQUEST[
'role_id']);
413 if ((
int) $_REQUEST[
'rule_id']) {
414 $this->rule->update();
416 $this->rule->create();
435 $this->rule->validate();
436 return $ilErr->getMessage();
447 include_once(
"./Services/LDAP/classes/class.ilLDAPRoleAssignmentTableGUI.php");
449 $table_gui->setTitle($this->lng->txt(
"ldap_tbl_role_ass"));
450 $table_gui->parse($rules);
451 $table_gui->addMultiCommand(
"confirmDeleteRules", $this->lng->txt(
"delete"));
452 $table_gui->setSelectAllCheckbox(
"rule_id");
453 return $table_gui->getHTML();
466 if (is_object($this->rule)) {
470 include_once
'./Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php';
475 if ($this->form->getInput(
'role_name') == 0) {
476 $this->rule->setRoleId($this->form->getInput(
'role_id'));
477 } elseif ($this->form->getInput(
'role_search')) {
479 include_once
'./Services/Search/classes/class.ilQueryParser.php';
484 $parser->setMinWordLength(1,
true);
488 include_once
'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
490 $object_search->setFilter(
array(
'role'));
491 $res = $object_search->performSearch();
493 $entries =
$res->getEntries();
494 if (count($entries) == 1) {
495 $role = current($entries);
496 $this->rule->setRoleId($role[
'obj_id']);
497 } elseif (count($entries) > 1) {
498 $this->rule->setRoleId(-1);
502 $this->rule->setAttributeName($this->form->getInput(
'name'));
503 $this->rule->setAttributeValue($this->form->getInput(
'value'));
504 $this->rule->setDN($this->form->getInput(
'dn'));
505 $this->rule->setMemberAttribute($this->form->getInput(
'at'));
506 $this->rule->setMemberIsDN($this->form->getInput(
'isdn'));
507 $this->rule->enableAddOnUpdate($this->form->getInput(
'add_missing'));
508 $this->rule->enableRemoveOnUpdate($this->form->getInput(
'remove_deprecated'));
509 $this->rule->setPluginId($this->form->getInput(
'plugin_id'));
510 $this->rule->setType($this->form->getInput(
'type'));
511 $this->rule->setServerId($this->
getServer()->getServerId());
517 $this->rule->setServerId($this->
getServer()->getServerId());
518 $this->rule->enableAddOnUpdate((
int)
$_SESSION[
'ldap_role_ass'][
'add_on_update']);
519 $this->rule->enableRemoveOnUpdate((
int) $_SESSION[
'ldap_role_ass'][
'remove_on_update']);
532 if (!count(
$_POST[
'mappings'])) {
540 foreach (
$_POST[
'mappings'] as $mapping_id) {
541 $this->role_mapping->delete($mapping_id);
550 if (!
$_POST[
'mapping_template']) {
556 $this->mapping->clearRules();
558 include_once(
'Services/LDAP/classes/class.ilLDAPAttributeMappingUtils.php');
560 $this->mapping->setRule(
$key, $value, 0);
569 $this->tabs_gui->setTabActive(
'role_mapping');
575 foreach ($this->udf->getDefinitions() as $definition) {
576 $key =
'udf_' . $definition[
'field_id'];
580 $this->mapping->save();
584 unset(
$_POST[
'mapping_template']);
590 global $ilAccess,
$ilErr, $ilToolbar;
592 if (!$ilAccess->checkAccess(
'read',
'', $this->ref_id) && $cmd !=
"serverList") {
593 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_write'), $ilErr->WARNING);
597 ilUtil::sendFailure(
'Missing LDAP libraries. Please ensure that the PHP LDAP module is installed on your server.');
600 $ilToolbar->addButton(
601 $this->lng->txt(
"add_ldap_server"),
602 $this->ctrl->getLinkTarget($this,
"addServerSettings")
605 include_once
'./Services/LDAP/classes/class.ilLDAPServerTableGUI.php';
610 return $this->tpl->setContent(
$table->getHTML());
615 $this->form_gui->setValuesByArray(
array(
616 'active' => $this->server->isActive(),
617 'ds' => !$this->server->isAuthenticationEnabled(),
618 'server_name' => $this->server->getName(),
619 'server_url' => $this->server->getUrlString(),
620 'version' => $this->server->getVersion(),
621 'base_dn' => $this->server->getBaseDN(),
622 'referrals' => $this->server->isActiveReferrer(),
623 'tls' => $this->server->isActiveTLS(),
624 'binding_type' => $this->server->getBindingType(),
625 'bind_dn' => $this->server->getBindUser(),
626 'bind_pass' => $this->server->getBindPassword(),
627 'bind_pass_retype' => $this->server->getBindPassword(),
628 'search_base' => $this->server->getSearchBase(),
629 'user_scope' => $this->server->getUserScope(),
630 'user_attribute' => $this->server->getUserAttribute(),
631 'filter' => $this->server->getFilter(),
632 'group_dn' => $this->server->getGroupDN(),
633 'group_scope' => $this->server->getGroupScope(),
634 'group_filter' => $this->server->getGroupFilter(),
635 'group_member' => $this->server->getGroupMember(),
636 'memberisdn' => $this->server->enabledGroupMemberIsDN(),
637 'group' => $this->server->getGroupName(),
638 'group_attribute' => $this->server->getGroupAttribute(),
639 'group_optional' => $this->server->isMembershipOptional(),
640 'group_user_filter' => $this->server->getGroupUserFilter(),
641 'sync_on_login' => $this->server->enabledSyncOnLogin(),
642 'sync_per_cron' => $this->server->enabledSyncPerCron(),
644 'migration' => (
int) $this->server->isAccountMigrationEnabled(),
646 "name_filter" => $this->server->getUsernameFilter()
653 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
656 $this->form_gui->setFormAction($this->ctrl->getFormAction($this,
'save'));
657 $this->form_gui->setTitle($this->lng->txt(
'ldap_configure'));
661 $this->form_gui->addItem($active);
665 $ds->setInfo($this->lng->txt(
'ldap_as_ds_info'));
666 $this->form_gui->addItem($ds);
668 $servername =
new ilTextInputGUI($this->lng->txt(
'ldap_server_name'),
'server_name');
670 $servername->setInfo($this->lng->txt(
'ldap_server_name_info'));
671 $servername->setSize(32);
672 $servername->setMaxLength(32);
673 $this->form_gui->addItem($servername);
676 $namefilter =
new ilTextInputGUI($this->lng->txt(
'ldap_username_filter'),
"name_filter");
677 $namefilter->
setInfo($this->lng->txt(
"ldap_username_filter_info"));
678 $namefilter->setSize(64);
679 $namefilter->setMaxLength(255);
680 $this->form_gui->addItem($namefilter);
683 $serverurl =
new ilTextInputGUI($this->lng->txt(
'ldap_server'),
'server_url');
685 $serverurl->setInfo($this->lng->txt(
'ldap_server_url_info'));
686 $serverurl->setSize(64);
687 $serverurl->setMaxLength(255);
688 $this->form_gui->addItem($serverurl);
692 $version->setInfo($this->lng->txt(
'ldap_server_version_info'));
695 $basedsn =
new ilTextInputGUI($this->lng->txt(
'basedn'),
'base_dn');
697 $basedsn->setSize(64);
698 $basedsn->setMaxLength(255);
699 $this->form_gui->addItem($basedsn);
703 $referrals->setInfo($this->lng->txt(
'ldap_referrals_info'));
704 $this->form_gui->addItem($referrals);
707 $section_security->setTitle($this->lng->txt(
'ldap_server_security_settings'));
708 $this->form_gui->addItem($section_security);
712 $this->form_gui->addItem($tls);
718 $dn =
new ilTextInputGUI($this->lng->txt(
'ldap_server_bind_dn'),
'bind_dn');
720 $dn->setMaxLength(255);
723 $pass->setSkipSyntaxCheck(
true);
725 $pass->setMaxLength(36);
726 $user->addSubItem(
$pass);
731 $section_auth->setTitle($this->lng->txt(
'ldap_authentication_settings'));
732 $this->form_gui->addItem($section_auth);
734 $search_base =
new ilTextInputGUI($this->lng->txt(
'ldap_user_dn'),
'search_base');
735 $search_base->
setInfo($this->lng->txt(
'ldap_search_base_info'));
736 $search_base->setSize(64);
737 $search_base->setMaxLength(255);
738 $this->form_gui->addItem($search_base);
740 $user_scope =
new ilSelectInputGUI($this->lng->txt(
'ldap_user_scope'),
'user_scope');
743 $user_scope->setInfo($this->lng->txt(
'ldap_user_scope_info'));
744 $this->form_gui->addItem($user_scope);
746 $user_attribute =
new ilTextInputGUI($this->lng->txt(
'ldap_user_attribute'),
'user_attribute');
748 $user_attribute->setMaxLength(64);
749 $user_attribute->setRequired(
true);
750 $this->form_gui->addItem($user_attribute);
752 $filter =
new ilTextInputGUI($this->lng->txt(
'ldap_search_filter'),
'filter');
753 $filter->
setInfo($this->lng->txt(
'ldap_filter_info'));
754 $filter->setSize(64);
755 $filter->setMaxLength(512);
756 $this->form_gui->addItem($filter);
759 $section_restrictions->setTitle($this->lng->txt(
'ldap_group_restrictions'));
760 $this->form_gui->addItem($section_restrictions);
762 $group_dn =
new ilTextInputGUI($this->lng->txt(
'ldap_group_search_base'),
'group_dn');
763 $group_dn->
setInfo($this->lng->txt(
'ldap_group_dn_info'));
764 $group_dn->setSize(64);
765 $group_dn->setMaxLength(255);
766 $this->form_gui->addItem($group_dn);
768 $group_scope =
new ilSelectInputGUI($this->lng->txt(
'ldap_group_scope'),
'group_scope');
771 $group_scope->setInfo($this->lng->txt(
'ldap_group_scope_info'));
772 $this->form_gui->addItem($group_scope);
774 $group_filter =
new ilTextInputGUI($this->lng->txt(
'ldap_group_filter'),
'group_filter');
775 $group_filter->
setInfo($this->lng->txt(
'ldap_group_filter_info'));
776 $group_filter->setSize(64);
777 $group_filter->setMaxLength(255);
778 $this->form_gui->addItem($group_filter);
780 $group_member =
new ilTextInputGUI($this->lng->txt(
'ldap_group_member'),
'group_member');
781 $group_member->
setInfo($this->lng->txt(
'ldap_group_member_info'));
782 $group_member->setSize(32);
783 $group_member->setMaxLength(255);
784 $this->form_gui->addItem($group_member);
787 $group_member_isdn =
new ilCheckboxInputGUI($this->lng->txt(
'ldap_memberisdn'),
'memberisdn');
788 #$group_member_isdn->setInfo($this->lng->txt('ldap_group_member_info')); 789 $this->form_gui->addItem($group_member_isdn);
790 #$group_member->addSubItem($group_member_isdn); 792 $group =
new ilTextInputGUI($this->lng->txt(
'ldap_group_name'),
'group');
793 $group->
setInfo($this->lng->txt(
'ldap_group_name_info'));
795 $group->setMaxLength(255);
796 $this->form_gui->addItem($group);
798 $group_atrr =
new ilTextInputGUI($this->lng->txt(
'ldap_group_attribute'),
'group_attribute');
799 $group_atrr->
setInfo($this->lng->txt(
'ldap_group_attribute_info'));
800 $group_atrr->setSize(16);
801 $group_atrr->setMaxLength(64);
802 $this->form_gui->addItem($group_atrr);
804 $group_optional =
new ilCheckboxInputGUI($this->lng->txt(
'ldap_group_membership'),
'group_optional');
805 $group_optional->
setOptionTitle($this->lng->txt(
'ldap_group_member_optional'));
806 $group_optional->setInfo($this->lng->txt(
'ldap_group_optional_info'));
807 $group_optional->setValue(1);
808 $group_user_filter =
new ilTextInputGUI($this->lng->txt(
'ldap_group_user_filter'),
'group_user_filter');
809 $group_user_filter->
setSize(64);
810 $group_user_filter->setMaxLength(255);
811 $group_optional->addSubItem($group_user_filter);
812 $this->form_gui->addItem($group_optional);
815 $section_sync->setTitle($this->lng->txt(
'ldap_user_sync'));
816 $this->form_gui->addItem($section_sync);
819 $sync_on_login =
new ilCheckboxInputGUI($this->lng->txt(
'ldap_sync_login'),
'sync_on_login');
820 $sync_on_login->setValue(1);
822 $sync_per_cron =
new ilCheckboxInputGUI($this->lng->txt(
'ldap_sync_cron'),
'sync_per_cron');
824 $ci_gui->addSubItem($sync_per_cron);
825 $ci_gui->setInfo($this->lng->txt(
'ldap_user_sync_info'));
826 $this->form_gui->addItem($ci_gui);
828 $global_role =
new ilSelectInputGUI($this->lng->txt(
'ldap_global_role_assignment'),
'global_role');
830 $global_role->setInfo($this->lng->txt(
'ldap_global_role_info'));
831 $this->form_gui->addItem($global_role);
834 $migr->
setInfo($this->lng->txt(
'auth_ldap_migration_info'));
836 $this->form_gui->addItem($migr);
839 include_once
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
847 $this->form_gui->addCommandButton(
'save', $this->lng->txt(
'save'));
848 if (
$_GET[
"cmd"] ==
"addServerSettings") {
849 $this->form_gui->addCommandButton(
'serverList', $this->lng->txt(
'cancel'));
861 $this->tabs_gui->setTabActive(
'settings');
864 if ($this->form_gui->checkInput()) {
865 $this->server->toggleActive((
int) $this->form_gui->getInput(
'active'));
866 $this->server->enableAuthentication(!$this->form_gui->getInput(
'ds'));
867 $this->server->setName($this->form_gui->getInput(
'server_name'));
868 $this->server->setUrl($this->form_gui->getInput(
'server_url'));
869 $this->server->setVersion($this->form_gui->getInput(
'version'));
870 $this->server->setBaseDN($this->form_gui->getInput(
'base_dn'));
871 $this->server->toggleReferrer($this->form_gui->getInput(
'referrals'));
872 $this->server->toggleTLS($this->form_gui->getInput(
'tls'));
873 $this->server->setBindingType((
int) $this->form_gui->getInput(
'binding_type'));
874 $this->server->setBindUser($this->form_gui->getInput(
'bind_dn'));
875 $this->server->setBindPassword($this->form_gui->getInput(
'bind_pass'));
876 $this->server->setSearchBase($this->form_gui->getInput(
'search_base'));
877 $this->server->setUserScope($this->form_gui->getInput(
'user_scope'));
878 $this->server->setUserAttribute($this->form_gui->getInput(
'user_attribute'));
879 $this->server->setFilter($this->form_gui->getInput(
'filter'));
880 $this->server->setGroupDN($this->form_gui->getInput(
'group_dn'));
881 $this->server->setGroupScope((
int) $this->form_gui->getInput(
'group_scope'));
882 $this->server->setGroupFilter($this->form_gui->getInput(
'group_filter'));
883 $this->server->setGroupMember($this->form_gui->getInput(
'group_member'));
884 $this->server->enableGroupMemberIsDN((
int) $this->form_gui->getInput(
'memberisdn'));
885 $this->server->setGroupName($this->form_gui->getInput(
'group'));
886 $this->server->setGroupAttribute($this->form_gui->getInput(
'group_attribute'));
887 $this->server->setGroupUserFilter($this->form_gui->getInput(
'group_user_filter'));
888 $this->server->toggleMembershipOptional((
int) $this->form_gui->getInput(
'group_optional'));
889 $this->server->enableSyncOnLogin((
int) $this->form_gui->getInput(
'sync_on_login'));
890 $this->server->enableSyncPerCron((
int) $this->form_gui->getInput(
'sync_per_cron'));
891 $this->server->setGlobalRole((
int) $this->form_gui->getInput(
'global_role'));
892 $this->server->enableAccountMigration((
int) $this->form_gui->getInput(
'migration'));
894 $this->server->setUsernameFilter($this->form_gui->getInput(
"name_filter"));
896 if (!$this->server->validate()) {
898 $this->form_gui->setValuesByPost();
899 return $this->tpl->setContent($this->form_gui->getHtml());
903 if ($this->server->getServerId()) {
904 $this->server->update();
906 $this->server->create();
911 $this->mapping->setRule(
'global_role', (
int) $this->form_gui->getInput(
'global_role'),
false);
912 $this->mapping->save();
915 $this->ctrl->redirect($this,
'serverList');
917 #$this->form_gui->setValuesByPost(); 918 #return $this->tpl->setContent($this->form_gui->getHtml()); 921 $this->form_gui->setValuesByPost();
922 return $this->tpl->setContent($this->form_gui->getHtml());
934 $this->tabs_gui->clearTargets();
936 $this->tabs_gui->setBackTarget(
937 $this->lng->txt(
"back"),
938 $this->ctrl->getLinkTarget($this,
'serverList')
945 $this->tabs_gui->addTab(
947 $this->lng->txt(
"ldap_settings"),
948 $this->ctrl->getLinkTarget($this,
'editServerSettings')
952 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
961 $this->tabs_gui->addTab(
963 $this->lng->txt(
"ldap_user_mapping"),
964 $this->ctrl->getLinkTarget($this,
'userMapping')
971 $this->tabs_gui->addTab(
973 $this->lng->txt(
'ldap_role_assignments'),
974 $this->ctrl->getLinkTarget($this,
'roleAssignments')
981 $this->tabs_gui->addTab(
983 $this->lng->txt(
"ldap_role_mapping"),
984 $this->ctrl->getLinkTarget($this,
'roleMapping')
991 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
992 if (!$_REQUEST[
'ldap_server_id']) {
993 $_REQUEST[
'ldap_server_id'] = 0;
995 $this->server =
new ilLDAPServer((
int) $_REQUEST[
'ldap_server_id']);
1000 include_once
'./Services/LDAP/classes/class.ilLDAPAttributeMapping.php';
1006 include_once
'./Services/LDAP/classes/class.ilLDAPRoleGroupMappingSettings.php';
1017 global $rbacreview,$ilObjDataCache;
1020 $rbacreview->getGlobalRoles(),
1026 $select[0] = $this->lng->txt(
'links_select_one');
1027 foreach ($global_roles as $role_id) {
1042 global $rbacreview,$ilObjDataCache;
1044 include_once(
'./Services/LDAP/classes/class.ilLDAPAttributeMapping.php');
1047 $rbacreview->getGlobalRoles(),
1053 $select[0] = $this->lng->txt(
'links_select_one');
1054 foreach ($global_roles as $role_id) {
1074 return array(
'gender' => $this->lng->txt(
'gender'),
1075 'firstname' => $this->lng->txt(
'firstname'),
1076 'lastname' => $this->lng->txt(
'lastname'),
1077 'title' => $this->lng->txt(
'person_title'),
1078 'institution' => $this->lng->txt(
'institution'),
1079 'department' => $this->lng->txt(
'department'),
1080 'street' => $this->lng->txt(
'street'),
1081 'city' => $this->lng->txt(
'city'),
1082 'zipcode' => $this->lng->txt(
'zipcode'),
1083 'country' => $this->lng->txt(
'country'),
1084 'phone_office' => $this->lng->txt(
'phone_office'),
1085 'phone_home' => $this->lng->txt(
'phone_home'),
1086 'phone_mobile' => $this->lng->txt(
'phone_mobile'),
1087 'fax' => $this->lng->txt(
'fax'),
1088 'email' => $this->lng->txt(
'email'),
1089 'hobby' => $this->lng->txt(
'hobby'),
1090 'matriculation' => $this->lng->txt(
'matriculation'));
1091 #'photo' => $this->lng->txt('photo')); 1096 include_once(
"./Services/User/classes/class.ilUserDefinedFields.php");
1103 "inetOrgPerson" =>
'inetOrgPerson',
1104 "organizationalPerson" =>
'organizationalPerson',
1105 "person" =>
'person',
1106 "ad_2003" =>
'Active Directory (Win 2003)'),
false,
true);
1117 if (!isset(
$_SESSION[
'ldap_mapping_details'])) {
1120 if (isset(
$_GET[
'details_show'])) {
1121 $_SESSION[
'ldap_mapping_details'][
$_GET[
'details_show']] = $_GET[
'details_show'];
1123 if (isset(
$_GET[
'details_hide'])) {
1138 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
1139 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
1142 $this->form->setFormAction($this->ctrl->getFormAction($this));
1146 $this->form->setTitle($this->lng->txt(
'ldap_edit_role_ass_rule'));
1147 $this->form->addCommandButton(
'updateRoleAssignment', $this->lng->txt(
'save'));
1151 $this->form->setTitle($this->lng->txt(
'ldap_add_role_ass_rule'));
1152 $this->form->addCommandButton(
'addRoleAssignment', $this->lng->txt(
'ldap_btn_add_role_ass'));
1161 $global =
new ilRadioOption($this->lng->txt(
'ldap_global_role'), 0);
1162 $role->addOption($global);
1166 $global->addSubItem($role_select);
1168 $local =
new ilRadioOption($this->lng->txt(
'ldap_local_role'), 1);
1169 $role->addOption($local);
1171 include_once
'./Services/Form/classes/class.ilRoleAutoCompleteInputGUI.php';
1173 $role_search->setSize(40);
1174 $local->addSubItem($role_search);
1176 $role->setInfo($this->lng->txt(
'ldap_role_name_info'));
1177 $this->form->addItem($role);
1181 $update->
setValue($this->lng->txt(
'ldap_check_role_assignment'));
1184 $add->setOptionTitle($this->lng->txt(
'ldap_add_missing'));
1185 $update->addSubItem($add);
1188 $remove->setOptionTitle($this->lng->txt(
'ldap_remove_deprecated'));
1189 $update->addSubItem($remove);
1191 $this->form->addItem($update);
1197 #$group->setValue($current_rule->getType()); 1203 $dn =
new ilTextInputGUI($this->lng->txt(
'ldap_group_dn'),
'dn');
1204 #$dn->setValue($current_rule->getDN()); 1206 $dn->setMaxLength(512);
1207 $dn->
setInfo($this->lng->txt(
'ldap_role_grp_dn_info'));
1208 $radio_group->addSubItem($dn);
1209 $at =
new ilTextInputGUI($this->lng->txt(
'ldap_role_grp_at'),
'at');
1210 #$at->setValue($current_rule->getMemberAttribute()); 1212 $at->setMaxLength(128);
1213 $radio_group->addSubItem($at);
1215 #$isdn->setChecked($current_rule->isMemberAttributeDN()); 1216 $isdn->
setInfo($this->lng->txt(
'ldap_group_member_info'));
1217 $radio_group->addSubItem($isdn);
1218 $radio_group->setInfo($this->lng->txt(
'ldap_role_grp_info'));
1220 $group->addOption($radio_group);
1225 #$name->setValue($current_rule->getAttributeName()); 1227 $name->setMaxLength(128);
1228 #$name->setInfo($this->lng->txt('ldap_role_at_name_info')); 1232 $val =
new ilTextInputGUI($this->lng->txt(
'ldap_role_at_value'),
'value');
1233 #$val->setValue($current_rule->getAttributeValue()); 1235 $val->setMaxLength(128);
1236 #$val->setInfo($this->lng->txt('ldap_role_at_value_info')); 1237 $radio_attribute->addSubItem($val);
1238 $radio_attribute->setInfo($this->lng->txt(
'ldap_role_at_info'));
1240 $group->addOption($radio_attribute);
1245 $pl->
setInfo($this->lng->txt(
'ldap_plugin_info'));
1246 $pl->setDisabled(!$pl_active);
1249 $id->setDisabled(!$pl_active);
1251 $id->setMaxLength(3);
1252 $id->setMaxValue(999);
1253 $id->setMinValue(1);
1254 $pl->addSubItem(
$id);
1256 $group->addOption($pl);
1257 $this->form->addItem($group);
1266 global $ilPluginAdmin;
1268 return count($ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
'LDAP',
'ldaphk')) ?
true :
false;
1277 include_once(
"./Services/Form/classes/class.ilRoleAutoCompleteInputGUI.php");
1291 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
1294 $select_form->setPostVar(
"mapping_template");
1296 "" => $this->lng->txt(
'ldap_mapping_template'),
1297 "inetOrgPerson" =>
'inetOrgPerson',
1298 "organizationalPerson" =>
'organizationalPerson',
1299 "person" =>
'person',
1300 "ad_2003" =>
'Active Directory (Win 2003)');
1301 $select_form->setOptions(
$options);
1302 $select_form->setValue(
$_POST[
'mapping_template']);
1304 $ilToolbar->addInputItem($select_form);
1305 $ilToolbar->addFormButton($this->lng->txt(
'show'),
"chooseMapping");
1306 $ilToolbar->setFormAction($this->ctrl->getFormAction($this,
"chooseMapping"));
1315 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1317 $propertie_form->setTitle($this->lng->txt(
'ldap_mapping_table'));
1318 $propertie_form->setFormAction($this->ctrl->getFormAction($this,
'saveMapping'));
1319 $propertie_form->addCommandButton(
'saveMapping', $this->lng->txt(
'save'));
1323 $text_form->setPostVar($mapping .
"_value");
1324 $text_form->setValue($this->mapping->getValue($mapping));
1325 $text_form->setSize(32);
1326 $text_form->setMaxLength(255);
1327 $propertie_form->addItem($text_form);
1330 $checkbox_form->setPostVar($mapping .
"_update");
1331 $checkbox_form->setChecked($this->mapping->enabledUpdate($mapping));
1332 $checkbox_form->setOptionTitle($this->lng->txt(
'ldap_update_field_info'));
1333 $propertie_form->addItem($checkbox_form);
1337 foreach ($this->udf->getDefinitions() as $definition) {
1339 $text_form->setPostVar(
'udf_' . $definition[
'field_id'] .
'_value');
1340 $text_form->setValue($this->mapping->getValue(
'udf_' . $definition[
'field_id']));
1341 $text_form->setSize(32);
1342 $text_form->setMaxLength(255);
1343 $propertie_form->addItem($text_form);
1346 $checkbox_form->setPostVar(
'udf_' . $definition[
'field_id'] .
'_update');
1347 $checkbox_form->setChecked($this->mapping->enabledUpdate(
'udf_' . $definition[
'field_id']));
1348 $checkbox_form->setOptionTitle($this->lng->txt(
'ldap_update_field_info'));
1349 $propertie_form->addItem($checkbox_form);
1352 return $propertie_form;
1363 $this->tabs_gui->setTabActive(
'role_mapping');
1364 $ilToolbar->addButton(
1365 $this->lng->txt(
"ldap_new_role_assignment"),
1366 $this->ctrl->getLinkTarget($this,
'addRoleMapping')
1368 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1371 include_once(
"./Services/Form/classes/class.ilCombinationInputGUI.php");
1373 $propertie_form->setTitle($this->lng->txt(
'ldap_role_settings'));
1374 $propertie_form->setFormAction($this->ctrl->getFormAction($this,
"saveSyncronizationSettings"));
1375 $propertie_form->addCommandButton(
"saveSyncronizationSettings", $this->lng->txt(
'save'));
1377 $role_active->
setPostVar(
'role_sync_active');
1378 $role_active->setChecked($this->server->enabledRoleSynchronization() ? true :
false);
1379 $propertie_form->addItem($role_active);
1381 $binding->setInfo($this->lng->txt(
'ldap_role_bind_user_info'));
1383 $user->setPostVar(
"role_bind_user");
1384 $user->setValue($this->server->getRoleBindDN());
1386 $user->setMaxLength(255);
1387 $binding->addCombinationItem(0, $user, $this->lng->txt(
'ldap_role_bind_user'));
1389 $pass->setPostVar(
"role_bind_pass");
1390 $pass->setValue($this->server->getRoleBindPassword());
1392 $pass->setMaxLength(36);
1393 $pass->setRetype(
false);
1394 $binding->addCombinationItem(1,
$pass, $this->lng->txt(
'ldap_role_bind_pass'));
1395 $propertie_form->addItem(
$binding);
1397 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ldap_role_mappings.html',
'Services/LDAP');
1398 $this->tpl->setVariable(
"NEW_ASSIGNMENT_TBL", $propertie_form->getHTML());
1401 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSettings.php');
1403 $mappings = $mapping_instance->getMappings();
1404 if (count($mappings)) {
1405 include_once(
"./Services/LDAP/classes/class.ilLDAPRoleMappingTableGUI.php");
1407 $table_gui->
setTitle($this->lng->txt(
'ldap_role_group_assignments'));
1408 $table_gui->setData($mappings);
1409 $this->tpl->setVariable(
"RULES_TBL", $table_gui->getHTML());
1418 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSetting.php');
1423 $propertie_form->setTitle($this->lng->txt(
'ldap_edit_role_assignment'));
1424 $propertie_form->getItemByPostVar(
"url")->setValue($mapping->getURL());
1425 $propertie_form->getItemByPostVar(
"dn")->setValue($mapping->getDN());
1426 $propertie_form->getItemByPostVar(
"member")->setValue($mapping->getMemberAttribute());
1427 $propertie_form->getItemByPostVar(
"memberisdn")->setChecked($mapping->getMemberISDN());
1428 $propertie_form->getItemByPostVar(
"role")->setValue($mapping->getRoleName());
1429 $propertie_form->getItemByPostVar(
"info")->setValue($mapping->getMappingInfo());
1430 $propertie_form->getItemByPostVar(
"info_type")->setChecked($mapping->getMappingInfoType());
1432 $this->tpl->setContent($propertie_form->getHTML());
1446 if ($propertie_form->checkInput() && $rbacreview->roleExists($propertie_form->getInput(
"role"))) {
1447 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSetting.php');
1449 $mapping->setServerId($this->server->getServerId());
1450 $mapping->setURL($propertie_form->getInput(
"url"));
1451 $mapping->setDN($propertie_form->getInput(
"dn"));
1452 $mapping->setMemberAttribute($propertie_form->getInput(
"member"));
1453 $mapping->setMemberISDN($propertie_form->getInput(
"memberisdn"));
1454 $mapping->setRoleByName($propertie_form->getInput(
"role"));
1455 $mapping->setMappingInfo($propertie_form->getInput(
"info"));
1456 $mapping->setMappingInfoType($propertie_form->getInput(
"info_type"));
1460 $this->ctrl->redirect($this,
"roleMapping");
1462 if (!$rbacreview->roleExists($propertie_form->getInput(
"role"))) {
1464 $propertie_form->getInput(
"role"));
1466 $propertie_form->setValuesByPost();
1467 $this->tpl->setContent($propertie_form->getHTML());
1476 if (!is_array(
$_POST[
'mappings'])) {
1478 $this->ctrl->redirect($this,
"roleMapping");
1482 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
1486 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteRoleMapping"));
1487 $c_gui->setHeaderText($this->lng->txt(
"ldap_confirm_del_role_ass"));
1488 $c_gui->setCancel($this->lng->txt(
"cancel"),
"roleMapping");
1489 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteRoleMapping");
1492 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSetting.php');
1495 $txt = $this->lng->txt(
'obj_role') .
": " . $mapping->getRoleName() .
", ";
1496 $txt .= $this->lng->txt(
'ldap_group_dn') .
": " . $mapping->getDN() .
", ";
1497 $txt .= $this->lng->txt(
'ldap_server_short') .
" " . $mapping->getURL() .
", ";
1498 $txt .= $this->lng->txt(
'ldap_group_member_short') .
" " . $mapping->getMemberAttribute();
1500 $c_gui->addItem(
"mappings[]", $id,
$txt);
1502 $this->tpl->setContent($c_gui->getHTML());
1507 $this->ctrl->clearParameters($this);
1510 return $this->tpl->setContent($this->form_gui->getHtml());
1516 $this->tabs_gui->setTabActive(
'settings');
1520 return $this->tpl->setContent($this->form_gui->getHtml());
1533 if (!isset(
$_GET[
"ldap_server_id"])) {
1539 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
1543 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteServerSettings"));
1544 $c_gui->setHeaderText($this->lng->txt(
"ldap_confirm_del_server_settings"));
1545 $c_gui->setCancel($this->lng->txt(
"cancel"),
"serverList");
1546 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteServerSettings");
1549 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
1550 foreach ((
array)
$_GET[
"ldap_server_id"] as $server_id) {
1552 $c_gui->addItem(
'server_ids[]', $server_id, $setting->getName());
1554 $this->tpl->setContent($c_gui->getHTML());
1562 if (!is_array(
$_POST[
"server_ids"])) {
1568 foreach ((
array)
$_POST[
"server_ids"] as $server_id) {
1585 $this->tabs_gui->setTabActive(
'user_mapping');
1590 $this->tpl->setContent($propertie_form->getHTML());
1597 $this->server->toggleActive(1);
1598 $this->server->update();
1604 $this->server->toggleActive(0);
1605 $this->server->update();
1619 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1621 $this->tabs_gui->setTabActive(
'role_mapping');
1623 if (isset(
$_GET[
"mapping_id"])) {
1624 $this->ctrl->setParameter($this,
'mapping_id',
$_GET[
"mapping_id"]);
1628 $propertie_form->setTitle($this->lng->txt(
'ldap_mapping_table'));
1629 $propertie_form->setFormAction($this->ctrl->getFormAction($this, $command));
1630 $propertie_form->addCommandButton($command, $this->lng->txt(
'save'));
1631 $propertie_form->addCommandButton(
"roleMapping", $this->lng->txt(
'cancel'));
1634 $url->setPostVar(
"url");
1636 $url->setMaxLength(255);
1637 $url->setRequired(
true);
1639 $group_dn =
new ilTextInputGUI($this->lng->txt(
'ldap_group_dn'));
1641 $group_dn->setSize(50);
1642 $group_dn->setMaxLength(255);
1643 $group_dn->setInfo($this->lng->txt(
'ldap_dn_info'));
1644 $group_dn->setRequired(
true);
1646 $member =
new ilTextInputGUI($this->lng->txt(
'ldap_group_member'));
1648 $member->setSize(32);
1649 $member->setMaxLength(255);
1650 $member->setInfo($this->lng->txt(
'ldap_member_info'));
1651 $member->setRequired(
true);
1654 $member_isdn->setPostVar(
"memberisdn");
1655 $member_isdn->setOptionTitle($this->lng->txt(
'ldap_memberisdn'));
1660 $role->setMaxLength(255);
1661 $role->setInfo($this->lng->txt(
'ldap_role_info'));
1662 $role->setRequired(
true);
1665 $info->setPostVar(
"info");
1668 $info->setInfo($this->lng->txt(
'ldap_info_text_info'));
1671 $info_type->setPostVar(
"info_type");
1672 $info_type->setOptionTitle($this->lng->txt(
'ldap_mapping_info_type'));
1674 $propertie_form->addItem(
$url);
1675 $propertie_form->addItem($group_dn);
1676 $propertie_form->addItem($member);
1677 $propertie_form->addItem($member_isdn);
1678 $propertie_form->addItem($role);
1679 $propertie_form->addItem(
$info);
1680 $propertie_form->addItem($info_type);
1682 return $propertie_form;
1693 $propertie_form->getItemByPostVar(
"url")->setValue($this->server->getUrl());
1695 if (isset(
$_GET[
"mapping_id"])) {
1696 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSetting.php');
1700 $propertie_form->getItemByPostVar(
"url")->setValue($mapping->getURL());
1701 $propertie_form->getItemByPostVar(
"dn")->setValue($mapping->getDN());
1702 $propertie_form->getItemByPostVar(
"member")->setValue($mapping->getMemberAttribute());
1703 $propertie_form->getItemByPostVar(
"memberisdn")->setChecked($mapping->getMemberISDN());
1704 $propertie_form->getItemByPostVar(
"role")->setValue($mapping->getRoleName());
1705 $propertie_form->getItemByPostVar(
"info")->setValue($mapping->getMappingInfo());
1706 $propertie_form->getItemByPostVar(
"info_type")->setChecked($mapping->getMappingInfoType());
1709 $this->tpl->setContent($propertie_form->getHTML());
1722 if ($propertie_form->checkInput() && $rbacreview->roleExists($propertie_form->getInput(
"role"))) {
1723 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSetting.php');
1725 $mapping->setServerId($this->server->getServerId());
1726 $mapping->setURL($propertie_form->getInput(
"url"));
1727 $mapping->setDN($propertie_form->getInput(
"dn"));
1728 $mapping->setMemberAttribute($propertie_form->getInput(
"member"));
1729 $mapping->setMemberISDN($propertie_form->getInput(
"memberisdn"));
1730 $mapping->setRoleByName($propertie_form->getInput(
"role"));
1731 $mapping->setMappingInfo($propertie_form->getInput(
"info"));
1732 $mapping->setMappingInfoType($propertie_form->getInput(
"info_type"));
1736 $this->ctrl->redirect($this,
"roleMapping");
1738 if (!$rbacreview->roleExists($propertie_form->getInput(
"role"))) {
1740 $propertie_form->getInput(
"role"));
1742 $propertie_form->setValuesByPost();
1743 $this->tpl->setContent($propertie_form->getHTML());
1754 $this->server->enableRoleSynchronization((
int)
$_POST[
'role_sync_active']);
1757 if ($this->server->getServerId()) {
1758 $this->server->update();
1761 $this->ctrl->redirect($this,
"roleMapping");
static checkLDAPLib()
Check if ldap module is installed.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
confirmDeleteRules()
Confirm delete rules.
userMappingToolbar()
Create Toolbar ilToolbarGUI $ilToolbar.
This class represents an option in a radio group.
__construct($a_auth_ref_id)
hasActiveRoleAssignmentPlugins()
Check if the plugin is active.
createRoleMapping()
Check add screen input and save to db ilRbacReview $rbacreview.
prepareGlobalRoleSelection($a_as_select=true)
New implementation for InputForm.
checkRoleAssignmentInput($a_rule_id=0)
Check role assignment input.
setValue($a_value)
Set Value.
static _getInstance()
Get instance.
static _getInstanceByServerId($a_server_id)
Get instance of class.
saveSyncronizationSettings()
save Syncronization Settings on Role Mapping screen
static _getServerList()
Get list of all configured servers.
loadMappingDetails()
Load info about hide/show details.
static _lookupGlobalRole($a_server_id)
Lookup global role assignment.
const IL_LDAP_BIND_ANONYMOUS
if(!array_key_exists('StateId', $_REQUEST)) $id
getServer()
Get server settings.
updateRoleMapping()
Check edit screen input and save to db ilRbacReview $rbacreview.
setSubTabs()
Set sub tabs for ldap section.
static _lookupTitle($a_id)
lookup object title
editRoleAssignment()
Edit role assignment.
prepareRoleSelect($a_as_select=true)
Used for old style table.
setValuesByArray()
set values of form array
setInfo($a_info)
Set Info.
initRoleMappingForm($command)
init propertyformgui for Assignment of LDAP Attributes to ILIAS User Profile
showRoleSelection()
show role selection
confirmDeleteRoleMapping()
confirm delete role mappings
static _getRules($a_server_id)
Get all rules.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
addRoleMapping()
Add Assigments for role mapping.
confirmDeleteServerSettings()
Confirm delete rules.
static _getInstanceByServerId($a_server_id)
Get instance of class.
foreach($_POST as $key=> $value) $res
deleteRules()
delete role assignment rule
static _sortIds($a_ids, $a_table, $a_field, $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.
addSubItem($a_item)
Add Subitem.
static _getInstanceByRuleId($a_rule_id)
get instance by rule id
addRoleAutoCompleteObject()
Add Member for autoComplete.
addRoleAssignment()
add new role assignment
setSize($a_size)
Set Size.
This class represents a text property in a property form.
userMapping()
Ldap User Mapping.
roleAssignments()
Edit role assignments.
roleMapping()
Role Mapping Tab ilToolbarGUI $ilToolbar.
updateRoleAssignment()
update role assignment
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
initUserMappingForm()
Create Property Form GUI for User Mapping.
saveRoleSelection()
Save role selection.
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
This class represents a non editable value in a property form.
This class represents a text area property in a property form.
initFormRoleAssignments($a_mode)
Init form table for new role assignments.
static _getMappingRulesByClass($a_class)
Get mapping rule by objectClass.
if(empty($password)) $table
loadRoleAssignmentRule($a_rule_id, $a_from_form=true)
Load input from form.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
getRoleAssignmentTable()
Show active role assignments.
Confirmation screen class.
editRoleMapping()
Edit Assigments for role mapping.