summaryrefslogtreecommitdiffstats
path: root/modules-available/sysconfig
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/sysconfig')
-rw-r--r--modules-available/sysconfig/addmodule_adauth.inc.php29
-rw-r--r--modules-available/sysconfig/addmodule_ldapauth.inc.php21
-rw-r--r--modules-available/sysconfig/inc/configmodule.inc.php7
-rw-r--r--modules-available/sysconfig/inc/configmodulebaseldap.inc.php23
-rw-r--r--modules-available/sysconfig/lang/de/messages.json2
-rw-r--r--modules-available/sysconfig/lang/de/template-tags.json6
-rw-r--r--modules-available/sysconfig/lang/en/messages.json2
-rw-r--r--modules-available/sysconfig/lang/en/template-tags.json4
-rw-r--r--modules-available/sysconfig/templates/ad-selfsearch.html6
-rw-r--r--modules-available/sysconfig/templates/ad-start.html44
-rw-r--r--modules-available/sysconfig/templates/ad_ldap-checkconnection.html7
-rw-r--r--modules-available/sysconfig/templates/ad_ldap-checkcredentials.html6
-rw-r--r--modules-available/sysconfig/templates/ad_ldap-homedir.html3
-rw-r--r--modules-available/sysconfig/templates/ldap-start.html38
14 files changed, 148 insertions, 50 deletions
diff --git a/modules-available/sysconfig/addmodule_adauth.inc.php b/modules-available/sysconfig/addmodule_adauth.inc.php
index 6e4463ae..07806061 100644
--- a/modules-available/sysconfig/addmodule_adauth.inc.php
+++ b/modules-available/sysconfig/addmodule_adauth.inc.php
@@ -13,7 +13,7 @@ class AdAuth_Start extends AddModule_Base
protected function renderInternal()
{
- $ADAUTH_COMMON_FIELDS = array('title', 'server', 'searchbase', 'binddn', 'bindpw', 'home', 'homeattr', 'ssl', 'fixnumeric', 'certificate');
+ $ADAUTH_COMMON_FIELDS = array('title', 'server', 'searchbase', 'binddn', 'bindpw', 'home', 'homeattr', 'ssl', 'fixnumeric', 'certificate', 'mapping');
$data = array();
if ($this->edit !== false) {
moduleToArray($this->edit, $data, $ADAUTH_COMMON_FIELDS);
@@ -31,7 +31,12 @@ class AdAuth_Start extends AddModule_Base
if (isset($data['server']) && preg_match('/^(.*)\:(636|3269|389|3268)$/', $data['server'], $out)) {
$data['server'] = $out[1];
}
+ if (isset($data['homeattr']) && !isset($data['mapping']['homemount'])) {
+ $data['mapping']['homemount'] = $data['homeattr'];
+ }
$data['step'] = 'AdAuth_CheckConnection';
+ $data['map_empty'] = true;
+ $data['mapping'] = ConfigModuleBaseLdap::getMapping(isset($data['mapping']) ? $data['mapping'] : false, $data['map_empty']);
Render::addDialog(Dictionary::translateFile('config-module', 'adAuth_title'), false, 'ad-start', $data);
}
@@ -67,10 +72,11 @@ class AdAuth_CheckConnection extends AddModule_Base
if (preg_match('/^([^\:]+)\:(\d+)$/', $this->server, $out)) {
$ports = array($out[2]);
$this->server = $out[1];
+ // Test the default ports twice since the other one might not return all required data (home directory)
} elseif ($ssl) {
- $ports = array(636, 3269);
+ $ports = array(636, 3269, 636);
} else {
- $ports = array(389, 3268);
+ $ports = array(389, 3268, 389);
}
$this->scanTask = Taskmanager::submit('PortScan', array(
'host' => $this->server,
@@ -97,7 +103,8 @@ class AdAuth_CheckConnection extends AddModule_Base
'ssl' => Request::post('ssl'),
'fixnumeric' => Request::post('fixnumeric'),
'certificate' => Request::post('certificate', ''),
- 'taskid' => $this->scanTask['id']
+ 'taskid' => $this->scanTask['id'],
+ 'mapping' => ConfigModuleBaseLdap::getMapping(Request::post('mapping', false, 'array')),
);
$data['prev'] = 'AdAuth_Start';
if ((preg_match(AD_BOTH_REGEX, $this->bindDn) > 0) || (strlen($this->searchBase) < 2)) {
@@ -157,8 +164,8 @@ class AdAuth_SelfSearch extends AddModule_Base
$taskData['filter'] = 'sAMAccountName=' . $out[2];
} elseif (preg_match(AD_AT_REGEX, $binddn, $out) && !empty($out[1])) {
$this->originalBindDn = $binddn;
- $taskData['filter'] = 'sAMAccountName=' . $out[1];
- } elseif (preg_match('/^cn\=([^\=]+),.*?,dc\=([^\=]+),/i', Ldap::normalizeDn($binddn), $out)) {
+ $taskData['filter'] = 'userPrincipalName=' . $binddn;
+ } elseif (preg_match('/^cn\=([^\=]+),.*?dc\=([^\=]+),/i', Ldap::normalizeDn($binddn), $out)) {
if (empty($selfSearchBase)) {
$this->originalBindDn = $out[2] . '\\' . $out[1];
$taskData['filter'] = 'sAMAccountName=' . $out[1];
@@ -198,6 +205,7 @@ class AdAuth_SelfSearch extends AddModule_Base
'fingerprint' => Request::post('fingerprint'),
'certificate' => Request::post('certificate', ''),
'originalbinddn' => $this->originalBindDn,
+ 'mapping' => ConfigModuleBaseLdap::getMapping(Request::post('mapping', false, 'array')),
'prev' => 'AdAuth_Start'
);
if (empty($data['homeattr'])) {
@@ -275,6 +283,7 @@ class AdAuth_HomeAttrCheck extends AddModule_Base
'certificate' => Request::post('certificate', ''),
'originalbinddn' => Request::post('originalbinddn'),
'tryHomeAttr' => true,
+ 'mapping' => ConfigModuleBaseLdap::getMapping(Request::post('mapping', false, 'array')),
'prev' => 'AdAuth_Start',
'next' => 'AdAuth_CheckCredentials'
))
@@ -316,7 +325,8 @@ class AdAuth_CheckCredentials extends AddModule_Base
'server' => $uri,
'searchbase' => $searchbase,
'binddn' => $binddn,
- 'bindpw' => $bindpw
+ 'bindpw' => $bindpw,
+ 'mapping' => Request::post('mapping', false, 'array'),
));
if (!isset($ldapSearch['id'])) {
AddModule_Base::setStep('AdAuth_Start'); // Continues with AdAuth_Start for render()
@@ -325,8 +335,6 @@ class AdAuth_CheckCredentials extends AddModule_Base
$this->taskIds = array(
'tm-search' => $ldapSearch['id']
);
- if (isset($selfSearch['id']))
- $this->taskIds['self-search'] = $selfSearch['id'];
}
protected function renderInternal()
@@ -345,6 +353,7 @@ class AdAuth_CheckCredentials extends AddModule_Base
'fingerprint' => Request::post('fingerprint'),
'certificate' => Request::post('certificate', ''),
'originalbinddn' => Request::post('originalbinddn'),
+ 'mapping' => ConfigModuleBaseLdap::getMapping(Request::post('mapping', false, 'array')),
'prev' => 'AdAuth_Start',
'next' => 'AdAuth_HomeDir'
))
@@ -408,6 +417,7 @@ class AdAuth_HomeDir extends AddModule_Base
'fingerprint' => Request::post('fingerprint'),
'certificate' => Request::post('certificate', ''),
'originalbinddn' => Request::post('originalbinddn'),
+ 'mapping' => ConfigModuleBaseLdap::getMapping(Request::post('mapping', false, 'array')),
'prev' => 'AdAuth_Start',
'next' => 'AdAuth_Finish'
);
@@ -466,6 +476,7 @@ class AdAuth_Finish extends AddModule_Base
$module->setData('homeattr', Request::post('homeattr'));
$module->setData('certificate', Request::post('certificate'));
$module->setData('ssl', $ssl);
+ $module->setData('mapping', Request::post('mapping', false, 'array'));
$module->setData('fixnumeric', Request::post('fixnumeric', '', 'string'));
foreach (AdAuth_HomeDir::getAttributes() as $key) {
$value = Request::post($key);
diff --git a/modules-available/sysconfig/addmodule_ldapauth.inc.php b/modules-available/sysconfig/addmodule_ldapauth.inc.php
index 62120b48..a193f779 100644
--- a/modules-available/sysconfig/addmodule_ldapauth.inc.php
+++ b/modules-available/sysconfig/addmodule_ldapauth.inc.php
@@ -9,7 +9,7 @@ class LdapAuth_Start extends AddModule_Base
protected function renderInternal()
{
- $LDAPAUTH_COMMON_FIELDS = array('title', 'server', 'searchbase', 'binddn', 'bindpw', 'home', 'ssl', 'fixnumeric', 'certificate');
+ $LDAPAUTH_COMMON_FIELDS = array('title', 'server', 'searchbase', 'binddn', 'bindpw', 'home', 'homeattr', 'ssl', 'fixnumeric', 'certificate', 'mapping');
$data = array();
if ($this->edit !== false) {
moduleToArray($this->edit, $data, $LDAPAUTH_COMMON_FIELDS);
@@ -23,7 +23,12 @@ class LdapAuth_Start extends AddModule_Base
if (isset($data['server']) && preg_match('/^(.*)\:(636|389)$/', $data['server'], $out)) {
$data['server'] = $out[1];
}
+ if (isset($data['homeattr']) && !isset($data['mapping']['homemount'])) {
+ $data['mapping']['homemount'] = $data['homeattr'];
+ }
$data['step'] = 'LdapAuth_CheckConnection';
+ $data['map_empty'] = true;
+ $data['mapping'] = ConfigModuleBaseLdap::getMapping(isset($data['mapping']) ? $data['mapping'] : false, $data['map_empty']);
Render::addDialog(Dictionary::translateFile('config-module', 'ldapAuth_title'), false, 'ldap-start', $data);
}
@@ -77,7 +82,8 @@ class LdapAuth_CheckConnection extends AddModule_Base
'ssl' => Request::post('ssl'),
'fixnumeric' => Request::post('fixnumeric'),
'certificate' => Request::post('certificate', ''),
- 'taskid' => $this->scanTask['id']
+ 'taskid' => $this->scanTask['id'],
+ 'mapping' => ConfigModuleBaseLdap::getMapping(Request::post('mapping', false, 'array')),
);
$data['prev'] = 'LdapAuth_Start';
$data['next'] = 'LdapAuth_CheckCredentials';
@@ -123,6 +129,7 @@ class LdapAuth_CheckCredentials extends AddModule_Base
'binddn' => $binddn,
'bindpw' => $bindpw,
'plainldap' => true,
+ 'mapping' => Request::post('mapping', false, 'array'),
));
if (!isset($ldapSearch['id'])) {
AddModule_Base::setStep('LdapAuth_Start'); // Continues with LdapAuth_Start for render()
@@ -131,8 +138,6 @@ class LdapAuth_CheckCredentials extends AddModule_Base
$this->taskIds = array(
'tm-search' => $ldapSearch['id']
);
- if (isset($selfSearch['id']))
- $this->taskIds['self-search'] = $selfSearch['id'];
}
protected function renderInternal()
@@ -149,8 +154,9 @@ class LdapAuth_CheckCredentials extends AddModule_Base
'fixnumeric' => Request::post('fixnumeric'),
'fingerprint' => Request::post('fingerprint'),
'certificate' => Request::post('certificate', ''),
+ 'mapping' => ConfigModuleBaseLdap::getMapping(Request::post('mapping', false, 'array')),
'prev' => 'LdapAuth_Start',
- 'next' => 'LdapAuth_HomeDir'
+ 'next' => 'LdapAuth_HomeDir',
))
);
}
@@ -184,14 +190,14 @@ class LdapAuth_HomeDir extends AddModule_Base
'binddn' => Request::post('binddn'),
'bindpw' => Request::post('bindpw'),
'home' => Request::post('home'),
- 'homeattr' => Request::post('homeattr'),
'ssl' => Request::post('ssl') === 'on',
'fixnumeric' => Request::post('fixnumeric'),
'fingerprint' => Request::post('fingerprint'),
'certificate' => Request::post('certificate', ''),
'originalbinddn' => Request::post('originalbinddn'),
+ 'mapping' => ConfigModuleBaseLdap::getMapping(Request::post('mapping', false, 'array')),
'prev' => 'LdapAuth_Start',
- 'next' => 'LdapAuth_Finish'
+ 'next' => 'LdapAuth_Finish',
);
if ($this->edit !== false) {
foreach (self::getAttributes() as $key) {
@@ -249,6 +255,7 @@ class LdapAuth_Finish extends AddModule_Base
$module->setData('home', Request::post('home'));
$module->setData('certificate', Request::post('certificate'));
$module->setData('ssl', $ssl);
+ $module->setData('mapping', Request::post('mapping', false, 'array'));
$module->setData('fixnumeric', Request::post('fixnumeric', '', 'string'));
foreach (LdapAuth_HomeDir::getAttributes() as $key) {
$value = Request::post($key);
diff --git a/modules-available/sysconfig/inc/configmodule.inc.php b/modules-available/sysconfig/inc/configmodule.inc.php
index ca40094a..54d06afe 100644
--- a/modules-available/sysconfig/inc/configmodule.inc.php
+++ b/modules-available/sysconfig/inc/configmodule.inc.php
@@ -16,6 +16,9 @@ abstract class ConfigModule
private $moduleTitle = false;
private $moduleStatus = false;
private $currentVersion = 0;
+ /**
+ * @var false|array Data of module, false if not initialized
+ */
protected $moduleData = false;
/**
@@ -86,7 +89,7 @@ abstract class ConfigModule
* Get fresh instance of ConfigModule subclass for given module type.
*
* @param string $moduleType name of module type
- * @return \ConfigModule module instance
+ * @return false|\ConfigModule module instance
*/
public static function getInstance($moduleType)
{
@@ -117,7 +120,7 @@ abstract class ConfigModule
* Get module instance from id.
*
* @param int $moduleId module id to get
- * @return ConfigModule The requested module from DB, or false on error
+ * @return false|\ConfigModule The requested module from DB, or false on error
*/
public static function get($moduleId)
{
diff --git a/modules-available/sysconfig/inc/configmodulebaseldap.inc.php b/modules-available/sysconfig/inc/configmodulebaseldap.inc.php
index 686bcbc0..d8a41a8b 100644
--- a/modules-available/sysconfig/inc/configmodulebaseldap.inc.php
+++ b/modules-available/sysconfig/inc/configmodulebaseldap.inc.php
@@ -8,7 +8,28 @@ abstract class ConfigModuleBaseLdap extends ConfigModule
private static $REQUIRED_FIELDS = array('server', 'searchbase');
private static $OPTIONAL_FIELDS = array('binddn', 'bindpw', 'home', 'ssl', 'fixnumeric', 'fingerprint', 'certificate', 'homeattr',
'shareRemapMode', 'shareRemapCreate', 'shareDocuments', 'shareDownloads', 'shareDesktop', 'shareMedia',
- 'shareOther', 'shareHomeDrive', 'shareDomain', 'credentialPassthrough');
+ 'shareOther', 'shareHomeDrive', 'shareDomain', 'credentialPassthrough', 'mapping');
+
+ public static function getMapping($config = false, &$empty = true)
+ {
+ $list = array(
+ ['name' => 'uid', 'field' => 'uid', 'ad' => 'sAMAccountName'],
+ ['name' => 'uidnumber', 'field' => 'uidnumber', 'ad' => false],
+ ['name' => 'uncHomePath', 'field' => 'homemount', 'ad' => 'homeDirectory'],
+ ['name' => 'homeDirectory', 'field' => 'localhome', 'ad' => false],
+ ['name' => 'posixAccount', 'field' => 'posixAccount', 'ad' => 'user'],
+ //['name' => 'shadowAccount', 'field' => 'shadowAccount'],
+ );
+ if (is_array($config)) {
+ foreach ($list as &$item) {
+ if (!empty($config[$item['field']])) {
+ $item['value'] = $config[$item['field']];
+ $empty = false;
+ }
+ }
+ }
+ return $list;
+ }
protected function generateInternal($tgz, $parent)
{
diff --git a/modules-available/sysconfig/lang/de/messages.json b/modules-available/sysconfig/lang/de/messages.json
index 0a1f6de3..5bceb2f0 100644
--- a/modules-available/sysconfig/lang/de/messages.json
+++ b/modules-available/sysconfig/lang/de/messages.json
@@ -2,7 +2,7 @@
"config-activated": "Konfiguration {{0}} wurde aktiviert",
"config-deleted": "Konfiguration {{0}} wurde gel\u00f6scht",
"config-invalid": "Konfiguration mit ID {{0}} existiert nicht",
- "could-not-determine-binddn": "Konnte Bind-DN nicht ermitteln",
+ "could-not-determine-binddn": "Konnte Bind-DN nicht ermitteln ({{0}})",
"invalid-action": "Ung\u00fcltige Aktion: {{0}}",
"missing-file": "Es wurde keine Datei ausgew\u00e4hlt!",
"missing-title": "Kein Titel eingegeben",
diff --git a/modules-available/sysconfig/lang/de/template-tags.json b/modules-available/sysconfig/lang/de/template-tags.json
index 900b67a8..9ad29e90 100644
--- a/modules-available/sysconfig/lang/de/template-tags.json
+++ b/modules-available/sysconfig/lang/de/template-tags.json
@@ -33,6 +33,9 @@
"lang_customCertificate": "Zur Validierung zus\u00e4tzlich erforderliche (Intermediate-)Zertifikate",
"lang_customModuleInfo1": "\u00dcber ein benutzerdefiniertes Modul ist es m\u00f6glich, beliebige Dateien zum Linux-Grundsystem, das auf den Clients gebootet wird, hinzuzuf\u00fcgen. Dazu kann ein Archiv mit einer Dateisystemstruktur hochgeladen werden, die in dieser Form 1:1 in das gebootete Linux extrahiert wird.",
"lang_customModuleInfo2": "Beispiel: Enth\u00e4lt das hochgeladene Archiv eine Datei etc\/beispiel.conf, so wird auf einem gebooteten Client diese Datei als \/etc\/beispiel.conf zu finden sein.",
+ "lang_customizeAttrDesc": "Hier k\u00f6nnen Sie die Standardwerte f\u00fcr bestimmte Attribute und deren Werte \u00fcberschreiben, wenn ihr LDAP-Schema nicht dem \u00fcblichen Unix-Schema entspricht.",
+ "lang_customizeAttrDescAd": "Hier k\u00f6nnen Sie die Standardwerte f\u00fcr bestimmte Attribute und deren Werte \u00fcberschreiben, wenn Sie z.B. den cn oder userPrincipalName f\u00fcr den Login verwenden wollen, anstelle des sAMAccountNames, oder der Pfad zum Netzlaufwerk des Benutzers nicht im Attribut homeDirectory zu finden ist.",
+ "lang_customizeAttributes": "Attribute anpassen",
"lang_deleteLong": "Modul oder Konfiguration l\u00f6schen.",
"lang_determiningHomeDirectory": "Versuche Attribut f\u00fcr das Home-Verzeichnis zu ermitteln...",
"lang_dnLookup": "Ermitteln der Bind-DN",
@@ -41,7 +44,7 @@
"lang_driveLetterNote": "WICHTIG: Bitte w\u00e4hlen Sie einen Laufwerksbuchstaben, der in den eingesetzten VMs verf\u00fcgbar ist, da ansonsten auf einen anderen Buchstaben ausgewichen werden muss.",
"lang_editLong": "Modul oder Konfiguration bearbeiten.",
"lang_editingLocationInfo": "Sie setzen die Konfiguration eines bestimmten Raums\/Orts, nicht die globale Konfiguration",
- "lang_fixNumeric": "Nummerischen Account-Namen muss ein 's' vorangestellt werden",
+ "lang_fixNumeric": "Numerischen Account-Namen muss ein 's' vorangestellt werden",
"lang_fixNumericDescription": "Wenn Sie diese Option aktivieren, m\u00fcssen Benutzer, deren Account-Name nur aus Ziffern besteht, diesem ein 's' voranstellen beim Login. Diese Option ist beim alten Login-Manager (KDM) zwingend erforderlich, da sonst der Loginvorgang fehlschl\u00e4gt. Mit dem neuen lightdm-basierten Login-Screen lassen sich numerische Account-Namen jedoch direkt verwenden. Wenn Sie an Ihrer Einrichtung keine numerischen Account-Namen verwenden, hat diese Option keine Auswirkung.",
"lang_folderRedirection": "Folder Redirection",
"lang_generateModule": "Modul erzeugen",
@@ -52,6 +55,7 @@
"lang_helpSystemConfiguration": "\u00dcber eine Systemkonfiguration wird die grundlegende Lokalisierung des bwLehrpool-Systems durchgef\u00fchrt. Dazu geh\u00f6ren Aspekte wie das Authentifizierungsverfahren f\u00fcr Benutzer (z.B. Active Directory, LDAP), Druckerkonfiguration, Home-Verzeichnisse, etc. Eine Systemkonfiguration setzt sich aus einem oder mehreren Konfigurationsmodulen zusammen, welche im angrenzenden Panel verwaltet werden k\u00f6nnen.",
"lang_homeAttr": "Home-Attribut",
"lang_homeAttributeExplanation": "Bitte w\u00e4hlen Sie das Attribut, welches das Home-Verzeichnis der User enth\u00e4lt.",
+ "lang_homeFallback": "Home-Fallback",
"lang_homedirHandling": "(Home-)Verzeichnis Einbindung",
"lang_inheritFromParentLoc": "Von \u00fcbergeordnetem Ort erben",
"lang_ldapStarted": "Der LDAP-Proxy wurde gestartet",
diff --git a/modules-available/sysconfig/lang/en/messages.json b/modules-available/sysconfig/lang/en/messages.json
index 83f47903..6e50b80c 100644
--- a/modules-available/sysconfig/lang/en/messages.json
+++ b/modules-available/sysconfig/lang/en/messages.json
@@ -2,7 +2,7 @@
"config-activated": "Configuration {{0}} has been activated",
"config-deleted": "Deleted configuration {{0}}",
"config-invalid": "Configuration with id {{0}} does not exist",
- "could-not-determine-binddn": "Could not determine bind dn",
+ "could-not-determine-binddn": "Could not determine bind dn ({{0}})",
"invalid-action": "Invalid action: {{0}}",
"missing-file": "There was no file selected!",
"missing-title": "No title given",
diff --git a/modules-available/sysconfig/lang/en/template-tags.json b/modules-available/sysconfig/lang/en/template-tags.json
index 6a482772..e2cfd114 100644
--- a/modules-available/sysconfig/lang/en/template-tags.json
+++ b/modules-available/sysconfig/lang/en/template-tags.json
@@ -33,6 +33,9 @@
"lang_customCertificate": "Additional (intermediate) certificates required for certificate validation",
"lang_customModuleInfo1": "About a custom module, it is possible to add arbitrary files to a Linux system that is booted clients. For this purpose, an archive can be uploaded using a file system structure that is extracted in this form 1:1 in the booted Linux.",
"lang_customModuleInfo2": "Example: If the uploaded archive is the file etc\/example.conf, this file will be located as \/etc\/example.conf to a booted client.",
+ "lang_customizeAttrDesc": "Here you can override attribute names and values if your LDAP scheme doesn't adhere to the usual Unix scheme.",
+ "lang_customizeAttrDescAd": "Here you can override attribute names and values, for example if you don't want to use the sAMAccountName for identification, but something like cn oder userPrincipalName, or maybe the user's network drive isn't to be found in the homeDirectory attribute.",
+ "lang_customizeAttributes": "Customize attributes",
"lang_deleteLong": "Delete module or configuration.",
"lang_determiningHomeDirectory": "Trying to determine home directory attribute...",
"lang_dnLookup": "Looking up bind dn",
@@ -52,6 +55,7 @@
"lang_helpSystemConfiguration": "The fundamental localization of the bwLehrpool system is done through a system configuration. These include aspects such as the authentication method for users (eg Active Directory, LDAP), printer configuration, home directories, etc. A system configuration is composed of one or more configuration modules, which can be managed in the panel next to this one.",
"lang_homeAttr": "Home attribute",
"lang_homeAttributeExplanation": "Please select the attribute which holds the user's home directory.",
+ "lang_homeFallback": "Home fallback",
"lang_homedirHandling": "(Home) directory handling",
"lang_inheritFromParentLoc": "Inherit from parent location",
"lang_ldapStarted": "The LDAP proxy has been launched",
diff --git a/modules-available/sysconfig/templates/ad-selfsearch.html b/modules-available/sysconfig/templates/ad-selfsearch.html
index 6c5bcb8c..6b85b9ed 100644
--- a/modules-available/sysconfig/templates/ad-selfsearch.html
+++ b/modules-available/sysconfig/templates/ad-selfsearch.html
@@ -39,6 +39,9 @@
<input name="ssl" value="on" type="hidden">
<input type="hidden" name="certificate" value="{{certificate}}">
{{/ssl}}
+ {{#mapping}}
+ <input type="hidden" name="mapping[{{field}}]" value="{{value}}">
+ {{/mapping}}
<input name="fixnumeric" value="{{fixnumeric}}" type="hidden">
<button type="submit" class="btn btn-primary">&laquo; {{lang_back}}</button>
</form>
@@ -60,6 +63,9 @@
<input name="ssl" value="on" type="hidden">
<input type="hidden" name="certificate" value="{{certificate}}">
{{/ssl}}
+ {{#mapping}}
+ <input type="hidden" name="mapping[{{field}}]" value="{{value}}">
+ {{/mapping}}
<input name="fixnumeric" value="{{fixnumeric}}" type="hidden">
<input name="fingerprint" value="{{fingerprint}}" type="hidden">
<button id="nextbutton" type="submit" class="btn btn-primary" style="display:none">{{lang_skip}} &raquo;</button>
diff --git a/modules-available/sysconfig/templates/ad-start.html b/modules-available/sysconfig/templates/ad-start.html
index 4a183dfc..7f211343 100644
--- a/modules-available/sysconfig/templates/ad-start.html
+++ b/modules-available/sysconfig/templates/ad-start.html
@@ -20,45 +20,55 @@
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="edit" value="{{edit}}">
<div class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">{{lang_moduleTitle}}</span>
+ <span class="input-group-addon slx-ga2">{{lang_moduleTitle}}</span>
<input tabindex="1" name="title" value="{{title}}" type="text" class="form-control" autofocus>
</div>
<div class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">Server *</span>
+ <span class="input-group-addon slx-ga2">Server *</span>
<input tabindex="2" name="server" value="{{server}}" type="text" class="form-control" placeholder="dc0.institution.example.com">
</div>
<div class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">{{lang_bindDN}} *</span>
+ <span class="input-group-addon slx-ga2">{{lang_bindDN}} *</span>
<input tabindex="3" name="binddn" value="{{binddn}}" type="text" class="form-control" placeholder="domain\bwlp *ODER* CN=bwlp,OU=Benutzer,DC=domain,DC=hs-beispiel,DC=de">
</div>
<div class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">{{lang_password}} *</span>
+ <span class="input-group-addon slx-ga2">{{lang_password}} *</span>
<input tabindex="4" name="bindpw" value="{{bindpw}}" type="{{password_type}}" class="form-control" placeholder="{{lang_password}}">
</div>
<div class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">{{lang_searchBase}}</span>
+ <span class="input-group-addon slx-ga2">{{lang_searchBase}}</span>
<input tabindex="5" name="searchbase" value="{{searchbase}}" type="text" class="form-control" placeholder="dc=windows,dc=hs-beispiel,dc=de">
</div>
- <br>
<div class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">Home</span>
+ <span class="input-group-addon slx-ga2">Home</span>
<input tabindex="6" name="home" value="{{home}}" type="text" class="form-control" placeholder="\\server.example.com\%s">
<span class="input-group-btn">
<a class="btn btn-default" data-toggle="modal" data-target="#help-home"><span class="glyphicon glyphicon-question-sign"></span></a>
</span>
</div>
- <div class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">{{lang_homeAttr}}</span>
- <input tabindex="6" name="homeattr" value="{{homeattr}}" type="text" class="form-control" placeholder="homeDirectory">
- <span class="input-group-btn">
- <a class="btn btn-default" data-toggle="modal" data-target="#help-homeattr"><span class="glyphicon glyphicon-question-sign"></span></a>
- </span>
+ <br>
+ <div class="{{#map_empty}}collapse{{/map_empty}}" id="attrbox">
+ <p>{{lang_customizeAttrDescAd}}</p>
+ {{#mapping}}
+ {{#ad}}
+ <div class="input-group">
+ <span class="input-group-addon slx-ga2">{{name}}</span>
+ <input name="mapping[{{field}}]" value="{{value}}" type="text" class="form-control" placeholder="{{ad}}">
+ </div>
+ {{/ad}}
+ {{/mapping}}
</div>
+ {{#map_empty}}
+ <div class="btn btn-default center-block" onclick="$('#attrbox').show();$(this).hide()">
+ {{lang_customizeAttributes}}
+ <span class="glyphicon glyphicon-menu-down"></span>
+ </div>
+ {{/map_empty}}
<br>
<div>
<div class="checkbox">
- <input type="checkbox" name="fixnumeric" {{#fixnumeric}}checked{{/fixnumeric}}>
- <label><b>{{lang_fixNumeric}}</b></label>
+ <input id="num-cb" type="checkbox" name="fixnumeric" {{#fixnumeric}}checked{{/fixnumeric}}>
+ <label for="num-cb"><b>{{lang_fixNumeric}}</b></label>
</div>
<div>
<i>{{lang_fixNumericDescription}}</i>
@@ -67,8 +77,8 @@
<br>
<div>
<div class="checkbox">
- <input type="checkbox" name="ssl" onchange="$('#cert-box').css('display', this.checked ? '' : 'none')" {{#ssl}}checked{{/ssl}}>
- <label><b>{{lang_ssl}}</b></label>
+ <input if="ssl-cb" type="checkbox" name="ssl" onchange="$('#cert-box').css('display', this.checked ? '' : 'none')" {{#ssl}}checked{{/ssl}}>
+ <label for="ssl-cb"><b>{{lang_ssl}}</b></label>
</div>
<div>
<i>{{lang_sslDescription}}</i>
diff --git a/modules-available/sysconfig/templates/ad_ldap-checkconnection.html b/modules-available/sysconfig/templates/ad_ldap-checkconnection.html
index 35c8f1ee..630da398 100644
--- a/modules-available/sysconfig/templates/ad_ldap-checkconnection.html
+++ b/modules-available/sysconfig/templates/ad_ldap-checkconnection.html
@@ -26,6 +26,10 @@
<input name="ssl" value="on" type="hidden">
<input type="hidden" name="certificate" value="{{certificate}}">
{{/ssl}}
+ {{#mapping}}
+ <input type="hidden" name="mapping[{{field}}]" value="{{value}}">
+ {{/mapping}}
+
<input name="fixnumeric" value="{{fixnumeric}}" type="hidden">
<button type="submit" class="btn btn-primary">&laquo; {{lang_back}}</button>
</form>
@@ -47,6 +51,9 @@
<input id="fingerprint" name="fingerprint" value="" type="hidden">
<input id="certificate" type="hidden" name="certificate" value="{{certificate}}">
{{/ssl}}
+ {{#mapping}}
+ <input type="hidden" name="mapping[{{field}}]" value="{{value}}">
+ {{/mapping}}
<input name="fixnumeric" value="{{fixnumeric}}" type="hidden">
<input name="originalbinddn" value="{{binddn}}" type="hidden">
<button id="nextbutton" type="submit" class="btn btn-primary" style="display:none">{{lang_next}} &raquo;</button>
diff --git a/modules-available/sysconfig/templates/ad_ldap-checkcredentials.html b/modules-available/sysconfig/templates/ad_ldap-checkcredentials.html
index bf151da3..4f822a9b 100644
--- a/modules-available/sysconfig/templates/ad_ldap-checkcredentials.html
+++ b/modules-available/sysconfig/templates/ad_ldap-checkcredentials.html
@@ -22,6 +22,9 @@
<input name="ssl" value="on" type="hidden">
<input type="hidden" name="certificate" value="{{certificate}}">
{{/ssl}}
+ {{#mapping}}
+ <input type="hidden" name="mapping[{{field}}]" value="{{value}}">
+ {{/mapping}}
<input name="fixnumeric" value="{{fixnumeric}}" type="hidden">
<button type="submit" class="btn btn-primary">&laquo; {{lang_back}}</button>
</form>
@@ -42,6 +45,9 @@
<input name="ssl" value="on" type="hidden">
<input type="hidden" name="certificate" value="{{certificate}}">
{{/ssl}}
+ {{#mapping}}
+ <input type="hidden" name="mapping[{{field}}]" value="{{value}}">
+ {{/mapping}}
<input name="fixnumeric" value="{{fixnumeric}}" type="hidden">
<input name="fingerprint" value="{{fingerprint}}" type="hidden">
<input name="originalbinddn" value="{{binddn}}" type="hidden">
diff --git a/modules-available/sysconfig/templates/ad_ldap-homedir.html b/modules-available/sysconfig/templates/ad_ldap-homedir.html
index 10a43030..ad543594 100644
--- a/modules-available/sysconfig/templates/ad_ldap-homedir.html
+++ b/modules-available/sysconfig/templates/ad_ldap-homedir.html
@@ -14,6 +14,9 @@
<input name="ssl" value="on" type="hidden">
<input type="hidden" name="certificate" value="{{certificate}}">
{{/ssl}}
+ {{#mapping}}
+ <input type="hidden" name="mapping[{{field}}]" value="{{value}}">
+ {{/mapping}}
<input name="fixnumeric" value="{{fixnumeric}}" type="hidden">
<input name="fingerprint" value="{{fingerprint}}" type="hidden">
diff --git a/modules-available/sysconfig/templates/ldap-start.html b/modules-available/sysconfig/templates/ldap-start.html
index a457ecd3..940316b9 100644
--- a/modules-available/sysconfig/templates/ldap-start.html
+++ b/modules-available/sysconfig/templates/ldap-start.html
@@ -10,32 +10,32 @@
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="edit" value="{{edit}}">
<div class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">{{lang_moduleTitle}}</span>
+ <span class="input-group-addon slx-ga2">{{lang_moduleTitle}}</span>
<input tabindex="1" name="title" value="{{title}}" type="text" class="form-control">
</div>
<div class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">Server *</span>
+ <span class="input-group-addon slx-ga2">Server *</span>
<input tabindex="2" name="server" value="{{server}}" type="text" class="form-control" placeholder="dc0.institution.example.com">
<!--span class="input-group-btn">
<a class="btn btn-default"><span class="glyphicon glyphicon-question-sign"></span></a>
</span-->
</div>
<div class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">{{lang_bindDN}}</span>
+ <span class="input-group-addon slx-ga2">{{lang_bindDN}}</span>
<input tabindex="3" name="binddn" value="{{binddn}}" type="text" class="form-control" placeholder="CN=bwlp,OU=Benutzer,DC=domain,DC=hs-beispiel,DC=de">
<!--span class="input-group-btn">
<a class="btn btn-default"><span class="glyphicon glyphicon-question-sign"></span></a>
</span-->
</div>
<div class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">{{lang_password}}</span>
+ <span class="input-group-addon slx-ga2">{{lang_password}}</span>
<input tabindex="4" name="bindpw" value="{{bindpw}}" type="{{password_type}}" class="form-control" placeholder="{{lang_password}}">
<!--span class="input-group-btn">
<a class="btn btn-default"><span class="glyphicon glyphicon-question-sign"></span></a>
</span-->
</div>
- <div style="min-width:150px;" class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">{{lang_searchBase}} *</span>
+ <div class="input-group">
+ <span class="input-group-addon slx-ga2">{{lang_searchBase}} *</span>
<input tabindex="5" name="searchbase" value="{{searchbase}}" type="text" class="form-control" placeholder="ou=users,dc=hochschule,dc=de">
<!--span class="input-group-btn">
<a class="btn btn-default"><span class="glyphicon glyphicon-question-sign"></span></a>
@@ -43,17 +43,33 @@
</div>
<br>
<div class="input-group">
- <span style="min-width:150px;" class="input-group-addon slx-ga">Home</span>
+ <span class="input-group-addon slx-ga2">{{lang_homeFallback}}</span>
<input tabindex="6" name="home" value="{{home}}" type="text" class="form-control" placeholder="\\server.example.com\%s">
<span class="input-group-btn">
<a class="btn btn-default" data-toggle="modal" data-target="#help-home"><span class="glyphicon glyphicon-question-sign"></span></a>
</span>
</div>
<br>
+ <div class="{{#map_empty}}collapse{{/map_empty}}" id="attrbox">
+ <p>{{lang_customizeAttrDesc}}</p>
+ {{#mapping}}
+ <div class="input-group">
+ <span class="input-group-addon slx-ga2">{{name}}</span>
+ <input name="mapping[{{field}}]" value="{{value}}" type="text" class="form-control" placeholder="{{name}}">
+ </div>
+ {{/mapping}}
+ </div>
+ {{#map_empty}}
+ <div class="btn btn-default center-block" onclick="$('#attrbox').show();$(this).hide()">
+ {{lang_customizeAttributes}}
+ <span class="glyphicon glyphicon-menu-down"></span>
+ </div>
+ {{/map_empty}}
+ <br>
<div>
<div class="checkbox">
- <input type="checkbox" name="fixnumeric" {{#fixnumeric}}checked{{/fixnumeric}}>
- <label><b>{{lang_fixNumeric}}</b></label>
+ <input id="num-cb" type="checkbox" name="fixnumeric" {{#fixnumeric}}checked{{/fixnumeric}}>
+ <label for="num-cb"><b>{{lang_fixNumeric}}</b></label>
</div>
<div>
<i>{{lang_fixNumericDescription}}</i>
@@ -62,8 +78,8 @@
<br>
<div>
<div class="checkbox">
- <input type="checkbox" name="ssl" onchange="$('#cert-box').css('display', this.checked ? '' : 'none')" {{#ssl}}checked{{/ssl}}>
- <label><b>{{lang_ssl}}</b></label>
+ <input id="ssl-cb" type="checkbox" name="ssl" onchange="$('#cert-box').css('display', this.checked ? '' : 'none')" {{#ssl}}checked{{/ssl}}>
+ <label for="ssl-cb"><b>{{lang_ssl}}</b></label>
</div>
<div>
<i>{{lang_sslDescription}}</i>