diff options
author | guillaume <guillaume.cassou@supinfo.com> | 2019-02-07 11:38:04 +0100 |
---|---|---|
committer | guillaume <guillaume.cassou@supinfo.com> | 2019-02-07 11:38:04 +0100 |
commit | ec453b89b8238adcbb9334e1d006675aa8a7fe06 (patch) | |
tree | c94c88537e04cf0aa31426c807d4f3dc4f63e0c4 /client/components/main | |
parent | de9965213ae32f4c314dd1a791891e01d12da1dd (diff) | |
download | wekan-ec453b89b8238adcbb9334e1d006675aa8a7fe06.tar.gz wekan-ec453b89b8238adcbb9334e1d006675aa8a7fe06.tar.bz2 wekan-ec453b89b8238adcbb9334e1d006675aa8a7fe06.zip |
Fix lints
Diffstat (limited to 'client/components/main')
-rw-r--r-- | client/components/main/layouts.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js index 73da80e5..6f7c914a 100644 --- a/client/components/main/layouts.js +++ b/client/components/main/layouts.js @@ -114,16 +114,21 @@ async function authentication(event, instance) { event.preventDefault(); event.stopImmediatePropagation(); - if (result === 'ldap') { - return Meteor.loginWithLDAP(match, password, function() { + switch (result) { + case 'ldap': + Meteor.loginWithLDAP(match, password, function() { FlowRouter.go('/'); }); - } + break; - if (result === 'cas') { - return Meteor.loginWithCas(function() { + case 'cas': + Meteor.loginWithCas(function() { FlowRouter.go('/'); }); + break; + + default: + break; } } @@ -135,7 +140,7 @@ function getAuthenticationMethod({displayAuthenticationMethod, defaultAuthentica } function getUserAuthenticationMethod(defaultAuthenticationMethod, match) { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { try { Meteor.subscribe('user-authenticationMethod', match, { onReady() { |