Decided by the maintainer on 2026-11-18 (TODO.md). Deleting, archiving,
restoring or moving a list, and deleting, archiving or moving a
swimlane, does the same to the cards in it, so a list that refuses a
role write access (#4527) now refuses those too:
- lists.softRemove, lists.restore and moveList answer not-authorized;
- the REST list DELETE, archive, unarchive and move, and the REST
swimlane DELETE, answer 403, recorded as ListLockBleed;
- moveSwimlane is refused when a list holding its cards, or bound to
it, refuses the role (swimlaneRefusingListIds);
- client writes meet new Lists and Swimlanes deny rules, and the list
menu no longer offers Archive list or Archive all cards in such a list.
Renaming, recolouring and reordering are not refused, and board admins
are never restricted.
tests/listLockStructure.test.cjs runs the swimlane gate and pins every
path; list-lock-bulk.e2e.js replays the REST cases. Sandboxed route
tests get a pass-through gate.
Thanks to xet7 !
GHSA-3vjg-3p4q-8fwh. The REST card DELETE looked the card up on the board
the caller was authorised for, destroyed its checklists, checklist items,
comments, attachments and subcards by cardId, and removed the card itself
last, keyed on that board and list. A move to another board landing in
between left the card alive on a board the deleter cannot read, stripped of
every child, with both requests answering 200 (CWE-367). Every hooked
removal had the same shape: collection-hooks runs Cards.before.remove (where
the cascade was) and then removes by the caller's original selector - by
swimlane, delete batch or parent - which a moved card no longer matches. The
custom-field link clean-up did the same to the cards linked to it.
The card document is now the claim (models/lib/claimedCardRemoval.js): the
single and bulk REST deletes remove the card first and cascade only when
that removal matched, and the hooked removals cascade from Cards.after.remove
only when the card is really gone. A list deletion removes a card only while
it is still in that list. The REST board move that loses to a delete is a
404 instead of a 500 from cardMove.
A delete that lost the race, or arrived after the card was moved away from
the named board, is refused and recorded in Admin Panel / Problems as
RaceBleed (authz.card-delete-race, medium, never disables the account): a
stale view is not an attack, and PurgeBleed's critical record used to
disable the member who deleted a card somebody had just moved.
tests/claimedCardRemoval.test.cjs replays the reported race and scans
server/ for any cascade before or without the card's removal;
tests/playwright/specs/race-bleed.e2e.js races 12 moves against deletes
and checks that a surviving card always keeps its checklist.
Thanks to xingmuse and xet7 !
DELETE /api/boards/:boardId/lists/:listId/cards/:cardId found the card by
board alone, removed its checklists, checklist items, comments and
attachments, and then removed the card by board AND list. With the wrong
list id the card stayed, emptied, and the reply was 200. Only the named list
was asked, so a member a list refuses could strip that list's cards by naming
a list they may write (ListLockBleed follow-up, GHSA-4734-8vrg-8j3w). The card
now has to be in the named list, and its own list is asked too, which records
the attempt in Admin Panel / Problems as authz.list-locked.
The siblings of #6900, #6905 and #6906 answered 200 for a change that changed
nothing: the swimlane, list, card, dependency and board-domain deletions; the
custom-field update, dropdown-item add and rename; the dependency update; the
board-member add and remove; and the token deletion of an unknown user. Each
looks the record up first and answers a JSON 404, and removing a board's last
admin answers 409. Member removal deactivates the user's active entry, not
the first one.
tests/restWriteRoutes404.test.cjs runs each handler with the record missing
and present, and fails for any id-addressed REST write in server/ without a
not-found answer. tests/playwright/specs/rest-write-routes-404.e2e.js replays
them against a running server. Three guards that pinned the old code shape
were updated, keeping what they protect.
Thanks to xet7 !
The scoped card GET (/api/boards/:boardId/lists/:listId/cards/:cardId) sent
200 with no body for a missing, wrong-list, wrong-board or archived card. The
list, swimlane, custom field, comment and integration GETs did the same, and
the user GET threw a TypeError for an unknown name. Each now answers 404 after
the board check, so a stranger still learns nothing about which ids exist.
Thanks to AhmedLukman and xet7 !
The applyWipLimit, enableWipLimit and enableSoftLimit methods have always
required a board admin ("You must be a board admin to modify WIP
limits."), but a member with write access could still set wipLimit with a
plain list update - the Lists allow rule grants write members every field
- or with REST PUT /api/boards/:boardId/lists/:listId. A WIP limit is a
board-wide workflow rule, so the methods' rule now holds everywhere:
- a Lists deny rule refuses an update touching wipLimit unless the caller
is admin of the list's board. Every WeKan client path goes through the
methods, so it refuses nothing in ordinary use;
- the REST PUT asks for a board admin (checkBoardAdmin) when the body
carries a wipLimit; write access still edits title, color and starred.
tests/wipLimitAdminOnly.test.cjs runs the real deny rule, pins the REST
check before the write, and fails on any list method that changes a WIP
limit without a board admin check first.
This was in CHANGELOG TODO Later as needing a maintainer decision;
decided: board admins only.
Thanks to xet7 !
Only template lists archived their cards, so a normal list's cards stayed
visible in the Lists, Table and Calendar views. A server hook on the list's
archived field now archives the cards of every list, whichever way it is
archived, and restore brings back exactly those - the rule #2292 gave
swimlanes. Cards archived with the list get the list's archivedAt, so a
browser clock that differs from the server's cannot keep them archived.
Thanks to Raymond-Voogt and xet7 !
Fixes#6765.
#2906 asked how to add and archive lists by script. Lists could be added,
edited and deleted through REST, but not archived or restored: the PUT edits
only live lists and has no archived field. POST
/api/boards/:boardId/lists/:listId/archive and .../unarchive now do what the
list menu does, for a user with write access to the board, answering 404
when the list is not in the expected state. docs/API/Lists.md shows both.
Thanks to stevekiss and xet7 !
Fixes#2906.
copyCard, saveCardAsTemplate, copySwimlane, copyList and moveList checked only
that the caller belongs to the source board, so an assigned-only member could
copy a card they are not assigned to (by its id) - or a whole list or swimlane,
with every card in it - into a board they control and read it there. One rule
(mayCopyFromBoard in models/lib/boardCardScope.js) now allows such a member to
copy a card assigned to them and no container; everyone else copies as before.
Not recorded: copying a list is ordinary UI. The test drives the rule and
checks all five methods ask it; the moveList harness gets the rule's module.
Thanks to xet7 !
ErrorBleed fixed boards.js and users.js. Thirty-four more REST handlers - lists,
swimlanes, card counts, integrations, org, team, settings, attachment storage
settings, rules and dependencies - still answered a refused request with HTTP
200 and the raw error object, or the raw object with its status, so a
non-member's request read as a success and an unexpected failure exposed its
internals. All now answer through publicErrorData(). The negative test scans
the whole server tree for the old shapes, single- and multi-line; a browser
test checks a non-member gets 403.
Thanks to xet7 !
History restored a list but left deletion markers on its cards. Replay the
existing soft-delete/restore modifiers across the same board/list and batch.
Keep independently deleted cards untouched and refuse lifecycle rows for
lists moved to another board. Preserve the deletion batch in lifecycle
content and record the actual lifecycle state in history snapshots.
The browser regression failed against the previous implementation. It now
passes undo, redo and undo again with persisted card checks. Separate
read-only rejection, pure negative cases, existing history tests and
flow/time-history browser regressions pass.
Thanks to rawwerks and xet7 !
Fixes#1023,
Enforce the canonical role policy for both sides of list, swimlane and checklist moves, scoped imports, attachment renames and history writes. Record denied attempts through bounded Problems summaries without allowing logging failures to bypass authorization.
Add role-matrix decisions, the reported moveList attack, sibling guard inventory and a browser regression. Targeted Node suites pass; live browser execution remains pending.
Thanks to Wenhao Wu, Southeast University and xet7 !
Phase 1 of docs/Features/Reports/History/History.md §10, plus the write half of
phase 2. Ctrl+Z is no longer a position-only feature.
THE STORE. models/changeHistory.js is the append-only collection of §4: one row
per change, carrying every container id it sits inside (boardId, swimlaneId,
listId, cardId) so a container scope is a plain equality rather than a join the
database cannot do - which is what makes a swimlane's history include its lists'
and cards' rows.
It imports NO other model, deliberately. Its predecessor imports Cards, Lists,
Swimlanes, Checklists and ChecklistItems so its undo() can write to them, and
that is precisely why models/cards.js could not import it, guarded on an assumed
global instead, and recorded nothing for years. A collection that entities must
import cannot import entities. Applying a change back to a document therefore
lives in server/models/changeHistory.js, which nothing imports and which may
import anything.
THE RULES ARE PURE. models/lib/changeHistoryQuery.js holds the scope-to-selector
translation, the search and the selection normalisation, with no Meteor and no
database, because that is where this feature is either right or quietly wrong:
a scope that resolves to the wrong id column shows one board's history under
another board's menu, and a selection that does not normalise its input restores
the wrong rows. Both are silent. 17 tests, including that an unknown or
half-given scope is REFUSED rather than widened into a selector that matches
everything.
UNDO IS NOW THE WHOLE HISTORY. changeHistory.undoLast/redoLast replace the
position-only methods; the keyboard bindings and the tested pickUndo/pickRedo
rule are unchanged. One rule covers every change type instead of a case per
action: undo applies previousContent, redo applies newContent. Restores go
through the same setters an ordinary edit uses, so validation, hooks and
Activities still run, and each restore is itself recorded twice - once
attributed to whoever made the change being restored, once to whoever pressed
Restore (§8.3).
RECORDED SO FAR: card description edits (§10.2's first content group - the
previous text is read BEFORE the write, since after it the old value is gone),
card moves, list moves, and list soft-delete/restore, which is what makes
"undo a deleted list" work.
changeHistory is in the snap's MERGE_COLLECTIONS, as §9a.4 requires the moment
the collection exists: a history row written on the copy that is not served is
work that would otherwise be stranded in a database nobody opens.
NOT BUILT: every UI in §7, §7a and §8 - the popup, the table, the contributor
avatars, the Restore button, the "History" menu items - and recording for the
remaining groups of §3. The methods those screens need exist and are tested;
nothing calls them yet. Both docs now say which half is which, because the last
time this document claimed more than the code did, the gap survived for months.
Thanks to xet7 !
Ctrl+Z after dragging a card did nothing, and had never done anything.
#6478 found that every trackChange call site guarded on
typeof UserPositionHistory !== 'undefined'
against a bare identifier no file imported. It is an ES-module default export,
not a global, so the guard was always false and nothing was ever recorded. The
fix - import the collection - was applied to the list path in
server/models/lists.js and NOT to the card path in models/cards.js, which kept
the dead guard. So list moves became undoable, card moves did not, and
docs/Features/Login/Undo/Undo.md said card moves were "already present (now
actually runs)" the whole time.
The import here has to be lazy and has to be inside the call:
models/userPositionHistory.js imports models/cards.js, so a top-level import
would be a cycle and could leave the binding undefined depending on evaluation
order. That is the same shape as the cardMoveModifier require a few lines above,
and is most likely why the file was skipped rather than fixed.
The guard is gone from the list path too. It was harmless there - that file does
import the collection, so it was always true - but it is the shape that turned
recording off, and copying that block into a file without the import silently
turns it off again. Which is exactly how the card path stayed dead.
tests/undoRecordsWhatItClaims.test.cjs is the guard the fix needed more than the
fix itself, because undo FAILS SILENTLY: nothing throws when a change is not
recorded, the user just presses Ctrl+Z and nothing happens. It finds the
recording sites rather than listing them, and fails when one cannot reach the
collection, when one reintroduces the assumed-global guard, when recording is
not wrapped so it can never fail the move it records, and when an entity type is
recorded that undo() has no case for. It also pins the reverse gap - swimlane,
checklist and checklistItem have full undo() cases that nothing records - so
that stays a known follow-up rather than a surprise.
Undo.md no longer claims more than the code does, and now says plainly what is
recorded (list moves, list soft-delete/restore, card moves) and what is not
(everything else - a description, a checklist title, labels, members, dates are
written straight to the document with no previous state kept).
Thanks to xet7 !
Moving a list to another swimlane on the same board did nothing: the list kept
its empty swimlaneId, so it went on rendering under every swimlane, and
deleting "the one in the second swimlane" deleted the only list document there
was. Backups showed the empty swimlaneId the report describes.
List.move(boardId, swimlaneId) asked "does the target board already have a list
with this name?" without first asking whether the target board IS this list's
board:
const boardList = await ReactiveCache.getList({
boardId, title: this.title, archived: false });
if (boardList) { ...merge, never writes a swimlaneId... }
else { ...insert a new list WITH the swimlaneId... }
On a same-board move that search finds THIS LIST, so the merge branch ran - and
the merge branch is the one branch that never writes a swimlaneId. The chosen
swimlane was discarded every time, which is why the binding could not be
restored by hand either.
Merging is only meaningful across boards. On the same board a move is a
re-bind, so that is what it does now. The decision lives in
models/lib/listMovePlan.js, where it can be unit-tested, and models/lists.js
applies it: same board -> rebind this list, other board with the name taken ->
merge the cards into that list, other board -> create it there, bound. An empty
swimlaneId stays a deliberate un-bind back to board-wide, which is still a
legitimate layout. moveList now also refuses a swimlane that is not on the
board the list is moving to.
The same branch called `card.move(boardId, this._id, boardList._id)`, and
Card.move's second argument is a swimlaneId - so it set every card's swimlaneId
to a LIST id, i.e. to a swimlane that does not exist, and those cards became
the orphaned cards the board-open repair then has to rescue. The cards were
also selected as `this.cards(swimlaneId)`, filtering the SOURCE list's cards by
a swimlaneId belonging to the TARGET board, which on a cross-board move matches
nothing and left every card behind. Both are gone: the list's own cards travel
with it, into the chosen swimlane.
A negative test scans models/lists.js for any card.move() whose second argument
is not a swimlane, so this cannot come back at another call site - it found the
argument order was wrong in only this one place, and the scan now ignores
comments so the explanation of the fix does not trip it.
This does not restore bindings already lost. Boards opened under the versions
before #6515 had every list un-bound automatically, and which swimlane each
list belonged to is not recoverable from the data; with this fix that binding
can at least be set again from Move List.
Thanks to TawsTm and xet7 !
Fixes#6670,
#5251 asked for the last change date of a list, to build an offline Android
client that syncs only what moved. Neither half existed: GET
/api/boards/:boardId/lists returned {_id, title} and no dates at all, and while
the single-list endpoint returns the whole document - modifiedAt included - that
date answers the wrong question. It moves when the LIST document changes (title,
sort, archived); a card being added, edited or archived does not touch it, and
those are the changes the client is asking about.
The list endpoint now reports both:
modifiedAt - the list document itself
cardsModifiedAt - the newest change among the cards in it, null when none
One query for the board's cards and a reduction in memory, not a query per list -
a query per list is what made this expensive enough to ask about. Archived cards
are included on purpose: archiving is one of the changes named in the issue.
The reduction is models/lib/listActivityDates.js, a pure helper, so it is
testable without Meteor and so the handler stays readable. It reads
dateLastActivity as well as modifiedAt and takes whichever is newer, because
boards written by older WeKan carry only the former; a card with no usable date
is skipped rather than counted as now or as zero; and a list whose cards carry no
date is ABSENT from the result, so the endpoint reports null rather than an
invented time - a client polling on a wrong date either never syncs or syncs
forever.
tests/listActivityDates.test.cjs exercises the helper directly: newest wins, per
list, legacy field, string and numeric dates, an undated card cannot drag the
answer backwards, and a negative case feeding it nulls, strings, numbers, a card
with no listId and an Invalid Date - none of which may throw, since the handler
passes whatever the database holds. It also pins the endpoint's shape: both
fields, one cards query, only the three fields it reduces over, and no
`archived: false` on that query.
Thanks to mimZD and xet7 !
Fixes#5251,
WIP-LIMIT POPUP: "the checkbox can not be unchecked and the counter always falls
back to 1". One cause for both. models/lists.js getWipLimit() read the list back
through `ReactiveCache.getList(this._id)`, and on the SERVER that getter is
ASYNC - it returns a promise, and a promise has no `wipLimit` - so the helper
answered 0 for every option, every time. `enableWipLimit` therefore saw value 0
and reset the limit to 1 on every click, and toggled `!enabled` where `enabled`
was always 0, so every click turned the limit ON. The document is `this`, so the
server needs no lookup at all - and a toggle wants the state as it was when the
click happened, not after its own write. The client keeps the lookup: it is what
makes the popup's tick and number follow the change. Apply now also refuses a
limit that is not a usable number instead of sending NaN, which passes
`check(limit, Number)` and dies in the schema with nothing to show the user.
ADMIN PANEL / ATTACHMENTS CHECKBOXES: every checkbox on those panes - Backup's
three, each storage's Enabled and Read, the S3 path-style flag, the avatar-upload
block - drew as a grey rotated RECTANGLE instead of a green tick. They were
native `<input type="checkbox">` styled into WeKan's material checkbox, which
needs the browser to drop its own rendering for `appearance: none`; where it does
not, the geometry applies and the colours do not, which is exactly that
rectangle. They are `.materialCheckBox` divs now, the same markup as the rest of
WeKan, with no native rendering to lose. Two of them could not be unchecked for a
second reason: their state was written as `checked="{{filesystemRead}}"`, a
quoted STRING - and `checked="false"` is checked in HTML.
SIDEBAR CHECKBOX ROWS: "checkboxes and text don't fit well". A row is
`a.flex > i.fa + span`, and `.flex` is only `display: flex` - no alignment, no
gap - so the box glyph touched the first letter of its label and sat on a
different line from it. `align-items: center` and a 6px gap, with a fixed glyph
width so every row's label starts at the same x whether its box is a square or a
tick.
tests/wipLimitPopup.test.cjs and tests/adminAttachmentCheckboxes.test.cjs pin
all of it.
Thanks to Alishara and xet7 !
Fixes#6465,
When a board opens it now checks (boardListRepairNeeded) whether any list is
wrongly bound to a single swimlane (the #6484 corruption, which makes a list
vanish from the other swimlanes). If so, and the viewer is a board admin, it
runs repairBoardWideLists automatically while showing the shared
migration-progress modal, then completes. The check runs once per board,
fire-and-forget, and never blocks rendering; on error the board is unmarked so a
later open retries.
The migration-progress modal is now branded with the configured Product name
(Admin Panel / Settings / Layout / Product name, Settings.productName), falling
back to WeKan when none is set, via the pure models/lib/productName.js helper —
so the repair (and every migration reusing this modal) shows the admin's Product
name instead of the hard-coded WeKan brand.
Tests: tests/productName.test.cjs (helper + modal-branding source guards) and
the extended tests/listUnbindRepair.test.cjs (detection method + client
detect/repair/progress wiring) pass.
Thanks to xet7 !
The #6484 bug (nudging a board-wide list in swimlanes view bound it to one swimlane and moved its cards there, so it vanished from the other swimlanes) is fixed in code, but boards already hit keep the wrongly-set list.swimlaneId. New board-admin-gated method repairBoardWideLists(boardId) clears swimlaneId back to null for every swimlane-bound list on that board, restoring them to board-wide (rendered under every swimlane). Idempotent (lists already board-wide are skipped), scoped to the one board, and returns the count repaired. The list-selection is a pure, unit-tested models/lib/listUnbindRepair.js. Note: this repairs the LIST binding only; cards the bug moved into one swimlane are not restored (their intended swimlane is unknown -- recover those from a backup).
Tests: tests/listUnbindRepair.test.cjs (5 checks) covers listsToUnbind (selects bound lists, idempotent, invalid inputs, non-string swimlaneId) and a source guard that the method is board-admin-gated, uses the helper, clears swimlaneId to null, and is scoped to the board.
Thanks to xet7.
Two fixes to the #6465 inline Add List composer:
1) Save button did nothing. The inline composer calls createListAfter WITHOUT
nextListId, but the server check() used Match.OneOf(String,null,undefined)
(not Match.Optional) for it. Meteor check throws "Match failed [400]" on a
MISSING object key unless the sub-pattern is Match.Optional, so every inline
add-list 400'd. The omittable params (swimlaneId/afterListId/nextListId/type)
are now Match.Optional, so callers may omit them.
2) Empty swimlane/board now shows a + button, and the create-list form appears
only after clicking it (a swimlane that already has lists keeps using the
per-list-header add-list button — no + button needed). The reveal is scoped
to the clicked swimlane via a wekan-add-list-empty Session flag, cleared on
save/close.
Tests: models/lib/createListParams.js + tests/createListParams.test.cjs mirror
the method's param contract (incl. Meteor's missing-key rule) with the exact
client shapes + negatives, and a source guard that the check uses Match.Optional;
tests/upcomingUiGuards.test.cjs gains guards for the empty-state + button reveal.
Wired into test:unit:node.
Deleting a list no longer destroys it. The list and its cards are marked
(deletedAt/deletedBy/deleteBatchId), hidden from the board, recorded as a
reversible delete in history, and restorable via lists.restore or Ctrl+Z.
This is the first slice of "no permanent delete in ordinary use": physical
removal is limited to GDPR/account erasure and a Global-Admin purge gated by
a new Admin Panel / Features / Delete "Enable permanent delete" toggle
(off by default).
- models/lib/softDelete.js: pure notDeleted/softDeleteSet/restoreModifier/
canPurge helpers (+ tests/softDelete.test.cjs, wired into test:unit:node).
softDeleteSet omits falsy actor/batch and restore uses $unset so no null is
ever written to a Date/String schema field.
- enablePermanentDelete feature flag (models/lib/featureFlags.js) + Settings
schema field.
- deletedAt/deletedBy/deleteBatchId schema fields on Lists and Cards
(optional, no null default -> absent means live).
- board/swimlane list render paths filter deletedAt: null.
- server/models/lists.js: shared softRemoveList() + lists.softRemove /
lists.restore / lists.purge (purge gated on canPurge = isAdmin && flag);
client delete handler and REST DELETE now soft-remove.
- userPositionHistory undo()/redo() handle actionType delete/restore via a
batch-consistent _applyDeleted() helper.
Design + planned rollout (other entities, Recycle Bin, admin Delete category
table with GDPR data classes) in docs/Features/Undo/Undo.md.
A user accidentally dragged a list into another swimlane on mobile (merging it
with an existing list) and spent ~15 min recovering - no confirmation, no undo.
Undo/Redo: the userPositionHistory collection modelled this but was NOT actually
recording (trackChange guarded on an un-imported global) and had no redo or key
bindings. Now:
- list moves are recorded in updateListSort (import UserPositionHistory so the
guard passes); card moves already had the call.
- add a symmetric redo() model method + an undone/undoneAt redo stack; add
userPositionHistory.undoLast/redoLast methods (a new action clears the redo
stack via trackChange).
- wire Ctrl+Z / Ctrl+Y (and Cmd variants) in client/lib/keyboard.js; disabled
inside inputs/textareas so native text undo is unaffected.
- pure selection logic models/lib/undoRedoSelection.js + tests.
Confirmation: on touch / small screens, moving a list to a DIFFERENT swimlane
(which re-homes every card) now asks for confirmation; a decline reverts the
drag. Same-swimlane reordering is unaffected.
Thanks to mueschel (report) and xet7.
The REST endpoint PUT /api/boards/:boardId/lists/:listId already accepted
title, color, starred and wipLimit, but the color was stored unvalidated. It
now validates the color with normalizeListColor (a named palette color OR a
custom #rrggbb hex) and rejects an unknown color with a clear 400 instead of
silently storing None or hanging. The pure field/validation logic is extracted
to a Meteor-free helper models/lib/listApiUpdate.js so it is unit testable
without a running server (tests/listApiUpdate.test.cjs).
api.py gains two commands mirroring editcard/editcardcolor:
editlist BOARDID LISTID NEWLISTTITLE and
editlistcolor BOARDID LISTID COLOR, with usage lines in the help block.
Thanks to C0rn3j and xet7.