diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-12-21 20:36:26 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-12-21 20:36:26 +0200 |
commit | 417dc9dc428db2fef14130d3de9a91e9efb1f717 (patch) | |
tree | fbd825ef5dbc647879fbce56ced7304b4dd3f547 /client/components/main/layouts.js | |
parent | bd66ea8accf808b27737d6dd2e21ead1caf35ad0 (diff) | |
download | wekan-417dc9dc428db2fef14130d3de9a91e9efb1f717.tar.gz wekan-417dc9dc428db2fef14130d3de9a91e9efb1f717.tar.bz2 wekan-417dc9dc428db2fef14130d3de9a91e9efb1f717.zip |
Fix lint errors.
Diffstat (limited to 'client/components/main/layouts.js')
-rw-r--r-- | client/components/main/layouts.js | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js index abc8f6e1..89dcca2d 100644 --- a/client/components/main/layouts.js +++ b/client/components/main/layouts.js @@ -126,16 +126,20 @@ function authentication(instance, email, password) { : instance.data.defaultAuthenticationMethod.get(); switch (authenticationMethod) { - case 'ldap': - // Use the ldap connection package - Meteor.loginWithLDAP(email, password, function(error) { - if (!error) return FlowRouter.go('/'); + case 'ldap': + // Use the ldap connection package + Meteor.loginWithLDAP(email, password, function(error) { + if (error) { displayError('error-ldap-login'); - }); - break; + return this.stop(); + } else { + return FlowRouter.go('/'); + } + }); + break; - default: - displayError('error-undefined'); + default: + displayError('error-undefined'); } return this.stop(); @@ -152,4 +156,4 @@ function displayError(code) { $('.at-pwd-form').before('<div class="at-error"><p></p></div>'); } $('.at-error p').text(translated); -}
\ No newline at end of file +} |