private function initRoleMapping()
 {
     include_once './Services/LDAP/classes/class.ilLDAPRoleGroupMappingSettings.php';
     $this->role_mapping = ilLDAPRoleGroupMappingSettings::_getInstanceByServerId((int) $_GET['ldap_server_id']);
 }
 /**
  * Role Mapping Tab
  * @global ilToolbarGUI $ilToolbar 
  */
 public function roleMapping()
 {
     global $ilToolbar;
     $this->setSubTabs();
     $this->tabs_gui->setSubTabActive('ldap_role_mapping');
     $ilToolbar->addButton($this->lng->txt("ldap_new_role_assignment"), $this->ctrl->getLinkTarget($this, 'addRoleMapping'));
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     //Set propertyform for synchronization settings
     include_once "./Services/Form/classes/class.ilCombinationInputGUI.php";
     $propertie_form = new ilPropertyFormGUI();
     $propertie_form->setTitle($this->lng->txt('ldap_role_settings'));
     $propertie_form->setFormAction($this->ctrl->getFormAction($this, "saveSyncronizationSettings"));
     $propertie_form->addCommandButton("saveSyncronizationSettings", $this->lng->txt('save'));
     $role_active = new ilCheckboxInputGUI($this->lng->txt('ldap_role_active'));
     $role_active->setPostVar('role_sync_active');
     $role_active->setChecked($this->server->enabledRoleSynchronization() ? true : false);
     $propertie_form->addItem($role_active);
     $binding = new ilCombinationInputGUI($this->lng->txt('ldap_server_binding'));
     $binding->setInfo($this->lng->txt('ldap_role_bind_user_info'));
     $user = new ilTextInputGUI("");
     $user->setPostVar("role_bind_user");
     $user->setValue($this->server->getRoleBindDN());
     $user->setSize(50);
     $user->setMaxLength(255);
     $binding->addCombinationItem(0, $user, $this->lng->txt('ldap_role_bind_user'));
     $pass = new ilPasswordInputGUI("");
     $pass->setPostVar("role_bind_pass");
     $pass->setValue($this->server->getRoleBindPassword());
     $pass->setSize(12);
     $pass->setMaxLength(36);
     $pass->setRetype(false);
     $binding->addCombinationItem(1, $pass, $this->lng->txt('ldap_role_bind_pass'));
     $propertie_form->addItem($binding);
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.ldap_role_mappings.html', 'Services/LDAP');
     $this->tpl->setVariable("NEW_ASSIGNMENT_TBL", $propertie_form->getHTML());
     //Set Group Assignments Table if mappings exist
     include_once 'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSettings.php';
     $mapping_instance = ilLDAPRoleGroupMappingSettings::_getInstanceByServerId($this->server->getServerId());
     $mappings = $mapping_instance->getMappings();
     if (count($mappings)) {
         include_once "./Services/LDAP/classes/class.ilLDAPRoleMappingTableGUI.php";
         $table_gui = new ilLDAPRoleMappingTableGUI($this, $this->server->getServerId(), "roleMapping");
         $table_gui->setTitle($this->lng->txt('ldap_role_group_assignments'));
         $table_gui->setData($mappings);
         $this->tpl->setVariable("RULES_TBL", $table_gui->getHTML());
     }
 }
 /**
  * get items from db 
  */
 function getItems()
 {
     include_once 'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSettings.php';
     $mapping_instance = ilLDAPRoleGroupMappingSettings::_getInstanceByServerId($this->server_id);
     $this->setData($mapping_instance->getMappings());
 }