mirror of
https://github.com/wekan/wekan.git
synced 2026-01-29 04:36:10 +01:00
Fix New Board Permissions: NormalAssignedOnly, CommentAssignedOnly, ReadOnly, ReadAssignedOnly. Part 1.
Thanks to nazim-oss and xet7 ! Related #6060
This commit is contained in:
parent
2f59e42024
commit
eabb6a239d
25 changed files with 562 additions and 291 deletions
|
|
@ -170,13 +170,16 @@ Checklists.helpers({
|
|||
|
||||
Checklists.allow({
|
||||
insert(userId, doc) {
|
||||
return allowIsBoardMemberByCard(userId, ReactiveCache.getCard(doc.cardId));
|
||||
// ReadOnly users cannot create checklists
|
||||
return allowIsBoardMemberWithWriteAccessByCard(userId, ReactiveCache.getCard(doc.cardId));
|
||||
},
|
||||
update(userId, doc) {
|
||||
return allowIsBoardMemberByCard(userId, ReactiveCache.getCard(doc.cardId));
|
||||
// ReadOnly users cannot edit checklists
|
||||
return allowIsBoardMemberWithWriteAccessByCard(userId, ReactiveCache.getCard(doc.cardId));
|
||||
},
|
||||
remove(userId, doc) {
|
||||
return allowIsBoardMemberByCard(userId, ReactiveCache.getCard(doc.cardId));
|
||||
// ReadOnly users cannot delete checklists
|
||||
return allowIsBoardMemberWithWriteAccessByCard(userId, ReactiveCache.getCard(doc.cardId));
|
||||
},
|
||||
fetch: ['userId', 'cardId'],
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue