Files
wekan/packages
Lauri Ojansivu 548834c4ee Fix five role helpers that answered the same for everybody.
Found while mapping every role check for custom board roles:
- canImportIntoBoard tested the role helpers as references
  (`!user.isWorker`, always false), so Import was offered to nobody; it
  asks the write capability now, as the server does.
- the rules list's canAdmin used `user.isBoardAdmin` without calling it,
  so every member saw the rule controls.
- the role popup's isLastAdmin compared activeAdmins() - a list - with 1,
  so the last admin was never stopped from giving the role away.
- the members widget's isWorker called Boards.hasWorker, which is not a
  collection function.
- OIDC's DEFAULT_BOARD_ID used Array#contains, which does not exist, so
  the configured role flags threw; isCommentOnly works next to the
  documented isCommentsOnly spelling.

tests/roleHelperRegressions.test.cjs pins each, and fails for any role
helper tested as a bare reference anywhere in client/, models/ and
packages/, and for a list compared with a number.

Thanks to xet7 !
2026-10-14 08:22:12 +03:00
..