mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 13:07:17 -04:00
Allow card creation for board members
- Only for members with card add permission
This commit is contained in:
parent
2c4d3fa317
commit
40c70c439d
1 changed files with 8 additions and 1 deletions
|
@ -2003,8 +2003,15 @@ if (Meteor.isServer) {
|
|||
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 card to the board
|
||||
const board = Boards.findOne({
|
||||
_id: paramBoardId
|
||||
});
|
||||
const addPermission = allowIsBoardMemberCommentOnly(req.userId, board);
|
||||
Authentication.checkAdminOrCondition(req.userId, addPermission);
|
||||
const paramListId = req.params.listId;
|
||||
const paramParentId = req.params.parentId;
|
||||
const currentCards = Cards.find(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue