summaryrefslogtreecommitdiffstats
path: root/client/components/settings
diff options
context:
space:
mode:
authorguillaume <guillaume.cassou@orange.fr>2018-11-06 11:28:35 +0100
committerguillaume <guillaume.cassou@orange.fr>2018-11-06 11:28:35 +0100
commit8c497efb46d2193674fee2e0c9da8053c533e79e (patch)
tree8cdecaa81ecf2f58f37317baba154bd02c4fbf6c /client/components/settings
parent6f2275e8cb286cdf9dab3fee7f19b134eab70ca6 (diff)
downloadwekan-8c497efb46d2193674fee2e0c9da8053c533e79e.tar.gz
wekan-8c497efb46d2193674fee2e0c9da8053c533e79e.tar.bz2
wekan-8c497efb46d2193674fee2e0c9da8053c533e79e.zip
patch authentication
Diffstat (limited to 'client/components/settings')
-rw-r--r--client/components/settings/connectionMethod.jade6
-rw-r--r--client/components/settings/connectionMethod.js34
2 files changed, 0 insertions, 40 deletions
diff --git a/client/components/settings/connectionMethod.jade b/client/components/settings/connectionMethod.jade
deleted file mode 100644
index ac4c8c64..00000000
--- a/client/components/settings/connectionMethod.jade
+++ /dev/null
@@ -1,6 +0,0 @@
-template(name='connectionMethod')
- div.at-form-authentication
- label {{_ 'authentication-method'}}
- select.select-authentication
- each authentications
- option(value="{{value}}") {{_ value}}
diff --git a/client/components/settings/connectionMethod.js b/client/components/settings/connectionMethod.js
deleted file mode 100644
index 9fe8f382..00000000
--- a/client/components/settings/connectionMethod.js
+++ /dev/null
@@ -1,34 +0,0 @@
-Template.connectionMethod.onCreated(function() {
- this.authenticationMethods = new ReactiveVar([]);
-
- Meteor.call('getAuthenticationsEnabled', (_, result) => {
- if (result) {
- // TODO : add a management of different languages
- // (ex {value: ldap, text: TAPi18n.__('ldap', {}, T9n.getLanguage() || 'en')})
- this.authenticationMethods.set([
- {value: 'password'},
- // Gets only the authentication methods availables
- ...Object.entries(result).filter((e) => e[1]).map((e) => ({value: e[0]})),
- ]);
- }
-
- // If only the default authentication available, hides the select boxe
- const content = $('.at-form-authentication');
- if (!(this.authenticationMethods.get().length > 1)) {
- content.hide();
- } else {
- content.show();
- }
- });
-});
-
-Template.connectionMethod.onRendered(() => {
- // Moves the select boxe in the first place of the at-pwd-form div
- $('.at-form-authentication').detach().prependTo('.at-pwd-form');
-});
-
-Template.connectionMethod.helpers({
- authentications() {
- return Template.instance().authenticationMethods.get();
- },
-});