mirror of
https://github.com/wekan/wekan.git
synced 2026-02-01 14:11:48 +01:00
add ldap support | simplify authentications
This commit is contained in:
parent
5b8c642d8f
commit
3b4f285fea
15 changed files with 493 additions and 49 deletions
|
|
@ -321,3 +321,15 @@ Migrations.add('add-subtasks-allowed', () => {
|
|||
},
|
||||
}, noValidateMulti);
|
||||
});
|
||||
|
||||
Migrations.add('add-authenticationMethod', () => {
|
||||
Users.update({
|
||||
'authenticationMethod': {
|
||||
$exists: false,
|
||||
},
|
||||
}, {
|
||||
$set: {
|
||||
'authenticationMethod': 'password',
|
||||
},
|
||||
}, noValidateMulti);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ Meteor.publish('people', function(limit) {
|
|||
'emails': 1,
|
||||
'createdAt': 1,
|
||||
'loginDisabled': 1,
|
||||
'authenticationMethod': 1
|
||||
},
|
||||
});
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -18,12 +18,11 @@ Meteor.publish('user-admin', function() {
|
|||
});
|
||||
});
|
||||
|
||||
Meteor.publish('user-connection-method', function(match) {
|
||||
Meteor.publish('user-authenticationMethod', function(match) {
|
||||
check(match, String);
|
||||
|
||||
return Users.find({$or: [{email: match}, {username: match}]}, {
|
||||
return Users.find({$or: [{_id: match}, {email: match}, {username: match}]}, {
|
||||
fields: {
|
||||
ldap: 1,
|
||||
'authenticationMethod': 1,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue