mirror of
https://github.com/wekan/wekan.git
synced 2026-02-21 15:34:07 +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
|
|
@ -181,13 +181,16 @@ Lists.attachSchema(
|
|||
|
||||
Lists.allow({
|
||||
insert(userId, doc) {
|
||||
return allowIsBoardMemberCommentOnly(userId, ReactiveCache.getBoard(doc.boardId));
|
||||
// ReadOnly and CommentOnly users cannot create lists
|
||||
return allowIsBoardMemberWithWriteAccess(userId, ReactiveCache.getBoard(doc.boardId));
|
||||
},
|
||||
update(userId, doc) {
|
||||
return allowIsBoardMemberCommentOnly(userId, ReactiveCache.getBoard(doc.boardId));
|
||||
// ReadOnly and CommentOnly users cannot edit lists
|
||||
return allowIsBoardMemberWithWriteAccess(userId, ReactiveCache.getBoard(doc.boardId));
|
||||
},
|
||||
remove(userId, doc) {
|
||||
return allowIsBoardMemberCommentOnly(userId, ReactiveCache.getBoard(doc.boardId));
|
||||
// ReadOnly and CommentOnly users cannot delete lists
|
||||
return allowIsBoardMemberWithWriteAccess(userId, ReactiveCache.getBoard(doc.boardId));
|
||||
},
|
||||
fetch: ['boardId'],
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue