mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Allow checklist creation for board members
- Only for members with checklist add permission
This commit is contained in:
parent
40c70c439d
commit
a35df88805
1 changed files with 9 additions and 2 deletions
|
@ -283,8 +283,15 @@ if (Meteor.isServer) {
|
|||
'POST',
|
||||
'/api/boards/:boardId/cards/:cardId/checklists',
|
||||
function(req, res) {
|
||||
Authentication.checkUserId(req.userId);
|
||||
|
||||
// Check user is logged in
|
||||
Authentication.checkLoggedIn(req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
// Check user has permission to add checklist to the card
|
||||
const board = Boards.findOne({
|
||||
_id: paramBoardId
|
||||
});
|
||||
const addPermission = allowIsBoardMemberCommentOnly(req.userId, board);
|
||||
Authentication.checkAdminOrCondition(req.userId, addPermission);
|
||||
const paramCardId = req.params.cardId;
|
||||
const id = Checklists.insert({
|
||||
title: req.body.title,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue