mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Fixed rule allows
This commit is contained in:
parent
1f5f429fc4
commit
34b37116cf
25 changed files with 345 additions and 260 deletions
|
|
@ -1,52 +1,19 @@
|
|||
Actions = new Mongo.Collection('actions');
|
||||
|
||||
|
||||
|
||||
Actions.mutations({
|
||||
rename(description) {
|
||||
return { $set: { description } };
|
||||
},
|
||||
});
|
||||
|
||||
Actions.allow({
|
||||
update: function () {
|
||||
// add custom authentication code here
|
||||
return true;
|
||||
insert(userId, doc) {
|
||||
return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
|
||||
},
|
||||
insert: function () {
|
||||
// add custom authentication code here
|
||||
return true;
|
||||
update(userId, doc) {
|
||||
return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
|
||||
},
|
||||
remove: function () {
|
||||
// add custom authentication code here
|
||||
return true;
|
||||
remove(userId, doc) {
|
||||
return allowIsBoardAdmin(userId, Boards.findOne(doc.boardId));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Actions.helpers({
|
||||
fromList() {
|
||||
return Lists.findOne(this.fromId);
|
||||
},
|
||||
|
||||
toList() {
|
||||
return Lists.findOne(this.toId);
|
||||
},
|
||||
|
||||
findList(title) {
|
||||
return Lists.findOne({title:title});
|
||||
},
|
||||
|
||||
labels() {
|
||||
const boardLabels = this.board().labels;
|
||||
const cardLabels = _.filter(boardLabels, (label) => {
|
||||
return _.contains(this.labelIds, label._id);
|
||||
});
|
||||
return cardLabels;
|
||||
}});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue