mirror of
https://github.com/wekan/wekan.git
synced 2026-03-01 19:30:15 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
58155288fb
100 changed files with 6452 additions and 539 deletions
|
|
@ -407,10 +407,7 @@ Boards.helpers({
|
|||
},
|
||||
|
||||
lists() {
|
||||
return Lists.find(
|
||||
{ boardId: this._id, archived: false },
|
||||
{ sort: { sort: 1 } },
|
||||
);
|
||||
return Lists.find({ boardId: this._id }, { sort: { sort: 1 } });
|
||||
},
|
||||
|
||||
nullSortLists() {
|
||||
|
|
|
|||
|
|
@ -258,9 +258,14 @@ Users.attachSchema(
|
|||
);
|
||||
|
||||
Users.allow({
|
||||
update(userId) {
|
||||
const user = Users.findOne(userId);
|
||||
return user && Meteor.user().isAdmin; // GitHub issue #2590
|
||||
update(userId, doc) {
|
||||
const user = Users.findOne({ _id: userId });
|
||||
if ((user && user.isAdmin) || (Meteor.user() && Meteor.user().isAdmin))
|
||||
return true;
|
||||
if (!user) {
|
||||
return false;
|
||||
}
|
||||
return doc._id === userId;
|
||||
},
|
||||
remove(userId, doc) {
|
||||
const adminsNumber = Users.find({ isAdmin: true }).count();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue