summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-08-20 21:14:16 +0300
committerLauri Ojansivu <x@xet7.org>2019-08-20 21:14:16 +0300
commitb2deab544bfeea49017bec27f92f1269b0b7ec43 (patch)
tree8884c43847b0e489313734f9eb8ee231a3fe1a66
parentf96c1eda707aecbaccbe248aa97498a0899fab4d (diff)
downloadwekan-b2deab544bfeea49017bec27f92f1269b0b7ec43.tar.gz
wekan-b2deab544bfeea49017bec27f92f1269b0b7ec43.tar.bz2
wekan-b2deab544bfeea49017bec27f92f1269b0b7ec43.zip
Fix login did not work.
Thanks to xet7 !
-rw-r--r--models/users.js25
1 files changed, 0 insertions, 25 deletions
diff --git a/models/users.js b/models/users.js
index 0d1f2271..55d85e07 100644
--- a/models/users.js
+++ b/models/users.js
@@ -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({
update(userId, doc) {
const user = Users.findOne({ _id: userId });