mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
Allow board members to use more of API. Please add issue (or pull request) if this allows too much.
Thanks to JayVii and xet7 ! Fixes #3862
This commit is contained in:
parent
50fa8a0743
commit
a719e8fda1
8 changed files with 40 additions and 25 deletions
|
|
@ -204,7 +204,8 @@ if (Meteor.isServer) {
|
|||
'GET',
|
||||
'/api/boards/:boardId/cards/:cardId/checklists',
|
||||
function(req, res) {
|
||||
Authentication.checkUserId(req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
const paramCardId = req.params.cardId;
|
||||
const checklists = Checklists.find({ cardId: paramCardId }).map(function(
|
||||
doc,
|
||||
|
|
@ -247,7 +248,8 @@ if (Meteor.isServer) {
|
|||
'GET',
|
||||
'/api/boards/:boardId/cards/:cardId/checklists/:checklistId',
|
||||
function(req, res) {
|
||||
Authentication.checkUserId(req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
const paramChecklistId = req.params.checklistId;
|
||||
const paramCardId = req.params.cardId;
|
||||
const checklist = Checklists.findOne({
|
||||
|
|
@ -351,7 +353,8 @@ if (Meteor.isServer) {
|
|||
'DELETE',
|
||||
'/api/boards/:boardId/cards/:cardId/checklists/:checklistId',
|
||||
function(req, res) {
|
||||
Authentication.checkUserId(req.userId);
|
||||
const paramBoardId = req.params.boardId;
|
||||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
const paramChecklistId = req.params.checklistId;
|
||||
Checklists.remove({ _id: paramChecklistId });
|
||||
JsonRoutes.sendResult(res, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue