mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 17:45:18 -05:00
A board's own admin/member could leave the organization (or be removed) and leave nobody - not even a global site admin - able to edit its settings, add members to it, or archive/delete it: Boards.allow's update/remove rule only checked board.hasAdmin(userId) against the board's own member list. inviteUserToBoard already had a bypass for Meteor.user().isAdmin; the whole-board update/remove rule did not. server/lib/utils.js gets isBoardAdminOrSiteAdmin (pure, unit-tested) and allowIsBoardAdminOrSiteAdmin (the async Meteor.users-aware wrapper), and server/permissions/boards.js's update/remove rules now use it instead of the board-only allowIsBoardAdmin. Scoped to the whole-board rule only - the narrower rules/actions/triggers/comments allow rules keep the board-only check, pinned by a negative test. Thanks to relikd and xet7 !