aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/js/wizard/wizardTabElementary.js1
-rw-r--r--apps/user_ldap/js/wizard/wizardTabGeneric.js4
-rw-r--r--apps/user_ldap/l10n/es_CL.js1
-rw-r--r--apps/user_ldap/l10n/es_CL.json1
-rw-r--r--apps/user_ldap/l10n/ru.js1
-rw-r--r--apps/user_ldap/l10n/ru.json1
-rw-r--r--apps/user_ldap/lib/User/User.php3
-rw-r--r--apps/user_ldap/templates/part.wizardcontrols.php2
-rw-r--r--apps/user_ldap/tests/User/UserTest.php9
9 files changed, 19 insertions, 4 deletions
diff --git a/apps/user_ldap/js/wizard/wizardTabElementary.js b/apps/user_ldap/js/wizard/wizardTabElementary.js
index 7ce1009565d..3c6eb1adc45 100644
--- a/apps/user_ldap/js/wizard/wizardTabElementary.js
+++ b/apps/user_ldap/js/wizard/wizardTabElementary.js
@@ -214,6 +214,7 @@ OCA = OCA || {};
onConfigSwitch: function(view, configuration) {
this.baseDNTestTriggered = false;
view.disableElement(view.managedItems.ldap_port.$relatedElements);
+ view.managedItems.ldap_dn.$saveButton.removeClass('primary');
view.onConfigLoaded(view, configuration);
},
diff --git a/apps/user_ldap/js/wizard/wizardTabGeneric.js b/apps/user_ldap/js/wizard/wizardTabGeneric.js
index 57ac375e321..9997d6e1b04 100644
--- a/apps/user_ldap/js/wizard/wizardTabGeneric.js
+++ b/apps/user_ldap/js/wizard/wizardTabGeneric.js
@@ -359,6 +359,10 @@ OCA = OCA || {};
item.$saveButton.click(function(event) {
event.preventDefault();
view._requestSave(item.$element);
+ item.$saveButton.removeClass('primary');
+ });
+ item.$element.change(function () {
+ item.$saveButton.addClass('primary');
});
})(this.managedItems[id]);
}
diff --git a/apps/user_ldap/l10n/es_CL.js b/apps/user_ldap/l10n/es_CL.js
index 63d3d71e0a9..f87d7051878 100644
--- a/apps/user_ldap/l10n/es_CL.js
+++ b/apps/user_ldap/l10n/es_CL.js
@@ -99,6 +99,7 @@ OC.L10N.register(
"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." : "El DN del cliente del usuario con el que se vinculará, ejem. uid=agente,dc=ejemplo,dc=com. Para tener un acceso anónimo, deja el DN y la contraseña vacíos.",
"Password" : "Contraseña",
"For anonymous access, leave DN and Password empty." : "Para acceso anónimo, deja la contraseña y DN vacíos.",
+ "Save Credentials" : "Guardar credenciales",
"One Base DN per line" : "Un DN Base por línea",
"You can specify Base DN for users and groups in the Advanced tab" : "Puedes especificar el DN Base para usuarios y grupos en la pestaña Avanzado",
"Detect Base DN" : "Detectar DN Base",
diff --git a/apps/user_ldap/l10n/es_CL.json b/apps/user_ldap/l10n/es_CL.json
index eefeb9a037f..d92be60abe0 100644
--- a/apps/user_ldap/l10n/es_CL.json
+++ b/apps/user_ldap/l10n/es_CL.json
@@ -97,6 +97,7 @@
"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." : "El DN del cliente del usuario con el que se vinculará, ejem. uid=agente,dc=ejemplo,dc=com. Para tener un acceso anónimo, deja el DN y la contraseña vacíos.",
"Password" : "Contraseña",
"For anonymous access, leave DN and Password empty." : "Para acceso anónimo, deja la contraseña y DN vacíos.",
+ "Save Credentials" : "Guardar credenciales",
"One Base DN per line" : "Un DN Base por línea",
"You can specify Base DN for users and groups in the Advanced tab" : "Puedes especificar el DN Base para usuarios y grupos en la pestaña Avanzado",
"Detect Base DN" : "Detectar DN Base",
diff --git a/apps/user_ldap/l10n/ru.js b/apps/user_ldap/l10n/ru.js
index d1d4d0331ea..09e300528e9 100644
--- a/apps/user_ldap/l10n/ru.js
+++ b/apps/user_ldap/l10n/ru.js
@@ -99,6 +99,7 @@ OC.L10N.register(
"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." : "DN пользователя, под которым выполняется подключение, например, uid=agent,dc=example,dc=com. Для анонимного доступа оставьте DN и пароль пустыми.",
"Password" : "Пароль",
"For anonymous access, leave DN and Password empty." : "Для анонимного доступа оставьте DN и пароль пустыми.",
+ "Save Credentials" : "Сохранить учётные данные",
"One Base DN per line" : "По одной базе поиска (Base DN) в строке.",
"You can specify Base DN for users and groups in the Advanced tab" : "Вы можете задать Base DN для пользователей и групп на вкладке \"Расширенные\"",
"Detect Base DN" : "Определить базу поиска DN",
diff --git a/apps/user_ldap/l10n/ru.json b/apps/user_ldap/l10n/ru.json
index 6ae07d14b68..eb23609a805 100644
--- a/apps/user_ldap/l10n/ru.json
+++ b/apps/user_ldap/l10n/ru.json
@@ -97,6 +97,7 @@
"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." : "DN пользователя, под которым выполняется подключение, например, uid=agent,dc=example,dc=com. Для анонимного доступа оставьте DN и пароль пустыми.",
"Password" : "Пароль",
"For anonymous access, leave DN and Password empty." : "Для анонимного доступа оставьте DN и пароль пустыми.",
+ "Save Credentials" : "Сохранить учётные данные",
"One Base DN per line" : "По одной базе поиска (Base DN) в строке.",
"You can specify Base DN for users and groups in the Advanced tab" : "Вы можете задать Base DN для пользователей и групп на вкладке \"Расширенные\"",
"Detect Base DN" : "Определить базу поиска DN",
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php
index afd43999c7f..c93d2a77d80 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -387,8 +387,7 @@ class User {
$lastChecked = $this->config->getUserValue($this->uid, 'user_ldap',
self::USER_PREFKEY_LASTREFRESH, 0);
- //TODO make interval configurable
- if((time() - intval($lastChecked)) < 86400 ) {
+ if((time() - intval($lastChecked)) < intval($this->config->getAppValue('user_ldap', 'updateAttributesInterval', 86400)) ) {
return false;
}
return true;
diff --git a/apps/user_ldap/templates/part.wizardcontrols.php b/apps/user_ldap/templates/part.wizardcontrols.php
index 89eb96827e6..bd84b23c76d 100644
--- a/apps/user_ldap/templates/part.wizardcontrols.php
+++ b/apps/user_ldap/templates/part.wizardcontrols.php
@@ -5,7 +5,7 @@
type="button">
<?php p($l->t('Back'));?>
</button>
- <button class="ldap_action_continue" name="ldap_action_continue" type="button">
+ <button class="ldap_action_continue primary" name="ldap_action_continue" type="button">
<?php p($l->t('Continue'));?>
</button>
<a href="<?php p(link_to_docs('admin-ldap')); ?>"
diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php
index 5e911159285..27bd7762e39 100644
--- a/apps/user_ldap/tests/User/UserTest.php
+++ b/apps/user_ldap/tests/User/UserTest.php
@@ -871,7 +871,14 @@ class UserTest extends \Test\TestCase {
->with($this->equalTo('alice'), $this->equalTo('user_ldap'),
$this->equalTo(User::USER_PREFKEY_LASTREFRESH),
$this->equalTo(0))
- ->will($this->returnValue(time()));
+ ->will($this->returnValue(time() - 10));
+
+ $config->expects($this->once())
+ ->method('getAppValue')
+ ->with($this->equalTo('user_ldap'),
+ $this->equalTo('updateAttributesInterval'),
+ $this->anything())
+ ->will($this->returnValue(1800));
$config->expects($this->exactly(2))
->method('getUserValue');
$config->expects($this->never())