mirror of
https://github.com/wekan/wekan.git
synced 2026-02-08 17:34:19 +01:00
New Board Permissions: NormalAssignedOnly, CommentAssignedOnly, ReadOnly, ReadAssignedOnly.
Thanks to xet7 ! Fixes #1122, fixes #6033, fixes #3300
This commit is contained in:
parent
21fb8e9164
commit
c1168d181b
5 changed files with 190 additions and 4 deletions
|
|
@ -2947,6 +2947,10 @@ if (Meteor.isServer) {
|
|||
* @param {boolean} isNoComments disable comments
|
||||
* @param {boolean} isCommentOnly only enable comments
|
||||
* @param {boolean} isWorker is the user a board worker
|
||||
* @param {boolean} isNormalAssignedOnly only see assigned cards (Normal permission)
|
||||
* @param {boolean} isCommentAssignedOnly only comment on assigned cards
|
||||
* @param {boolean} isReadOnly read-only access (no comments or editing)
|
||||
* @param {boolean} isReadAssignedOnly read-only assigned cards only
|
||||
* @return_type {_id: string,
|
||||
* title: string}
|
||||
*/
|
||||
|
|
@ -2959,7 +2963,7 @@ if (Meteor.isServer) {
|
|||
const userId = req.params.userId;
|
||||
const boardId = req.params.boardId;
|
||||
const action = req.body.action;
|
||||
const { isAdmin, isNoComments, isCommentOnly, isWorker } = req.body;
|
||||
const { isAdmin, isNoComments, isCommentOnly, isWorker, isNormalAssignedOnly, isCommentAssignedOnly, isReadOnly, isReadAssignedOnly } = req.body;
|
||||
let data = ReactiveCache.getUser(userId);
|
||||
if (data !== undefined) {
|
||||
if (action === 'add') {
|
||||
|
|
@ -2978,6 +2982,10 @@ if (Meteor.isServer) {
|
|||
isTrue(isNoComments),
|
||||
isTrue(isCommentOnly),
|
||||
isTrue(isWorker),
|
||||
isTrue(isNormalAssignedOnly),
|
||||
isTrue(isCommentAssignedOnly),
|
||||
isTrue(isReadOnly),
|
||||
isTrue(isReadAssignedOnly),
|
||||
userId,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue