mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Fix login did not work.
Thanks to xet7 !
This commit is contained in:
parent
f96c1eda70
commit
b2deab544b
1 changed files with 0 additions and 25 deletions
|
|
@ -257,31 +257,6 @@ Users.attachSchema(
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
Users.before.update(function(userId, fieldNames) {
|
|
||||||
const user = Users.findOne({ _id: userId });
|
|
||||||
if ((user && user.isAdmin) || (Meteor.user() && Meteor.user().isAdmin)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!user) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (_.contains(fieldNames, 'services')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (_.contains(fieldNames, 'heartBeat')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (_.contains(fieldNames, 'isAdmin')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (_.contains(fieldNames, 'loginDisabled')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (_.contains(fieldNames, 'authenticationMethod')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Users.allow({
|
Users.allow({
|
||||||
update(userId, doc) {
|
update(userId, doc) {
|
||||||
const user = Users.findOne({ _id: userId });
|
const user = Users.findOne({ _id: userId });
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue