Commit Graph
4 Commits
Author SHA1 Message Date
Lauri Ojansivu b05972c4c8 A checklist folded on a minicard stays folded: no publication sends the current user a partial profile.
The fold was stored, and half a second later the checklist unfolded again.
DDP merges only top-level fields, and Meteor re-runs named subscriptions
before the accounts publication of the whole profile on every login, a
reconnect included. userDesktopDragHandles sent the current user
{ profile: { showDesktopDragHandles } }, and user-miniprofile, user-search,
notificationUsers, the card search and report, the boards report, People,
the impersonation report and the Chat view's comment authors sent a few
profile.* fields that could include the current user. When one of them won,
the client's profile shrank to those fields until a reload, and every
preference in it went back to its default; #6691 had found the same for the
board view and fixed only that one.

userDesktopDragHandles now publishes the preference under its own top-level
field, as userBoardView does, and utils.js reads it when the profile has
none. Every other publication leaves the current user out
(server/lib/notCurrentUser.js); their own document is published in full
already, and user-admin now also publishes createdAt, loginDisabled,
lastConnectionDate and importUsernames for the user's own row on the admin
pages.

tests/noNarrowProfileForCurrentUser6919.test.cjs finds every users query
with profile subfields in a server file that publishes and requires it to
leave the current user out (verified to fail when one does not).
tests/playwright/specs/minicard-checklist-collapse-6919.e2e.js folds and
unfolds a minicard checklist in Persian after a page load and after a
reconnect, on the reporter's card, a second checklist, a linked card, a user
with 300 earlier folds and both swimlanes of a shared list header row, and
checks the fold survives the server's answer, in the database and on the
client. Before the fix 4 of 24 reconnect runs unfolded; with it 24 of 24 and
the whole spec pass in Chromium.

Thanks to mimZD and xet7 !

Fixes #6919.
2026-11-16 16:46:06 +02:00
Lauri Ojansivu 5b2ed17e6b Board role permissions apply to every board view and every path to a card.
AssignedBleed follow-up, GHSA-r4gm-mjj9-g3x8. An assigned-only member
(isNormalAssignedOnly, isCommentAssignedOnly, isReadAssignedOnly, and custom
roles through those flags) sees only the cards assigned to them. The Board
Email View checked board.isVisibleBy() alone, so it published the title,
description and email metadata of every card in a list or label, counted
them, and searched them. It now merges assignedOnlyCardScope into its folder
and search selector for the page and the count, and a reply on another card
is refused.

An audit of every path that returns or changes a card found the same shape -
"a member of the board, so every card of it" - elsewhere, all fixed here:

- reads: the board publication's ancestor cards, linked source cards with
  their subtasks and dependency targets, and comment reactions; All Boards
  tile counts; a board's activities from linked boards; the Chat view and
  the All Boards feed, which also let card MEMBERS through (assignees is the
  rule); My Attachments' card; GET /api/user/cards; position history of a
  card; the cross-board subtask picker; Scrum rollover counts; and the
  notification publications, which kept sending the full documents of cards
  named in old notifications - also to members removed from the board;
- writes on a card the member cannot see: the canonical
  canEditCardOrLinkedCard / editableCardIds (every Cards.allow update,
  checklists, items, attachments, text notes, custom fields, the shared
  description, card methods) now ask the card - the role's `write` is a
  board answer, and the card is read when a caller passed it without
  assignees; DDP and REST comments, button rules on a card, checklist moves,
  issue state, watching, the card-opened webhook, moveBoardObjects,
  moveSwimlane and attachment moves;
- REST writes: checkBoardWriteAccess refuses assigned-only members, as
  checkBoardAccess already does for reads - those routes act on any card,
  list or swimlane by id. The GHSA-f396 canary still fires for a role
  without the write capability.

A refusal no view would produce is recorded under AssignedBleed in Admin
Panel -> Problems (authz.assigned, medium: never disables); opening a view,
searching and REST calls are narrowed or refused without a record.

tests/boardRoleViews.test.cjs runs the Email View selector, pins every path
above, and fails when any server file that serves card data has no role
rule and no stated exemption; the "assignee or card member" rule is
rejected anywhere in server/ and models/. server/lib/tests/editableCardIds
adds an assigned-only case for both edit checks (meteor test; not run here).
Seven guards that pinned the old lines now pin the new ones.

Thanks to crypto-nidh, binary-lover and xet7 !
2026-10-16 13:03:34 +03:00
Lauri Ojansivu 230badf48e Chat view: a card from any board opens in the middle; folded panes keep their carets.
- Clicking a card in the channel tree took the member to that card's
  board. It now opens the card in the middle pane with its conversation
  beside it, whatever board it is on, and the page stays where it is. The
  card's conversation comes from a publication of its own
  (chatViewCardComments) with the tree's limits - a board the member sees,
  a role that reads comments, only their cards on an assigned-only board -
  and its writers' names; the comment box follows the card's own board.
- Folding the Channels or Comments pane left only an icon: the double
  caret stays now, pointing the way the pane opens, mirrored with the
  others right to left.

Tests: chatView.test.cjs (no navigation, the subscription, the card's
board for commenting, the publication's limits, the carets),
email-chat-views.e2e.js (another board's card in the middle without
leaving the page, carets visible on folded panes).

Thanks to xet7 !
2026-10-15 00:38:03 +03:00
Lauri Ojansivu 2ee3e83793 Chat view: channels are the cards with a conversation, on every board, with unread counts.
The Chat view's tree listed the open board's swimlanes, lists and cards,
and every other board as a link that left for that board. Now:

- The tree is workspaces > boards > swimlanes > lists > cards, holding
  the cards that have a conversation on every board the member sees
  (server/chatView.js chatViewChannels). Every board without one is under
  Other boards; its first message moves it up to its place.
- Each level has a caret before its icon - after it, mirrored, in a
  right-to-left language - and folds open and shut with a slide (none
  for a member who asked for reduced motion). Clicking a board folds it;
  it no longer leaves the Chat view. The board the member is on, its
  workspaces, swimlanes and lists start open; what they open or close is
  kept in their browser.
- The board the member is on shows all its cards, from the board's own
  data, so a conversation can start on any card and a dragged card moves
  in the tree at once; its button shows only the cards with messages.
  Another board opened from Other boards shows all its cards
  (chatViewBoardChannels) for the same reason.
- Every level shows the messages this member has not read: others'
  messages after they last opened the card, all of them on a card never
  opened; opening the card - or a message arriving while it is open -
  reads it.
- Every name, and the chat's header, renders as Markdown (inlineViewer).
- Only what the member may read: boards they see in All Boards, only
  their own cards on an assigned-only board, no conversation where their
  role reads no comments.

Tests: tests/chatView.test.cjs (the tree, Other boards, a first message
moving a board up, unread sums, the full board, carets, folding rows,
no navigation), server/lib/tests/chatViewChannels.tests.js (unread
counts, never my own, the role and assigned-only limits, a board I do
not see refused), email-chat-views.e2e.js (folding without leaving the
view, the move up, unread badges, Markdown names). New strings
translated in all locales.

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