mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Fixed eslint errors
This commit is contained in:
parent
c59891d44b
commit
25b26657da
3 changed files with 13 additions and 13 deletions
|
|
@ -560,15 +560,15 @@ if (Meteor.isServer) {
|
||||||
Authentication.checkLoggedIn(req.userId);
|
Authentication.checkLoggedIn(req.userId);
|
||||||
|
|
||||||
const data = Boards.find({
|
const data = Boards.find({
|
||||||
archived: false,
|
archived: false,
|
||||||
'members.userId': req.userId,
|
'members.userId': req.userId,
|
||||||
}, {
|
}, {
|
||||||
sort: ['title'],
|
sort: ['title'],
|
||||||
}).map(function(board) {
|
}).map(function(board) {
|
||||||
return {
|
return {
|
||||||
_id: board._id,
|
_id: board._id,
|
||||||
title: board.title
|
title: board.title,
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
JsonRoutes.sendResult(res, {code: 200, data});
|
JsonRoutes.sendResult(res, {code: 200, data});
|
||||||
|
|
|
||||||
|
|
@ -533,7 +533,7 @@ if (Meteor.isServer) {
|
||||||
delete data.services;
|
delete data.services;
|
||||||
JsonRoutes.sendResult(res, {
|
JsonRoutes.sendResult(res, {
|
||||||
code: 200,
|
code: 200,
|
||||||
data
|
data,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,16 +37,16 @@ Meteor.startup(() => {
|
||||||
error.statusCode = 403;
|
error.statusCode = 403;
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// Helper function. Will throw an error if the user does not have read only access to the given board
|
// Helper function. Will throw an error if the user does not have read only access to the given board
|
||||||
Authentication.checkBoardAccess = function(userId, boardId) {
|
Authentication.checkBoardAccess = function(userId, boardId) {
|
||||||
Authentication.checkLoggedIn(userId);
|
Authentication.checkLoggedIn(userId);
|
||||||
|
|
||||||
const board = Boards.findOne({ _id: boardId });
|
const board = Boards.findOne({ _id: boardId });
|
||||||
const normalAccess = board.permission === 'public' || board.members.some(e => e.userId === userId);
|
const normalAccess = board.permission === 'public' || board.members.some((e) => e.userId === userId);
|
||||||
Authentication.checkAdminOrCondition(userId, normalAccess);
|
Authentication.checkAdminOrCondition(userId, normalAccess);
|
||||||
}
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue