mirror of
https://github.com/wekan/wekan.git
synced 2026-03-07 14:20:15 +01:00
Fix IntegrationBleed.
Thanks to Rodolphe GHIO and xet7 !
This commit is contained in:
parent
97b0c392be
commit
2cd702f48d
3 changed files with 116 additions and 32 deletions
|
|
@ -68,6 +68,14 @@ Meteor.startup(() => {
|
|||
await Authentication.checkAdminOrCondition(userId, writeAccess);
|
||||
};
|
||||
|
||||
// Helper function. Will throw an error if the user is not a board admin.
|
||||
Authentication.checkBoardAdmin = async function(userId, boardId) {
|
||||
Authentication.checkLoggedIn(userId);
|
||||
const board = await ReactiveCache.getBoard(boardId);
|
||||
const adminAccess = board.members.some(e => e.userId === userId && e.isActive && e.isAdmin);
|
||||
await Authentication.checkAdminOrCondition(userId, adminAccess);
|
||||
};
|
||||
|
||||
if (Meteor.isServer) {
|
||||
if (
|
||||
process.env.ORACLE_OIM_ENABLED === 'true' ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue