8000 Add ldap login by maximeconnolly · Pull Request #1826 · wekan/wekan · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add ldap login #1826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,5 @@ browser-policy
eluck:accounts-lockout
rzymek:fullcalendar
momentjs:moment@2.22.2
atoy40:accounts-cas
atoy40:accounts-cas
maximestpierre:meteor-ldap
2 changes: 2 additions & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ localstorage@1.2.0
logging@1.1.19
matb33:collection-hooks@0.8.4
matteodem:easy-search@1.6.4
maximestpierre:meteor-ldap@0.0.2
mdg:validation-error@0.5.1
meteor@1.8.2
meteor-base@1.2.0
Expand Down Expand Up @@ -176,4 +177,5 @@ useraccounts:unstyled@1.14.2
verron:autosize@3.0.8
webapp@1.4.0
webapp-hashing@1.0.9
yasaricli:slugify@0.0.7
zimme:active-route@2.3.2
3 changes: 3 additions & 0 deletions client/components/main/layouts.jade
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ template(name="userFormsLayout")
img(src="{{pathFor '/wekan-logo.png'}}" alt="Wekan")
section.auth-dialog
+Template.dynamic(template=content)
if isLdap
.at-form
button#ldap(class='at-btn submit') {{ldapSignInLabel}}
if isCas
.at-form
button#cas(class='at-btn submit' type='submit') {{casSignInLabel}}
Expand Down
23 changes: 23 additions & 0 deletions client/components/main/layouts.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,18 @@ Template.userFormsLayout.helpers({
Meteor.settings.public.cas &&
Meteor.settings.public.cas.loginUrl;
},
isLdap() {
return Meteor.settings.public.ldap;
},


casSignInLabel() {
return TAPi18n.__('casSignIn', {}, T9n.getLanguage() || 'en');
},

ldapSignInLabel() {
return TAPi18n.__('ldapSignIn', {}, T9n.getLanguage() || 'en');
},
});

Template.userFormsLayout.events({
Expand All @@ -64,6 +72,21 @@ Template.userFormsLayout.events({
}
});
},
'click button#ldap'() {
const username = $('#at-field-username_and_email').val() ||
$('#at-field-username').val() ||
$('#at-field-email').val();
const password = $('#at-field-password').val();
const options = {};
Meteor.loginWithLDAP(username, password, options, function(err) {
if (err){
console.log(err);
}
if (FlowRouter.getRouteName() === 'atSignIn') {
FlowRouter.go('/');
}
});
},
});

Template.defaultLayout.events({
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"babel-runtime": "^6.26.0",
"bson-ext": "^2.0.0",
"es6-promise": "^4.2.4",
"ldapjs": "^1.0.2",
"meteor-node-stubs": "^0.4.1",
"os": "^0.1.1",
"page": "^1.8.6",
Expand Down
1 change: 0 additions & 1 deletion server/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ Meteor.startup(() => {
};

});

0