From 417dc9dc428db2fef14130d3de9a91e9efb1f717 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Fri, 21 Dec 2018 20:36:26 +0200 Subject: Fix lint errors. --- client/components/main/editor.js | 2 +- client/components/main/layouts.js | 22 +++++++++++++--------- models/settings.js | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/client/components/main/editor.js b/client/components/main/editor.js index 8ea73793..152f69e2 100755 --- a/client/components/main/editor.js +++ b/client/components/main/editor.js @@ -40,7 +40,7 @@ Blaze.Template.registerHelper('mentions', new Template('mentions', function() { const view = this; const currentBoard = Boards.findOne(Session.get('currentBoard')); if (!currentBoard) { - return HTML.Raw(""); + return HTML.Raw(''); } const knowedUsers = currentBoard.members.map((member) => { const u = Users.findOne(member.userId); 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('

'); } $('.at-error p').text(translated); -} \ No newline at end of file +} diff --git a/models/settings.js b/models/settings.js index 97bbe878..674c99a0 100644 --- a/models/settings.js +++ b/models/settings.js @@ -263,6 +263,6 @@ if (Meteor.isServer) { getDefaultAuthenticationMethod() { return process.env.DEFAULT_AUTHENTICATION_METHOD; - } + }, }); } -- cgit v1.2.3-1-g7c22