43 $this->tabs_gui = $ilTabs;
45 $this->lng->loadLanguageModule(
'ldap');
49 if(
$_GET[
"cmd"] !=
"addServerSettings")
51 $this->ctrl->saveParameter($this,
'ldap_server_id');
55 $this->ref_id = $a_auth_ref_id;
65 $next_class = $this->ctrl->getNextClass($this);
66 $cmd = $this->ctrl->getCmd();
68 if(!$ilAccess->checkAccess(
'write',
'',$this->ref_id) &&
$cmd !=
"serverList")
71 $ilCtrl->redirect($this,
"serverList");
108 $this->tabs_gui->setTabActive(
'role_assignments');
110 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ldap_role_assignments.html',
'Services/LDAP');
112 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
114 $this->tpl->setVariable(
'NEW_ASSIGNMENT_TBL',$this->form->getHTML());
119 include_once(
"./Services/LDAP/classes/class.ilLDAPRoleAssignmentTableGUI.php");
121 $table_gui->setTitle($this->lng->txt(
"ldap_tbl_role_ass"));
122 $table_gui->parse($rules);
123 $table_gui->addMultiCommand(
"confirmDeleteRules", $this->lng->txt(
"delete"));
124 $table_gui->setSelectAllCheckbox(
"rule_id");
125 $this->tpl->setVariable(
'RULES_TBL',$table_gui->getHTML());
138 if(!(
int)
$_GET[
'rule_id'])
145 $this->tabs_gui->setTabActive(
'role_assignments');
147 $this->ctrl->saveParameter($this,
'rule_id',(
int) $_GET[
'rule_id']);
148 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
152 $this->tpl->setContent($this->form->getHTML());
164 $role_id = $this->role_mapping_rule->getRoleId();
165 if($rbacreview->isGlobalRole($role_id))
167 $val[
'role_name'] = 0;
168 $val[
'role_id'] = $role_id;
172 $val[
'role_name'] = 1;
175 $val[
'add_missing'] = (int) $this->role_mapping_rule->isAddOnUpdateEnabled();
176 $val[
'remove_deprecated'] = (int) $this->role_mapping_rule->isRemoveOnUpdateEnabled();
177 $val[
'type'] = (int) $this->role_mapping_rule->getType();
178 $val[
'dn'] = $this->role_mapping_rule->getDN();
179 $val[
'at'] = $this->role_mapping_rule->getMemberAttribute();
180 $val[
'isdn'] = $this->role_mapping_rule->isMemberAttributeDN();
181 $val[
'name'] = $this->role_mapping_rule->getAttributeName();
182 $val[
'value'] = $this->role_mapping_rule->getAttributeValue();
183 $val[
'plugin_id'] = $this->role_mapping_rule->getPluginId();
185 $this->form->setValuesByArray($val);
198 if(!$ilAccess->checkAccess(
'write',
'',$this->ref_id))
201 $this->roleAssignment();
205 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
206 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
216 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ldap_role_assignments.html',
'Services/LDAP');
219 $this->form->setValuesByPost();
220 $this->tpl->setVariable(
'NEW_ASSIGNMENT_TBL',$this->form->getHTML());
221 #$this->tpl->setVariable('RULES_TBL',$this->getRoleAssignmentTable()); 222 $this->tabs_gui->setSubTabActive(
'shib_role_assignment');
230 $this->rule->update();
245 if(!is_array(
$_POST[
'rule_ids']))
252 $this->tabs_gui->setTabActive(
'role_assignments');
254 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
258 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteRules"));
259 $c_gui->setHeaderText($this->lng->txt(
"ldap_confirm_del_role_ass"));
260 $c_gui->setCancel($this->lng->txt(
"cancel"),
"roleAssignments");
261 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteRules");
264 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
265 foreach(
$_POST[
"rule_ids"] as $rule_id)
268 $c_gui->addItem(
'rule_ids[]',$rule_id,$rule->conditionToString());
270 $this->tpl->setContent($c_gui->getHTML());
281 if(!is_array(
$_POST[
'rule_ids']))
287 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
288 foreach(
$_POST[
"rule_ids"] as $rule_id)
308 if(!$ilAccess->checkAccess(
'write',
'',$this->ref_id))
311 $this->roleAssignment();
315 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
316 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
326 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ldap_role_assignments.html',
'Services/LDAP');
329 $this->form->setValuesByPost();
330 $this->tpl->setVariable(
'NEW_ASSIGNMENT_TBL',$this->form->getHTML());
332 $this->tabs_gui->setSubTabActive(
'shib_role_assignment');
340 $this->rule->create();
353 if($this->rule->getRoleId() > 0)
358 $_SESSION[
'ldap_role_ass'][
'rule_id'] = $_REQUEST[
'rule_id'] ? $_REQUEST[
'rule_id'] : 0;
359 $_SESSION[
'ldap_role_ass'][
'role_search'] = $this->form->getInput(
'role_search');
360 $_SESSION[
'ldap_role_ass'][
'add_on_update'] = $this->form->getInput(
'add_missing');
361 $_SESSION[
'ldap_role_ass'][
'remove_on_update'] = $this->form->getInput(
'remove_deprecated');
362 $_SESSION[
'ldap_role_ass'][
'type'] = $this->form->getInput(
'type');
363 $_SESSION[
'ldap_role_ass'][
'dn'] = $this->form->getInput(
'dn');
364 $_SESSION[
'ldap_role_ass'][
'at'] = $this->form->getInput(
'at');
365 $_SESSION[
'ldap_role_ass'][
'isdn'] = $this->form->getInput(
'isdn');
366 $_SESSION[
'ldap_role_ass'][
'name'] = $this->form->getInput(
'name');
367 $_SESSION[
'ldap_role_ass'][
'value'] = $this->form->getInput(
'value');
368 $_SESSION[
'ldap_role_ass'][
'plugin'] = $this->form->getInput(
'plugin_id');
371 $this->ctrl->saveParameter($this,
'rule_id');
372 $this->ctrl->redirect($this,
'showRoleSelection');
384 $this->tabs_gui->setTabActive(
'role_assignment');
385 $this->ctrl->saveParameter($this,
'rule_id');
387 include_once
'./Services/Search/classes/class.ilQueryParser.php';
389 $parser->setMinWordLength(1,
true);
393 include_once
'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
395 $object_search->setFilter(
array(
'role'));
396 $res = $object_search->performSearch();
398 $entries =
$res->getEntries();
400 include_once
'./Services/AccessControl/classes/class.ilRoleSelectionTableGUI.php';
402 $table->setTitle($this->lng->txt(
'ldap_role_selection'));
403 $table->addMultiCommand(
'saveRoleSelection',$this->lng->txt(
'ldap_choose_role'));
404 #$table->addCommandButton('roleAssignment',$this->lng->txt('cancel')); 405 $table->parse($entries);
407 $this->tpl->setContent($table->getHTML());
419 if(!$ilAccess->checkAccess(
'write',
'',$this->ref_id))
422 $this->roleAssignment();
426 if(!(
int) $_REQUEST[
'role_id'])
434 $this->rule->setRoleId((
int) $_REQUEST[
'role_id']);
436 if((
int) $_REQUEST[
'rule_id'])
438 $this->rule->update();
442 $this->rule->create();
461 $this->rule->validate();
462 return $ilErr->getMessage();
474 include_once(
"./Services/LDAP/classes/class.ilLDAPRoleAssignmentTableGUI.php");
476 $table_gui->setTitle($this->lng->txt(
"ldap_tbl_role_ass"));
477 $table_gui->parse($rules);
478 $table_gui->addMultiCommand(
"confirmDeleteRules", $this->lng->txt(
"delete"));
479 $table_gui->setSelectAllCheckbox(
"rule_id");
480 return $table_gui->getHTML();
493 if(is_object($this->rule))
498 include_once
'./Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php';
504 if($this->form->getInput(
'role_name') == 0)
506 $this->rule->setRoleId($this->form->getInput(
'role_id'));
508 elseif($this->form->getInput(
'role_search'))
511 include_once
'./Services/Search/classes/class.ilQueryParser.php';
516 $parser->setMinWordLength(1,
true);
520 include_once
'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
522 $object_search->setFilter(
array(
'role'));
523 $res = $object_search->performSearch();
525 $entries =
$res->getEntries();
526 if(count($entries) == 1)
528 $role = current($entries);
529 $this->rule->setRoleId($role[
'obj_id']);
531 elseif(count($entries) > 1)
533 $this->rule->setRoleId(-1);
537 $this->rule->setAttributeName($this->form->getInput(
'name'));
538 $this->rule->setAttributeValue($this->form->getInput(
'value'));
539 $this->rule->setDN($this->form->getInput(
'dn'));
540 $this->rule->setMemberAttribute($this->form->getInput(
'at'));
541 $this->rule->setMemberIsDN($this->form->getInput(
'isdn'));
542 $this->rule->enableAddOnUpdate($this->form->getInput(
'add_missing'));
543 $this->rule->enableRemoveOnUpdate($this->form->getInput(
'remove_deprecated'));
544 $this->rule->setPluginId($this->form->getInput(
'plugin_id'));
545 $this->rule->setType($this->form->getInput(
'type'));
546 $this->rule->setServerId($this->
getServer()->getServerId());
552 $this->rule->setServerId($this->
getServer()->getServerId());
553 $this->rule->enableAddOnUpdate((
int)
$_SESSION[
'ldap_role_ass'][
'add_on_update']);
554 $this->rule->enableRemoveOnUpdate((
int) $_SESSION[
'ldap_role_ass'][
'remove_on_update']);
567 if(!count(
$_POST[
'mappings']))
576 foreach(
$_POST[
'mappings'] as $mapping_id)
578 $this->role_mapping->delete($mapping_id);
587 if(!
$_POST[
'mapping_template'])
594 $this->mapping->clearRules();
596 include_once(
'Services/LDAP/classes/class.ilLDAPAttributeMappingUtils.php');
599 $this->mapping->setRule($key,$value,0);
608 $this->tabs_gui->setTabActive(
'role_mapping');
615 foreach($this->udf->getDefinitions() as $definition)
617 $key =
'udf_'.$definition[
'field_id'];
621 $this->mapping->save();
625 unset(
$_POST[
'mapping_template']);
631 global $ilAccess,
$ilErr, $ilToolbar;
633 if(!$ilAccess->checkAccess(
'read',
'',$this->ref_id) &&
$cmd !=
"serverList")
635 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_write'),$ilErr->WARNING);
640 ilUtil::sendFailure(
'Missing LDAP libraries. Please ensure that the PHP LDAP module is installed on your server.');
643 $ilToolbar->addButton($this->lng->txt(
"add_ldap_server"),
644 $this->ctrl->getLinkTarget($this,
"addServerSettings"));
646 include_once
'./Services/LDAP/classes/class.ilLDAPServerTableGUI.php';
651 return $this->tpl->setContent($table->getHTML());
656 $this->form_gui->setValuesByArray(
array(
657 'active' => $this->server->isActive(),
658 'ds' => !$this->server->isAuthenticationEnabled(),
659 'server_name' => $this->server->getName(),
660 'server_url' => $this->server->getUrlString(),
661 'version' => $this->server->getVersion(),
662 'base_dn' => $this->server->getBaseDN(),
663 'referrals' => $this->server->isActiveReferrer(),
664 'tls' => $this->server->isActiveTLS(),
665 'binding_type' => $this->server->getBindingType(),
666 'bind_dn' => $this->server->getBindUser(),
667 'bind_pass' => $this->server->getBindPassword(),
668 'bind_pass_retype' => $this->server->getBindPassword(),
669 'search_base' => $this->server->getSearchBase(),
670 'user_scope' => $this->server->getUserScope(),
671 'user_attribute' => $this->server->getUserAttribute(),
672 'filter' => $this->server->getFilter(),
673 'group_dn' => $this->server->getGroupDN(),
674 'group_scope' => $this->server->getGroupScope(),
675 'group_filter' => $this->server->getGroupFilter(),
676 'group_member' => $this->server->getGroupMember(),
677 'memberisdn' => $this->server->enabledGroupMemberIsDN(),
678 'group' => $this->server->getGroupName(),
679 'group_attribute' => $this->server->getGroupAttribute(),
680 'group_optional' => $this->server->isMembershipOptional(),
681 'group_user_filter' => $this->server->getGroupUserFilter(),
682 'sync_on_login' => $this->server->enabledSyncOnLogin(),
683 'sync_per_cron' => $this->server->enabledSyncPerCron(),
685 'migration' => (
int)$this->server->isAccountMigrationEnabled(),
687 "name_filter" => $this->server->getUsernameFilter()
694 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
697 $this->form_gui->setFormAction($this->ctrl->getFormAction($this,
'save'));
698 $this->form_gui->setTitle($this->lng->txt(
'ldap_configure'));
702 $this->form_gui->addItem($active);
706 $ds->setInfo($this->lng->txt(
'ldap_as_ds_info'));
707 $this->form_gui->addItem($ds);
709 $servername =
new ilTextInputGUI($this->lng->txt(
'ldap_server_name'),
'server_name');
711 $servername->setInfo($this->lng->txt(
'ldap_server_name_info'));
712 $servername->setSize(32);
713 $servername->setMaxLength(32);
714 $this->form_gui->addItem($servername);
717 $namefilter =
new ilTextInputGUI($this->lng->txt(
'ldap_username_filter'),
"name_filter");
718 $namefilter->
setInfo($this->lng->txt(
"ldap_username_filter_info"));
719 $namefilter->setSize(64);
720 $namefilter->setMaxLength(255);
721 $this->form_gui->addItem($namefilter);
724 $serverurl =
new ilTextInputGUI($this->lng->txt(
'ldap_server'),
'server_url');
726 $serverurl->setInfo($this->lng->txt(
'ldap_server_url_info'));
727 $serverurl->setSize(64);
728 $serverurl->setMaxLength(255);
729 $this->form_gui->addItem($serverurl);
733 $version->setInfo($this->lng->txt(
'ldap_server_version_info'));
736 $basedsn =
new ilTextInputGUI($this->lng->txt(
'basedn'),
'base_dn');
738 $basedsn->setSize(64);
739 $basedsn->setMaxLength(255);
740 $this->form_gui->addItem($basedsn);
744 $referrals->setInfo($this->lng->txt(
'ldap_referrals_info'));
745 $this->form_gui->addItem($referrals);
748 $section_security->setTitle($this->lng->txt(
'ldap_server_security_settings'));
749 $this->form_gui->addItem($section_security);
753 $this->form_gui->addItem($tls);
757 $binding->addOption($anonymous);
759 $dn =
new ilTextInputGUI($this->lng->txt(
'ldap_server_bind_dn'),
'bind_dn');
761 $dn->setMaxLength(255);
764 $pass->setSkipSyntaxCheck(
true);
766 $pass->setMaxLength(36);
767 $user->addSubItem(
$pass);
768 $binding->addOption($user);
769 $this->form_gui->addItem($binding);
772 $section_auth->setTitle($this->lng->txt(
'ldap_authentication_settings'));
773 $this->form_gui->addItem($section_auth);
775 $search_base =
new ilTextInputGUI($this->lng->txt(
'ldap_user_dn'),
'search_base');
776 $search_base->
setInfo($this->lng->txt(
'ldap_search_base_info'));
777 $search_base->setSize(64);
778 $search_base->setMaxLength(255);
779 $this->form_gui->addItem($search_base);
781 $user_scope =
new ilSelectInputGUI($this->lng->txt(
'ldap_user_scope'),
'user_scope');
784 $user_scope->setInfo($this->lng->txt(
'ldap_user_scope_info'));
785 $this->form_gui->addItem($user_scope);
787 $user_attribute =
new ilTextInputGUI($this->lng->txt(
'ldap_user_attribute'),
'user_attribute');
789 $user_attribute->setMaxLength(64);
790 $user_attribute->setRequired(
true);
791 $this->form_gui->addItem($user_attribute);
793 $filter =
new ilTextInputGUI($this->lng->txt(
'ldap_search_filter'),
'filter');
794 $filter->
setInfo($this->lng->txt(
'ldap_filter_info'));
795 $filter->setSize(64);
796 $filter->setMaxLength(512);
797 $this->form_gui->addItem($filter);
800 $section_restrictions->setTitle($this->lng->txt(
'ldap_group_restrictions'));
801 $this->form_gui->addItem($section_restrictions);
803 $group_dn =
new ilTextInputGUI($this->lng->txt(
'ldap_group_search_base'),
'group_dn');
804 $group_dn->
setInfo($this->lng->txt(
'ldap_group_dn_info'));
805 $group_dn->setSize(64);
806 $group_dn->setMaxLength(255);
807 $this->form_gui->addItem($group_dn);
809 $group_scope =
new ilSelectInputGUI($this->lng->txt(
'ldap_group_scope'),
'group_scope');
812 $group_scope->setInfo($this->lng->txt(
'ldap_group_scope_info'));
813 $this->form_gui->addItem($group_scope);
815 $group_filter =
new ilTextInputGUI($this->lng->txt(
'ldap_group_filter'),
'group_filter');
816 $group_filter->
setInfo($this->lng->txt(
'ldap_group_filter_info'));
817 $group_filter->setSize(64);
818 $group_filter->setMaxLength(255);
819 $this->form_gui->addItem($group_filter);
821 $group_member =
new ilTextInputGUI($this->lng->txt(
'ldap_group_member'),
'group_member');
822 $group_member->
setInfo($this->lng->txt(
'ldap_group_member_info'));
823 $group_member->setSize(32);
824 $group_member->setMaxLength(255);
825 $this->form_gui->addItem($group_member);
828 $group_member_isdn =
new ilCheckboxInputGUI($this->lng->txt(
'ldap_memberisdn'),
'memberisdn');
829 #$group_member_isdn->setInfo($this->lng->txt('ldap_group_member_info')); 830 $this->form_gui->addItem($group_member_isdn);
831 #$group_member->addSubItem($group_member_isdn); 833 $group =
new ilTextInputGUI($this->lng->txt(
'ldap_group_name'),
'group');
834 $group->
setInfo($this->lng->txt(
'ldap_group_name_info'));
836 $group->setMaxLength(255);
837 $this->form_gui->addItem($group);
839 $group_atrr =
new ilTextInputGUI($this->lng->txt(
'ldap_group_attribute'),
'group_attribute');
840 $group_atrr->
setInfo($this->lng->txt(
'ldap_group_attribute_info'));
841 $group_atrr->setSize(16);
842 $group_atrr->setMaxLength(64);
843 $this->form_gui->addItem($group_atrr);
845 $group_optional =
new ilCheckboxInputGUI($this->lng->txt(
'ldap_group_membership'),
'group_optional');
846 $group_optional->
setOptionTitle($this->lng->txt(
'ldap_group_member_optional'));
847 $group_optional->setInfo($this->lng->txt(
'ldap_group_optional_info'));
848 $group_optional->setValue(1);
849 $group_user_filter =
new ilTextInputGUI($this->lng->txt(
'ldap_group_user_filter'),
'group_user_filter');
850 $group_user_filter->
setSize(64);
851 $group_user_filter->setMaxLength(255);
852 $group_optional->addSubItem($group_user_filter);
853 $this->form_gui->addItem($group_optional);
856 $section_sync->setTitle($this->lng->txt(
'ldap_user_sync'));
857 $this->form_gui->addItem($section_sync);
860 $sync_on_login =
new ilCheckboxInputGUI($this->lng->txt(
'ldap_sync_login'),
'sync_on_login');
861 $sync_on_login->setValue(1);
863 $sync_per_cron =
new ilCheckboxInputGUI($this->lng->txt(
'ldap_sync_cron'),
'sync_per_cron');
865 $ci_gui->addSubItem($sync_per_cron);
866 $ci_gui->setInfo($this->lng->txt(
'ldap_user_sync_info'));
867 $this->form_gui->addItem($ci_gui);
869 $global_role =
new ilSelectInputGUI($this->lng->txt(
'ldap_global_role_assignment'),
'global_role');
871 $global_role->setInfo($this->lng->txt(
'ldap_global_role_info'));
872 $this->form_gui->addItem($global_role);
875 $migr->
setInfo($this->lng->txt(
'auth_ldap_migration_info'));
877 $this->form_gui->addItem($migr);
880 include_once
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
888 $this->form_gui->addCommandButton(
'save', $this->lng->txt(
'save'));
889 if(
$_GET[
"cmd"] ==
"addServerSettings")
891 $this->form_gui->addCommandButton(
'serverList',$this->lng->txt(
'cancel'));
903 $this->tabs_gui->setTabActive(
'settings');
906 if($this->form_gui->checkInput())
908 $this->server->toggleActive((
int)$this->form_gui->getInput(
'active'));
909 $this->server->enableAuthentication(!$this->form_gui->getInput(
'ds'));
910 $this->server->setName($this->form_gui->getInput(
'server_name'));
911 $this->server->setUrl($this->form_gui->getInput(
'server_url'));
912 $this->server->setVersion($this->form_gui->getInput(
'version'));
913 $this->server->setBaseDN($this->form_gui->getInput(
'base_dn'));
914 $this->server->toggleReferrer($this->form_gui->getInput(
'referrals'));
915 $this->server->toggleTLS($this->form_gui->getInput(
'tls'));
916 $this->server->setBindingType((
int)$this->form_gui->getInput(
'binding_type'));
917 $this->server->setBindUser($this->form_gui->getInput(
'bind_dn'));
918 $this->server->setBindPassword($this->form_gui->getInput(
'bind_pass'));
919 $this->server->setSearchBase($this->form_gui->getInput(
'search_base'));
920 $this->server->setUserScope($this->form_gui->getInput(
'user_scope'));
921 $this->server->setUserAttribute($this->form_gui->getInput(
'user_attribute'));
922 $this->server->setFilter($this->form_gui->getInput(
'filter'));
923 $this->server->setGroupDN($this->form_gui->getInput(
'group_dn'));
924 $this->server->setGroupScope((
int)$this->form_gui->getInput(
'group_scope'));
925 $this->server->setGroupFilter($this->form_gui->getInput(
'group_filter'));
926 $this->server->setGroupMember($this->form_gui->getInput(
'group_member'));
927 $this->server->enableGroupMemberIsDN((
int)$this->form_gui->getInput(
'memberisdn'));
928 $this->server->setGroupName($this->form_gui->getInput(
'group'));
929 $this->server->setGroupAttribute($this->form_gui->getInput(
'group_attribute'));
930 $this->server->setGroupUserFilter($this->form_gui->getInput(
'group_user_filter'));
931 $this->server->toggleMembershipOptional((
int)$this->form_gui->getInput(
'group_optional'));
932 $this->server->enableSyncOnLogin((
int)$this->form_gui->getInput(
'sync_on_login'));
933 $this->server->enableSyncPerCron((
int)$this->form_gui->getInput(
'sync_per_cron'));
934 $this->server->setGlobalRole((
int)$this->form_gui->getInput(
'global_role'));
935 $this->server->enableAccountMigration((
int)$this->form_gui->getInput(
'migration'));
937 $this->server->setUsernameFilter($this->form_gui->getInput(
"name_filter"));
939 if(!$this->server->validate())
942 $this->form_gui->setValuesByPost();
943 return $this->tpl->setContent($this->form_gui->getHtml());
947 if($this->server->getServerId())
949 $this->server->update();
953 $this->server->create();
958 $this->mapping->setRule(
'global_role', (
int) $this->form_gui->getInput(
'global_role'),
false);
959 $this->mapping->save();
962 $this->ctrl->redirect($this,
'serverList');
964 #$this->form_gui->setValuesByPost(); 965 #return $this->tpl->setContent($this->form_gui->getHtml()); 968 $this->form_gui->setValuesByPost();
969 return $this->tpl->setContent($this->form_gui->getHtml());
981 $this->tabs_gui->clearTargets();
983 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),
984 $this->ctrl->getLinkTarget($this,
'serverList'));
990 $this->tabs_gui->addTab(
"settings", $this->lng->txt(
"ldap_settings"),
991 $this->ctrl->getLinkTarget($this,
'editServerSettings'));
994 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
1004 $this->tabs_gui->addTab(
"user_mapping",$this->lng->txt(
"ldap_user_mapping"),
1005 $this->ctrl->getLinkTarget($this,
'userMapping'));
1011 $this->tabs_gui->addTab(
"role_assignments",$this->lng->txt(
'ldap_role_assignments'),
1012 $this->ctrl->getLinkTarget($this,
'roleAssignments'));
1018 $this->tabs_gui->addTab(
"role_mapping",$this->lng->txt(
"ldap_role_mapping"),
1019 $this->ctrl->getLinkTarget($this,
'roleMapping'));
1026 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
1027 if(!$_REQUEST[
'ldap_server_id'])
1029 $_REQUEST[
'ldap_server_id'] = 0;
1031 $this->server =
new ilLDAPServer((
int) $_REQUEST[
'ldap_server_id']);
1036 include_once
'./Services/LDAP/classes/class.ilLDAPAttributeMapping.php';
1042 include_once
'./Services/LDAP/classes/class.ilLDAPRoleGroupMappingSettings.php';
1053 global $rbacreview,$ilObjDataCache;
1060 $select[0] = $this->lng->txt(
'links_select_one');
1061 foreach($global_roles as $role_id)
1077 global $rbacreview,$ilObjDataCache;
1079 include_once(
'./Services/LDAP/classes/class.ilLDAPAttributeMapping.php');
1086 $select[0] = $this->lng->txt(
'links_select_one');
1087 foreach($global_roles as $role_id)
1095 'global_role',$select,
false,
true);
1106 return array(
'gender' => $this->lng->txt(
'gender'),
1107 'firstname' => $this->lng->txt(
'firstname'),
1108 'lastname' => $this->lng->txt(
'lastname'),
1109 'title' => $this->lng->txt(
'person_title'),
1110 'institution' => $this->lng->txt(
'institution'),
1111 'department' => $this->lng->txt(
'department'),
1112 'street' => $this->lng->txt(
'street'),
1113 'city' => $this->lng->txt(
'city'),
1114 'zipcode' => $this->lng->txt(
'zipcode'),
1115 'country' => $this->lng->txt(
'country'),
1116 'phone_office' => $this->lng->txt(
'phone_office'),
1117 'phone_home' => $this->lng->txt(
'phone_home'),
1118 'phone_mobile' => $this->lng->txt(
'phone_mobile'),
1119 'fax' => $this->lng->txt(
'fax'),
1120 'email' => $this->lng->txt(
'email'),
1121 'hobby' => $this->lng->txt(
'hobby'),
1122 'matriculation' => $this->lng->txt(
'matriculation'));
1123 #'photo' => $this->lng->txt('photo')); 1128 include_once(
"./Services/User/classes/class.ilUserDefinedFields.php");
1135 "inetOrgPerson" =>
'inetOrgPerson',
1136 "organizationalPerson" =>
'organizationalPerson',
1137 "person" =>
'person',
1138 "ad_2003" =>
'Active Directory (Win 2003)'),
false,
true);
1149 if(!isset(
$_SESSION[
'ldap_mapping_details']))
1153 if(isset(
$_GET[
'details_show']))
1155 $_SESSION[
'ldap_mapping_details'][
$_GET[
'details_show']] = $_GET[
'details_show'];
1157 if(isset(
$_GET[
'details_hide']))
1173 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
1174 include_once(
'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php');
1177 $this->form->setFormAction($this->ctrl->getFormAction($this));
1182 $this->form->setTitle($this->lng->txt(
'ldap_edit_role_ass_rule'));
1183 $this->form->addCommandButton(
'updateRoleAssignment',$this->lng->txt(
'save'));
1187 $this->form->setTitle($this->lng->txt(
'ldap_add_role_ass_rule'));
1188 $this->form->addCommandButton(
'addRoleAssignment',$this->lng->txt(
'ldap_btn_add_role_ass'));
1197 $global =
new ilRadioOption($this->lng->txt(
'ldap_global_role'),0);
1198 $role->addOption($global);
1202 $global->addSubItem($role_select);
1204 $local =
new ilRadioOption($this->lng->txt(
'ldap_local_role'),1);
1205 $role->addOption($local);
1207 include_once
'./Services/Form/classes/class.ilRoleAutoCompleteInputGUI.php';
1209 $role_search->setSize(40);
1210 $local->addSubItem($role_search);
1212 $role->setInfo($this->lng->txt(
'ldap_role_name_info'));
1213 $this->form->addItem($role);
1217 $update->
setValue($this->lng->txt(
'ldap_check_role_assignment'));
1220 $add->setOptionTitle($this->lng->txt(
'ldap_add_missing'));
1221 $update->addSubItem($add);
1224 $remove->setOptionTitle($this->lng->txt(
'ldap_remove_deprecated'));
1225 $update->addSubItem($remove);
1227 $this->form->addItem($update);
1233 #$group->setValue($current_rule->getType()); 1240 #$dn->setValue($current_rule->getDN()); 1242 $dn->setMaxLength(512);
1243 $dn->
setInfo($this->lng->txt(
'ldap_role_grp_dn_info'));
1244 $radio_group->addSubItem($dn);
1245 $at =
new ilTextInputGUI($this->lng->txt(
'ldap_role_grp_at'),
'at');
1246 #$at->setValue($current_rule->getMemberAttribute()); 1248 $at->setMaxLength(128);
1249 $radio_group->addSubItem($at);
1251 #$isdn->setChecked($current_rule->isMemberAttributeDN()); 1252 $isdn->
setInfo($this->lng->txt(
'ldap_group_member_info'));
1253 $radio_group->addSubItem($isdn);
1254 $radio_group->setInfo($this->lng->txt(
'ldap_role_grp_info'));
1256 $group->addOption($radio_group);
1260 $name =
new ilTextInputGUI($this->lng->txt(
'ldap_role_at_name'),
'name');
1261 #$name->setValue($current_rule->getAttributeName()); 1263 $name->setMaxLength(128);
1264 #$name->setInfo($this->lng->txt('ldap_role_at_name_info')); 1268 $val =
new ilTextInputGUI($this->lng->txt(
'ldap_role_at_value'),
'value');
1269 #$val->setValue($current_rule->getAttributeValue()); 1271 $val->setMaxLength(128);
1272 #$val->setInfo($this->lng->txt('ldap_role_at_value_info')); 1273 $radio_attribute->addSubItem($val);
1274 $radio_attribute->setInfo($this->lng->txt(
'ldap_role_at_info'));
1276 $group->addOption($radio_attribute);
1281 $pl->
setInfo($this->lng->txt(
'ldap_plugin_info'));
1282 $pl->setDisabled(!$pl_active);
1287 $id->setMaxLength(3);
1288 $id->setMaxValue(999);
1289 $id->setMinValue(1);
1290 $pl->addSubItem($id);
1292 $group->addOption($pl);
1293 $this->form->addItem($group);
1302 global $ilPluginAdmin;
1304 return count($ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
'LDAP',
'ldaphk')) ?
true :
false;
1313 include_once(
"./Services/Form/classes/class.ilRoleAutoCompleteInputGUI.php");
1327 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
1330 $select_form->setPostVar(
"mapping_template");
1332 "" => $this->lng->txt(
'ldap_mapping_template'),
1333 "inetOrgPerson" =>
'inetOrgPerson',
1334 "organizationalPerson" =>
'organizationalPerson',
1335 "person" =>
'person',
1336 "ad_2003" =>
'Active Directory (Win 2003)');
1337 $select_form->setOptions(
$options);
1338 $select_form->setValue(
$_POST[
'mapping_template']);
1340 $ilToolbar->addInputItem($select_form);
1341 $ilToolbar->addFormButton($this->lng->txt(
'show'),
"chooseMapping");
1342 $ilToolbar->setFormAction($this->ctrl->getFormAction($this,
"chooseMapping"));
1351 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1353 $propertie_form->setTitle($this->lng->txt(
'ldap_mapping_table'));
1354 $propertie_form->setFormAction($this->ctrl->getFormAction($this,
'saveMapping'));
1355 $propertie_form->addCommandButton(
'saveMapping',$this->lng->txt(
'save'));
1360 $text_form->setPostVar($mapping.
"_value");
1361 $text_form->setValue($this->mapping->getValue($mapping));
1362 $text_form->setSize(32);
1363 $text_form->setMaxLength(255);
1364 $propertie_form->addItem($text_form);
1367 $checkbox_form->setPostVar($mapping .
"_update");
1368 $checkbox_form->setChecked($this->mapping->enabledUpdate($mapping));
1369 $checkbox_form->setOptionTitle($this->lng->txt(
'ldap_update_field_info'));
1370 $propertie_form->addItem($checkbox_form);
1374 foreach($this->udf->getDefinitions() as $definition)
1377 $text_form->setPostVar(
'udf_'.$definition[
'field_id'].
'_value');
1378 $text_form->setValue($this->mapping->getValue(
'udf_'.$definition[
'field_id']));
1379 $text_form->setSize(32);
1380 $text_form->setMaxLength(255);
1381 $propertie_form->addItem($text_form);
1384 $checkbox_form->setPostVar(
'udf_'.$definition[
'field_id'].
'_update');
1385 $checkbox_form->setChecked($this->mapping->enabledUpdate(
'udf_'.$definition[
'field_id']));
1386 $checkbox_form->setOptionTitle($this->lng->txt(
'ldap_update_field_info'));
1387 $propertie_form->addItem($checkbox_form);
1390 return $propertie_form;
1401 $this->tabs_gui->setTabActive(
'role_mapping');
1402 $ilToolbar->addButton($this->lng->txt(
"ldap_new_role_assignment") ,
1403 $this->ctrl->getLinkTarget($this,
'addRoleMapping'));
1404 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1407 include_once(
"./Services/Form/classes/class.ilCombinationInputGUI.php");
1409 $propertie_form->setTitle($this->lng->txt(
'ldap_role_settings'));
1410 $propertie_form->setFormAction($this->ctrl->getFormAction($this,
"saveSyncronizationSettings"));
1411 $propertie_form->addCommandButton(
"saveSyncronizationSettings" ,$this->lng->txt(
'save'));
1413 $role_active->
setPostVar(
'role_sync_active');
1414 $role_active->setChecked($this->server->enabledRoleSynchronization() ? true :
false);
1415 $propertie_form->addItem($role_active);
1417 $binding->
setInfo($this->lng->txt(
'ldap_role_bind_user_info'));
1419 $user->setPostVar(
"role_bind_user");
1420 $user->setValue($this->server->getRoleBindDN());
1422 $user->setMaxLength(255);
1423 $binding->addCombinationItem(0, $user, $this->lng->txt(
'ldap_role_bind_user'));
1425 $pass->setPostVar(
"role_bind_pass");
1426 $pass->setValue($this->server->getRoleBindPassword());
1428 $pass->setMaxLength(36);
1429 $pass->setRetype(
false);
1430 $binding->addCombinationItem(1,
$pass, $this->lng->txt(
'ldap_role_bind_pass'));
1431 $propertie_form->addItem($binding);
1433 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ldap_role_mappings.html',
'Services/LDAP');
1434 $this->tpl->setVariable(
"NEW_ASSIGNMENT_TBL",$propertie_form->getHTML());
1437 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSettings.php');
1439 $mappings = $mapping_instance->getMappings();
1440 if(count($mappings))
1442 include_once(
"./Services/LDAP/classes/class.ilLDAPRoleMappingTableGUI.php");
1444 $table_gui->
setTitle($this->lng->txt(
'ldap_role_group_assignments'));
1445 $table_gui->setData($mappings);
1446 $this->tpl->setVariable(
"RULES_TBL",$table_gui->getHTML());
1455 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSetting.php');
1460 $propertie_form->setTitle($this->lng->txt(
'ldap_edit_role_assignment'));
1461 $propertie_form->getItemByPostVar(
"url")->setValue($mapping->getURL());
1462 $propertie_form->getItemByPostVar(
"dn")->setValue($mapping->getDN());
1463 $propertie_form->getItemByPostVar(
"member")->setValue($mapping->getMemberAttribute());
1464 $propertie_form->getItemByPostVar(
"memberisdn")->setChecked($mapping->getMemberISDN());
1465 $propertie_form->getItemByPostVar(
"role")->setValue($mapping->getRoleName());
1466 $propertie_form->getItemByPostVar(
"info")->setValue($mapping->getMappingInfo());
1467 $propertie_form->getItemByPostVar(
"info_type")->setChecked($mapping->getMappingInfoType());
1469 $this->tpl->setContent($propertie_form->getHTML());
1483 if($propertie_form->checkInput() && $rbacreview->roleExists($propertie_form->getInput(
"role")))
1485 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSetting.php');
1487 $mapping->setServerId($this->server->getServerId());
1488 $mapping->setURL($propertie_form->getInput(
"url"));
1489 $mapping->setDN($propertie_form->getInput(
"dn"));
1490 $mapping->setMemberAttribute($propertie_form->getInput(
"member"));
1491 $mapping->setMemberISDN($propertie_form->getInput(
"memberisdn"));
1492 $mapping->setRoleByName($propertie_form->getInput(
"role"));
1493 $mapping->setMappingInfo($propertie_form->getInput(
"info"));
1494 $mapping->setMappingInfoType($propertie_form->getInput(
"info_type"));
1498 $this->ctrl->redirect($this,
"roleMapping");
1502 if(!$rbacreview->roleExists($propertie_form->getInput(
"role")))
1505 $propertie_form->getInput(
"role"));
1507 $propertie_form->setValuesByPost();
1508 $this->tpl->setContent($propertie_form->getHTML());
1517 if(!is_array(
$_POST[
'mappings']))
1520 $this->ctrl->redirect($this,
"roleMapping");
1524 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
1528 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteRoleMapping"));
1529 $c_gui->setHeaderText($this->lng->txt(
"ldap_confirm_del_role_ass"));
1530 $c_gui->setCancel($this->lng->txt(
"cancel"),
"roleMapping");
1531 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteRoleMapping");
1533 foreach (
$_POST[
'mappings'] as $id)
1535 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSetting.php');
1538 $txt = $this->lng->txt(
'obj_role') .
": " . $mapping->getRoleName().
", ";
1539 $txt .= $this->lng->txt(
'ldap_group_dn') .
": " . $mapping->getDN() .
", ";
1540 $txt .= $this->lng->txt(
'ldap_server_short') .
" " . $mapping->getURL() .
", ";
1541 $txt .= $this->lng->txt(
'ldap_group_member_short') .
" " . $mapping->getMemberAttribute();
1543 $c_gui->addItem(
"mappings[]", $id,
$txt);
1545 $this->tpl->setContent($c_gui->getHTML());
1550 $this->ctrl->clearParameters($this);
1553 return $this->tpl->setContent($this->form_gui->getHtml());
1559 $this->tabs_gui->setTabActive(
'settings');
1563 return $this->tpl->setContent($this->form_gui->getHtml());
1576 if(!isset(
$_GET[
"ldap_server_id"]))
1583 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
1587 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteServerSettings"));
1588 $c_gui->setHeaderText($this->lng->txt(
"ldap_confirm_del_server_settings"));
1589 $c_gui->setCancel($this->lng->txt(
"cancel"),
"serverList");
1590 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteServerSettings");
1593 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
1594 foreach((
array)
$_GET[
"ldap_server_id"] as $server_id)
1597 $c_gui->addItem(
'server_ids[]',$server_id,$setting->getName());
1599 $this->tpl->setContent($c_gui->getHTML());
1607 if(!is_array(
$_POST[
"server_ids"]))
1614 foreach((
array)
$_POST[
"server_ids"] as $server_id)
1632 $this->tabs_gui->setTabActive(
'user_mapping');
1637 $this->tpl->setContent($propertie_form->getHTML());
1644 $this->server->toggleActive(1);
1645 $this->server->update();
1651 $this->server->toggleActive(0);
1652 $this->server->update();
1666 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1668 $this->tabs_gui->setTabActive(
'role_mapping');
1670 if(isset(
$_GET[
"mapping_id"]))
1672 $this->ctrl->setParameter($this,
'mapping_id',
$_GET[
"mapping_id"]);
1676 $propertie_form->setTitle($this->lng->txt(
'ldap_mapping_table'));
1677 $propertie_form->setFormAction($this->ctrl->getFormAction($this, $command));
1678 $propertie_form->addCommandButton($command ,$this->lng->txt(
'save'));
1679 $propertie_form->addCommandButton(
"roleMapping", $this->lng->txt(
'cancel'));
1682 $url->setPostVar(
"url");
1684 $url->setMaxLength(255);
1685 $url->setRequired(
true);
1687 $group_dn =
new ilTextInputGUI($this->lng->txt(
'ldap_group_dn'));
1689 $group_dn->setSize(50);
1690 $group_dn->setMaxLength(255);
1691 $group_dn->setInfo($this->lng->txt(
'ldap_dn_info'));
1692 $group_dn->setRequired(
true);
1694 $member =
new ilTextInputGUI($this->lng->txt(
'ldap_group_member'));
1696 $member->setSize(32);
1697 $member->setMaxLength(255);
1698 $member->setInfo($this->lng->txt(
'ldap_member_info'));
1699 $member->setRequired(
true);
1702 $member_isdn->setPostVar(
"memberisdn");
1703 $member_isdn->setOptionTitle($this->lng->txt(
'ldap_memberisdn'));
1708 $role->setMaxLength(255);
1709 $role->setInfo($this->lng->txt(
'ldap_role_info'));
1710 $role->setRequired(
true);
1713 $info->setPostVar(
"info");
1716 $info->setInfo($this->lng->txt(
'ldap_info_text_info'));
1719 $info_type->setPostVar(
"info_type");
1720 $info_type->setOptionTitle($this->lng->txt(
'ldap_mapping_info_type'));
1722 $propertie_form->addItem(
$url);
1723 $propertie_form->addItem($group_dn);
1724 $propertie_form->addItem($member);
1725 $propertie_form->addItem($member_isdn);
1726 $propertie_form->addItem($role);
1727 $propertie_form->addItem(
$info);
1728 $propertie_form->addItem($info_type);
1730 return $propertie_form;
1741 $propertie_form->getItemByPostVar(
"url")->setValue($this->server->getUrl());
1743 if(isset(
$_GET[
"mapping_id"]))
1745 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSetting.php');
1749 $propertie_form->getItemByPostVar(
"url")->setValue($mapping->getURL());
1750 $propertie_form->getItemByPostVar(
"dn")->setValue($mapping->getDN());
1751 $propertie_form->getItemByPostVar(
"member")->setValue($mapping->getMemberAttribute());
1752 $propertie_form->getItemByPostVar(
"memberisdn")->setChecked($mapping->getMemberISDN());
1753 $propertie_form->getItemByPostVar(
"role")->setValue($mapping->getRoleName());
1754 $propertie_form->getItemByPostVar(
"info")->setValue($mapping->getMappingInfo());
1755 $propertie_form->getItemByPostVar(
"info_type")->setChecked($mapping->getMappingInfoType());
1758 $this->tpl->setContent($propertie_form->getHTML());
1771 if($propertie_form->checkInput() && $rbacreview->roleExists($propertie_form->getInput(
"role")))
1773 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSetting.php');
1775 $mapping->setServerId($this->server->getServerId());
1776 $mapping->setURL($propertie_form->getInput(
"url"));
1777 $mapping->setDN($propertie_form->getInput(
"dn"));
1778 $mapping->setMemberAttribute($propertie_form->getInput(
"member"));
1779 $mapping->setMemberISDN($propertie_form->getInput(
"memberisdn"));
1780 $mapping->setRoleByName($propertie_form->getInput(
"role"));
1781 $mapping->setMappingInfo($propertie_form->getInput(
"info"));
1782 $mapping->setMappingInfoType($propertie_form->getInput(
"info_type"));
1786 $this->ctrl->redirect($this,
"roleMapping");
1790 if(!$rbacreview->roleExists($propertie_form->getInput(
"role")))
1793 $propertie_form->getInput(
"role"));
1795 $propertie_form->setValuesByPost();
1796 $this->tpl->setContent($propertie_form->getHTML());
1807 $this->server->enableRoleSynchronization((
int)
$_POST[
'role_sync_active']);
1810 if($this->server->getServerId())
1812 $this->server->update();
1815 $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
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.
if(!is_array($argv)) $options
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.
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.
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.
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.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
static _getMappingRulesByClass($a_class)
Get mapping rule by objectClass.
loadRoleAssignmentRule($a_rule_id, $a_from_form=true)
Load input from form.
getRoleAssignmentTable()
Show active role assignments.
Confirmation screen class.
editRoleMapping()
Edit Assigments for role mapping.