Commit Graph
85 Commits
Author SHA1 Message Date
Lauri Ojansivu 0071dde0f3 Flow fields on cards: Blocked with a reason, Class of service with Expedite's WIP limit, MoSCoW and WSJF.
Four Kanban and Scrum practices other tools have, kept on the card
(card.flow, models/lib/cardFlow.js), offline and with no AI:

- Blocked: ticked with a reason; who marked it and since when are the
  server's. A red Blocked badge on the minicard, the reason its tooltip.
- Class of service: Standard, Fixed date, Expedite, Intangible. Expedite
  has a WIP limit of one open card per board; a second is refused.
- MoSCoW priority: Must, Should, Could, Won't have.
- WSJF score: business value, time criticality and risk reduction divided
  by job size, each on the 1-20 scale; shown once every part is set.

Each is a row of Board Settings / Card in the Card section, off on the
card and the minicard until a board turns it on, and an Admin Panel /
Features / Card field that hides it on every board. Written only by the
setCardFlow method, which checks the card edit right, an assigned-only
member's own cards and the values; a client write of flow is denied.
Translated in every language.

Thanks to xet7 !
2026-11-20 08:08:26 +02:00
Lauri Ojansivu d4c0d3e882 Security: a REST write that changes nothing answers 404, and a card deletion naming another list keeps the card's children.
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 !
2026-11-14 21:26:30 +02:00
Lauri Ojansivu 5c1f6088f4 Fix CreateBleed: "Only admins can create boards" holds on every path.
GHSA-qcfm-2g4w-wqcc. Admin Panel / Settings / Visibility / "Only admins
can create boards" (#4475) was checked only inside
createBoardWithInitialSwimlanes, the Add Board form. A non-admin still
created working boards by a client Boards.insert (Boards.allow.insert
approves any signed-in user), POST /api/boards and both board import
routes, as reported, and also by importBoard, cloneBoard, copyBoard,
POST /api/boards/:boardId/copy and createBoardFromCard.

One decision (models/lib/boardCreationPolicy.js) and one guard
(server/lib/boardCreationGuard.js) are asked by every one of those paths
before they write, and by a new Boards.deny insert rule. A board template
stays every member's own; boards WeKan makes itself (a Templates container,
a board's subtasks board) are not created by the user. A REST refusal is
403. A refusal is recorded in Admin Panel / Problems as CreateBleed
(authz.board-creation, low, CWE-863, blocks no account), and Duplicate and
"Create board from card" are hidden like Add Board, so only a client
bypassing the interface reaches it.

tests/createBleed.test.cjs drives the decision, the guard and the real deny
rule against the reporter's console insert, and fails if any path that
creates a board for a user does not ask the guard, or if anything else
reads the setting. tests/playwright/specs/createbleed-board-creation-admin-only.e2e.js
replays the report against a running server. The guards that pinned the
old inline check now pin the shared one.

Thanks to tsurutanmen and xet7 !
2026-11-07 00:51:53 +02:00
Lauri Ojansivu d42369e96a Full collection scans run once, not at every start of every server; due-date reminders are sent once.
The startup schema re-check claims a run in _wekan_migration so one server
re-checks while the others skip (a claim older than 2 hours is taken over),
and a run that leaves work unresolved is retried once a day instead of at
every start. The daily due-date reminder scan is claimed per day in
dueReminderRuns, so 24 replicas no longer send 24 reminders per card.
A partial index on lists serves the 15-minute list sync scan, and a sparse
index on boards.dueReminderDays serves the due-date lookup.

Thanks to Raymond-Voogt and xet7 !

Fixes #6855,
2026-11-02 11:28:44 +02:00
Lauri Ojansivu 2c520ef382 Declutter the opened card, attachments too, and fit Card Settings on the screen.
#6796: an opened card gave most of its height to controls with nothing in
them. Stickers, Location, Dependencies and List already have Show on Card
rows, and Date Format is in Member Settings; what was left:

- A field's add button sits on its title's line (Labels, Stickers,
  Location, the dates, Members, Assignee, Creator, Requested and Assigned
  By, Dependencies); what a field holds follows and wraps. Requested and
  Assigned By put their two buttons side by side.
- Checklists: the controls under the list share a line, and the bottom
  "+" is drawn once there is a checklist; before that it is the title
  line's.
- Attachments: the upload rules ("If filename is invalid, ...", size,
  types) are in the upload popup, not body text above every list. "+" is
  a small button. A file with nothing to preview gets a small file button
  that still opens the preview, instead of a 144x96 box with "txt" in it,
  and the name has a line of its own, so a long one is not hidden behind
  the buttons.
- Two new Board Settings / Card / Show on Card rows, Attachments: Preview
  and Attachments: Details (uploader and date), both on by default, built
  from existing translations.

Board Settings / Card is a centred panel as wide (up to 1800px) and tall
as the window, and each list spreads into as many 10em columns as fit,
read top to bottom: on 1920x1080 nothing is scrolled, on 1366x768 32px.

Its rows are dragged by the handle, the icon or the label when drag
handles are on, and by the icon or the label, with no handle drawn, when
they are off. With handles on only the handle dragged, and the rows were
locked to vertical moves, which the columns made unusable.

tests/declutterCard6796.test.cjs runs the tile decision and the popup
geometry, and checks the gates, the CSS and the drag wiring;
tests/playwright/specs/declutter-card-6796.e2e.js checks the add buttons
on their title's line, the compact attachment, the rules in the upload
popup, Attachments: Details, the new rows saving, no scroll at 1920x1080,
and a drag by label and handle with handles on and by label with them
off. cardSettingsCoverage and narrowWindowLayout follow the new rules.

Thanks to mueschel and xet7 !

Fixes #6796,
2026-10-22 19:15:36 +03:00
Lauri Ojansivu 390007e380 Whiteboard: a card's drawing full screen, that several people draw on at once.
Card menu -> Drawing -> Open as whiteboard opens the drawing under the header
bar, over the opened card, with the drawing's and Red Strings' own tools -
the seven colours and four widths, Undo, Clear and Save picture. The 800 x
500 drawing is scaled to the screen, so a line lands in the same place on a
phone and on a 55" screen; Escape or x closes it.

Several people draw at the same time: each line is sent when the pen lifts
as one atomic $push into that drawing (cards.whiteboardAddStroke), with its
own id and its author, and the card's publication brings it to everyone who
has the drawing open; the line stays drawn locally until it comes back.
Undo and Clear take away only the caller's own lines, Save picture writes
only the drawing's PNG, so nothing anybody else is drawing is overwritten.
Who may draw is who may edit the card; the others watch. A Board Settings /
Card row, Whiteboard, hides it on a board, and the Admin Panel's Card fields
everywhere. The drawing popup's PNG upload is shared with Save picture.
Translated in every language.

Thanks to xet7 !
2026-10-17 16:57:12 +03:00
Lauri Ojansivu 3cb089b8ca Checklist from description, action items, and search phrases.
The last three of the features other kanban apps call AI, done with plain
code (docs/Features/General/Assistants/Assistants.md):

- Checklists -> From description: the list lines of a card's description
  ("- ", "* ", "1. ", task boxes; never inside code blocks) previewed, then
  made into a checklist - ticked where the line was [x] - or into subtasks
  through addSubtaskCard.
- Create cards from action items, on a comment and in the card menu for its
  description: "TODO: ...", "- [ ] ..." and "@user ..." lines become cards
  at the top of the card's list, linking back to it, with the mentioned
  user as member when they are an active board member.
- Global search understands plain phrases in the reader's language - "my
  overdue cards", "due this week", "unassigned cards" and seven more - and
  runs them as its operators, saying which; a query with an operator in it
  is never rewritten.

Checklist from description and Action items are Show on Card rows of Board
Settings / Card and of the Admin Panel's Card fields; Search phrases is an
Admin Panel / Settings / Visibility / Features tick. Translated in every
language.

Thanks to xet7 !
2026-10-17 16:25:51 +03:00
Lauri Ojansivu 083c863fb7 Summary, Since your last visit, At risk, Suggested members and Forecast.
Five more of the features other kanban apps call AI, done with plain code
(docs/Features/General/Assistants/Assistants.md):

- Board menu -> Summary: what each person did in the last day or week -
  done, moved, added, commented - and what they have overdue, from the
  activities and History; Copy as text gives Markdown with card links.
- Board menu -> Since your last visit (N): what others changed since the
  visit before this one, by card. The visit is kept in profile.boardVisits,
  at most 500 boards.
- At risk: a weighted score of overdue, due soon with little done, blocked,
  idle in a middle list and sent back; a triangle on the minicard and the
  reasons in the opened card.
- Suggested members in the Members and Assignees popups, from who handles
  the same labels, list and swimlane.
- Forecast done date: the 50th and 85th percentile of the board's cycle
  times, counting only the cards that took at least as long as this one
  has been open. The server sends the times once per board, numbers only.

Summary and Since your last visit are features of Admin Panel / Settings /
Visibility / Features; At risk, Suggested members and Forecast are rows of
Board Settings / Card and of the Admin Panel's Card fields. Every server
answer applies the board's read rules and the assigned-only role.
Translated in every language.

The guards of the earlier helpers are brought up to date as well: the date
words of models/lib/titleDueDate.js are a reviewed RegExp site,
server/methods/ruleSuggestions.js is a board-admin-only path, the Rules
page's list branch carries the suggestions, and Tigre's new strings use its
own word for a board.

Thanks to xet7 !
2026-10-17 15:52:26 +03:00
Lauri Ojansivu f8267d704e Due date from the card title, and similar cards and possible duplicates.
Two of the features other kanban apps call AI, done with plain code
(docs/Features/General/Assistants/Assistants.md):

- A due date typed at the end of a new card's title ("... tomorrow 14:00",
  "huomenna klo 14", "friday 9:30", "in 3 days", "23.10.") becomes the card's
  due date, read with the browser's own Intl tables so every language works.
  A hint under the field shows the date, and its x keeps the words. The
  opened card's title reads it too, but only when the title changed.
- Similar cards: letter triples and the Dice coefficient (letter pairs for
  scripts without spaces). The add-card form lists up to three close cards,
  marking a possible duplicate, and the opened card has a Similar cards
  section. The server method applies the board's read rules and the
  assigned-only role.

Both are rows of Board Settings / Card and of Admin Panel / Settings /
Visibility / Features / Card fields, so a board admin or a site admin can
hide them. Translated in every language.

Thanks to xet7 !
2026-10-17 14:39:43 +03:00
Lauri Ojansivu b7589737f5 File docs/Features the way the WeKan menus are.
A feature's guide now sits under the menu it is used from, read from the
templates rather than from where somebody once put it: Header-Bar,
All-Boards, Pages, Board-Header (search and every Board View), Board-Sidebar
(Board Settings, Filter, Members, Labels, Archive), Rules, Swimlanes, Lists,
Cards, Member-Settings, Admin-Panel and Login-Page. Topics used from several
menus (editor, history, theme, translations, email, troubleshooting) are in
General.

- Each area has a README mapping its menu entries to their guides and to the
  template or server module that implements them. Board-Header/README.md
  lists all 40 Board View entries with the template boardBody.jade renders;
  five views (Table, Calendar Mode, Time, Timeline, Map) have no guide of
  their own yet and say so.
- Board-View.md listed 25 views while BOARD_VIEWS has 40; it now lists all
  of them with their English labels.
- Pages keep their file names. Where a released changelog links an old path,
  a "# Moved" page stays there and points to the new one; test-menu.sh skips
  folders holding only those.
- Undo was filed under Login; it is General/Undo now.
- Every link in docs, code comments, scripts and tests follows the move;
  docsLinksResolve checks them all.

Tests that read a doc follow it to its new place. boardViewSettings now fails
when Board-View.md or Board-Header/README.md differs from BOARD_VIEWS, or
names a template boardBody.jade does not render.

Thanks to xet7 !
2026-10-16 23:45:35 +03:00
Lauri Ojansivu 51238ed8ad Import: attachment files of Jira, Nextcloud Deck, OpenProject, Asana and GitLab.
Their exports name attachments without carrying the files, so the files
were reported as a loss. Each service documents where a file is
downloaded, behind the same sign-in as its API:

- Jira: fields.attachment[].content (/rest/api/3/attachment/content/<id>),
  Basic email:API token; Jira's redirect to its media store is followed
  without the sign-in.
- Deck: /index.php/apps/deck/api/v1.0|v1.1/boards/../stacks/../cards/..
  /attachments/<id>, Basic user:app password, OCS-APIRequest: true.
- OpenProject: _links.downloadLocation, relative to the instance, Basic
  apikey:<key>.
- Asana: GET /attachments/<gid>?opt_fields=download_url with a personal
  access token, then the signed download_url without it; a file the
  export embeds (export_boards.pl) is taken as it is; one kept on Google
  Drive and the like is a link, reported.
- GitLab: a private project's /uploads/ link through
  /api/v4/projects/<id>/uploads/<secret>/<file> (17.4+), Bearer token.

The import page asks for the address, user and token under "Attachment
files" for these five (the REST import takes the same as attachmentAuth).
They go with that one import: held beside the creator in a WeakMap, never
stored or logged, the token field emptied on Import, and sent ONLY to
the origin the member typed - an export names any URL it likes. Every
download is the import's SSRF-guarded fetch, which validates each hop
and drops Authorization on a cross-origin redirect. A file that cannot
be fetched is on the loss report with its reason. Unticking Attachments
leaves them out (Jira's per-issue field is pruned too).

Zenkit is left out: it publishes no way to download a file.

Tests: importAttachmentAuth.test.cjs (each service's request, the
sign-in only to its origin, malformed sign-ins, never stored or
logged), the parser tests pin the attachment lists, a Meteor test
imports an embedded Asana file onto its card and shows a Jira file is
reported without a sign-in and that the sign-in never reaches an address
the guard refuses, and import-attachment-auth.e2e.js the page (not run
here). Not run against the live services.

Thanks to xet7 !
2026-10-15 01:27:26 +03:00
Lauri Ojansivu ed2649f702 A board admin may add only the organizations and teams they belong to.
setBoardOrgs and setBoardTeams refused nothing but non-admins: a board
admin could link any organization or team of the instance to a board,
and with it give every one of its members the board. Now an organization
or team that is new to the board must be one the board admin belongs to;
a site administrator may add any. Links already on the board stay -
somebody else may have added them - and removing or switching one off is
always allowed. The pickers offer only the admin's own groups, and the
org and team publications, which gave non-admins nothing (so the pickers
were empty for them), now give a signed-in user their own groups' names.

models/lib/boardGroupLinks.js decides; tests/boardGroupLinks.test.cjs
covers own groups, existing links, removals, site admins, a foreign group
refused and not offered, and that both methods check before writing.

Thanks to chrisi51 and xet7 !

Fixes #5141.
2026-10-14 15:04:41 +03:00
Lauri Ojansivu 1acc9f2b9f Leaving a board that came through a team hides it, restorably.
A board a member reaches through one of their teams or organizations, or
their e-mail domain, could not be left: without a member entry quitBoard
refused it, and with one the board stayed in All Boards through the team.
Now leaving such a board puts it in the member's own hidden list
(profile.hiddenBoards): All Boards leaves it out, in the paged sorted
views and the drag-ordered one, and Member Settings / Hidden boards
brings it back with Restore. The team or organization membership is not
touched, and access stays the board's own. An All Boards tile of a board
the member is not on gets an eye-slash "leave" button; a member who also
has the board through a team is both removed and hidden. A board reached
only by membership leaves as before.

models/lib/boardInvites.js decides (planQuitBoard's hide,
reachesBoardOtherwise, hiddenBoardsAfter); tests/hiddenBoards.test.cjs
covers team, organization and domain reach, an inactive link, the bound,
that the team is not touched and the All Boards filters.
tests/boardInvites.test.cjs expects the plan's hide: false where nothing
else reaches the board. The new strings are English placeholders until
the next translation pass.

Thanks to LaureHades and xet7 !

Fixes #4265.
2026-10-14 15:01:14 +03:00
Lauri Ojansivu 50bb989eb8 Custom board roles, and team memberships that leave with the team.
#3022 (decided 2026-10-14): a site admin builds named roles in Admin
Panel / People / Roles from the capability matrix - sees all cards,
comments, edits, moves cards, invites - and a board admin gives one to a
member in the same popup as the built-in roles. Board admin stays
built-in. Every permission check asks boardRoleCapabilities, which
answers a custom role from the role; the member's built-in flags carry
the strongest built-in role that grants nothing more (fallbackRoleFor,
checked for every combination), so code reading a flag never grants
more, and a deleted role leaves exactly that. Where a role is asked by
name (hasWorker, isCommentOnly, ...) a custom role reads as the built-in
role that does what it does; commenting is asked as a capability
everywhere. Invites, REST whole-board reads, imports (a foreign custom
role is dropped) and member mapping (all eight flags now, not four)
follow it. The six new strings are translated in all 234 locales.

#4178 (decided 2026-10-14): a team or organization that gives board
memberships takes them away again when the user leaves it - only those:
each records where it came from (grantedBy), a direct membership is
never touched, a board admin is kept, and a board admin's own add or
removal is final. Teams through user edits, LDAP, OIDC and the board
sidebar; organizations where they propagate members.

Also: the Roles Status table gets a Move cards column; the comment form,
reactions and chat ask the comment capability (a No comments member was
offered reactions the server refused).

Tests: customBoardRoles and groupBoardMembership node suites, and the
runtime suites (9 passing) against a real database.

Thanks to xet7 and mfnalex !

Fixes #3022,
Fixes #4178.
2026-10-14 08:20:49 +03:00
Lauri Ojansivu 86652c8718 Ask for the columns of a CSV or Excel import, apply Owner, and import WeKan's own Excel export.
A CSV, TSV or Excel import now shows which column is which card field
before importing, pre-filled from the header names - English names and
WeKan's own export column names in every language - and asks for what is
missing: a file with no list column gets one list, named on the page,
instead of one list per row. Unused columns can be kept as text custom
fields. The choice goes to the server as csvMapping, checked before
anything is written, and the REST import and api.py take one too.

The Owner column is applied, as are swimlane, received date, parent card,
spent time, overtime and archived. A TSV value containing a comma stays one
value. A dropdown custom field value that is not one of its items is skipped
instead of failing the import.

An Excel workbook is read sheet by sheet, its header found in row 1 or where
WeKan's export puts it, in any language; formula cells are read as their
results and rich text as text. WeKan's own Excel export imports, and a
workbook with many boards - each on its own sheet, as Export all boards
writes it - imports as many boards; the Activity sheet is skipped.

Thanks to xet7 !
2026-10-09 12:52:21 +03:00
Lauri Ojansivu 73db241bd4 Choose who an import's people become, for every import, and stream imported attachments.
Every import page now asks once what the people named in the file become
(models/lib/importMembersMode.js): existing users chosen in the map-members
step, placeholder users that keep the original username and name and cannot
log in, to be mapped to real users later, or all the person importing. All
five creators read the same mapping. The generalized importer, which used to
drop people nobody mapped, now makes placeholders for them, as Trello and
WeKan imports do, and offers its people for mapping by reading the file with
the same parser (importBoard with previewPeople, which creates nothing).
Import many boards offers placeholders or the importer. The REST import, the
WeKan .zip route and the Trello route take the mode too.

A WeKan .zip imported as a new board no longer puts its attachment files
inline in memory within a 512 MB budget: the full-board importer streams each
from the archive into storage, as the import into an existing board does.
Both, and the Trello importer when given a stream, go through one helper
(server/lib/importAttachmentStream.js) that holds every imported attachment
to the Admin Panel's upload limit and to none when none is set, skipping a
file whose stated size is over it and stopping one that grows past it.

The import page instructions name Jira's current search (GET
/rest/api/3/search/jql with fields=*all, paged by nextPageToken), Todoist's
Manage data > Export as CSV and Planner's Export as Excel.

Thanks to xet7 !
2026-10-09 12:20:36 +03:00
Lauri Ojansivu 7858d84e12 Import and export many boards at once for every format, and document each format in its own directory.
Import many boards: on the import page of every source, several export
files, or one .zip holding them, each become their own board through the
same path a single import of that file takes, and the page lists what each
file became (models/lib/importManyFiles.js). A .zip that is itself one
export (Vikunja, Notion, Plane, WeKan with attachments) stays one board.
One board per project: for the generalized importer, each swimlane the
import would make - a project, folder or list of the tool - becomes its own
board (models/lib/importSplit.js), so an export of a whole app imports as
many boards, as a Trello .zip does. Kanri's all-data export now reads every
board, not only the first, so it splits into one board per Kanri board.

Export all boards: All Boards sidebar, or Multi-Selection for the selected
boards, downloads every board the user may export in one format, each
checked as its own export is. Excel is one workbook with a sheet per board,
named after the board; every other format is a .zip with one file per board
(server/routes/exportAllBoards.js). The per-format bytes are made in one
place, server/lib/renderExternalExport.js, for the board route and this.

A WeKan .zip export imports as a new board from All Boards, unpacked on the
server with its attachments (it was refused in the browser). api.py gains
importboardsfrom and exportallboards, sends every source in the shape the
import page sends, and fetches Excel, PDF, CSV and TSV exports from their
own routes and writes them as bytes.

Fixed while documenting: a Trello Butler rule's list name kept its case,
so the rule fires; the HTML export fetches the board JSON by URL instead of
a link the export popup no longer has; Tasks.org exports time spent;
Nextcloud Deck's done flag marks the due date done.

docs/Features/ImportExport has a directory per format with the steps to
import and export it, one board and many, and its details, moved from
Format-Coverage.md, which is now the index and the shared contract.
tests/importExportDocsCoverage.test.cjs fails when a format has no page.

Thanks to xet7 !
2026-10-09 10:33:37 +03:00
Lauri Ojansivu cb703fd326 Confirm GET /api/boards/:boardId/domains is site-admin only; GHSA-r3c4-5xwp-vf54 does not apply.
The advisory reports that the route checks only the login, because it calls
Authentication.checkUserId, and that any account can read any board's domain
sharing. checkUserId is the site admin check: a logged-in caller who is not an
admin gets 403. The route has answered only site admins since #5850 added it.
Before v12.15 the check refused `admin === undefined`, and Meteor's
findOneAsync gives undefined for no match, so it refused everyone else then too.

Nothing to fix in the route. Its OpenAPI description claimed anyone able to read
the board may list the domains; it now says site admin, and that members get the
list with GET /api/boards/:boardId. checkUserId gets a comment saying what it is.

tests/restBoardDomainsAccess.test.cjs runs the real handler with the real
Authentication object: the reporter's non-member, members, ended memberships and
logged-out callers are refused, a missing board answers like an existing one, a
site admin reads the list. A whole-tree negative test checks that every REST
route with :boardId checks that board or a site admin, and that a login check
alone would be caught. tests/playwright/specs/rest-board-domains-access.e2e.js
runs the report's proof of concept against a running WeKan in Chromium, WebKit
and Firefox: 403.

Thanks to a25370 and xet7 !
2026-10-06 18:27:20 +03:00
Lauri Ojansivu 8d30e4fdbc Give Board Settings / Card rows to what the card and minicard drew without one.
The card color, the parent card path and prefix, the linked card
indicator, the rule card buttons, the description badge and the unread
comments marker were drawn with no Board Settings / Card row, so a board
could not turn them off. Each has a row now, with a card and a minicard
side. Where something was drawn before it stays on; the description
badge on the card, the card buttons on the minicard and the unread
marker on the card are new and off until chosen. The minicard's card
buttons read the board's rules from one board-level subscription, taken
only while that side is on, and run a rule without opening the card.

Not given rows, by decision: the archived banner and the upload progress
are status, not options; week-of-year is the user's own Member Settings
preference; card aging has its own board setting. The new labels are in
English, pending Transifex.

Thanks to xet7 !
2026-10-02 16:45:01 +03:00
Lauri Ojansivu 79b4467546 Let every Board Settings / Card row be shown on the card and the minicard.
Eighteen rows of Board Settings / Card had only one column. Each now has
both. On the minicard: Location, Requested by, Assigned by, Flowtime and
Pomodoro while running, the attachment names, the text-note count, when
the card last changed, the description title, and the checklist title
and due date. On the opened card: the collapse caret's own switch, labels
above the title, labels text (with the user's own override, like the
minicard's), the card's List title, the swimlane name and the comment
count. A side that already drew something stays on; a new element is
off until chosen. The new minicard elements are last in the minicard
order by default and reorder like the rest.

The rows' switches are plain board flags handled by one generic toggle
that reads each row's declared default. The List title row is offered
only when the popup was opened for a card, since from Board Settings
there is no card for it to change.

Thanks to xet7 !
2026-10-02 16:39:28 +03:00
Lauri Ojansivu 6d950b7474 Show each Scrum field as its own Board Settings / Card row.
The Scrum fields were a separate "Scrum settings" checkbox list under
each column of Board Settings / Card, and drawn as one block on the card
and the minicard. Each is now a row of both columns - "Scrum settings:
Sprint", "Scrum settings: Release" and so on - ordered with the other
rows, and drawn on the card and the minicard where the board's order puts
it; by default where the block was. The minicard gained Past sprints and
Acceptance criteria. The minicard's work item type row is the switch of
the work item type badge, which stays on unless turned off. The column
actions set the Scrum rows too, through scrum.configure so its lock,
revision and Scrum history apply.

Thanks to xet7 !
2026-10-02 16:08:20 +03:00
Lauri Ojansivu d53f58bf52 Add browser tests for TrayBleed, HookUrlBleed, DirectoryInfoBleed, AuthMethodBleed, MigrationBleed and the assigned-only attachment reads.
GET /api/boards/:boardId/attachments had no error handling, so its refusal of
an assigned-only member fell through to the app page; it answers with the
refusal's status now.

Thanks to xet7 !
2026-10-02 12:01:19 +03:00
Lauri Ojansivu d3a94fd2d9 Close StaleBleed and ManageBoardBleed siblings: removed members no longer reach board ids or copies.
GET /api/user and the attachmentMigrationStatuses publication found the
caller's boards with a dotted 'members.userId', which also matches boards the
caller was removed from, so a removed member kept seeing those board ids (and
the publication looked for public boards by a field that does not exist). Both
match active memberships now, and boards readable without membership by the
shared rule. POST /api/boards/:boardId/copy hand-wrote its admin check without
isActive, so a removed former admin could still copy the board; it uses
Authentication.checkBoardAdmin. Negative tests fail on any REST handler or
publication that finds the caller's boards by a dotted members.userId, or that
hand-writes the admin check.

Thanks to xet7 !
2026-10-02 11:19:19 +03:00
Lauri Ojansivu f122a8287c Add semi-open boards, visible to every signed-in user.
A board's visibility can now be "Signed-in users" (permission 'instance'):
every signed-in user of this WeKan reads it, nobody signed out does, and
only its members edit it, as on a public board. One pure rule,
models/lib/boardPermission.js, feeds isVisibleBy and the shared selector
builder, so the board and card publications, All Boards, search, exports,
attachments, backgrounds, watching, filter presets and rule destinations
follow it. Anonymous paths - link previews, public avatars, the no-token
export branch and archived lists - stay public-only, and a source suite
lists every remaining public-only check so a new one is reviewed. The
Public page and GET /api/boards list instance boards for a signed-in caller
only; "private boards only" refuses them like public ones; a WeKan export
keeps the setting on import. New strings are English, pending Transifex.

Fixes #3249,

Thanks to relikd and xet7 !
2026-09-29 16:28:44 +03:00
Lauri Ojansivu 94931c7ab6 Refuse board-copy properties that could replace the source board's identity.
copyBoard assigned every caller-supplied property onto the source board
object, including _id. board.copy() loads the source lists, cards and
children by this._id, so an admin of any board could pass a private
board's _id and receive a full copy of a board they cannot see - the
board-level form of CopyIdentityBleed. Only title, sort, type,
withoutCards and copyOptions are accepted now, each type-checked, and they
are applied to a separate object, so the cached source board is never
changed. Any other field is refused before anything is read and recorded
as CopyIdentityBleed in Admin Panel -> Problems; a wrong type on a
supported field is an ordinary input error without an attack record. The
REST copy route takes only a string title, on a separate object.

A unit test covers the contract, and a source scan fails if caller input is
assigned onto the source board or the source board object is copied again.
The browser spec reproduces the disclosure and checks the refusal, the
Problems record, that malformed input blocks nobody, and that supported
copies still work.

Thanks to xet7 !
2026-09-29 15:12:12 +03:00
Lauri Ojansivu 6d99ad73c4 Preserve time history and record reversible move reasons
Keep card and checklist activity after deletion, retain card snapshots for
flow reports, and show recorded hour adjustments by their actual author in
Time and its PDF/Excel exports. Record whole positions centrally, including
optional move reasons and direct REST edits. Append undo/redo checkpoints
so blocker intervals and time corrections follow reversals through time.

Audit the open time-related requests against existing features. Exact inline
activity timestamps requested in #1673 already exist in dateDisplay and the
activities template; add a browser regression for that existing behavior.

Reuse established locale terminology for the new compact labels. Labels
outside English and Finnish are low-confidence glossary combinations for
human review; existing translations remain untouched.

Validation: 43 focused Node suites pass. Fifteen Chromium scenarios pass
across flow analytics, time history and existing REST move coverage, including
real chart and Time PDF/Excel exports, undo/redo, retention and access denial.

Thanks to ladistrupl, zombah and xet7 !

Fixes #1598,
Fixes #1673,
2026-09-26 23:00:58 +03:00
Lauri Ojansivu 7950979cb2 Add per-board draggable settings for board objects
Default swimlanes, lists, cards, checklists, checklist items and subtasks to draggable. Share settings UI and policy, update ordinary sortables reactively and enforce the policy for mixed-selection drags while retaining explicit menu moves. Cover persistence, authorization, independent defaults and both checklist handle modes.

Thanks to xet7 !
2026-09-25 23:51:28 +03:00
Lauri Ojansivu e1b13e6881 Use server invitation methods from the board sidebar.
Fix the legitimate invitation flow and unnecessary anonymous metadata subscription reported in #6692 comment 5811473169. Keep protected profile writes forbidden. Existing account blocks require administrator review; the separate history checksum report still needs the affected stored rows.

Thanks to Nissulya and xet7 !
2026-09-24 14:02:30 +03:00
Lauri Ojansivu 94b59bef01 Move date format controls to global, board and member settings
Apply enabled member overrides before board and global defaults. Show inherited
status and saved formats using existing translations, and keep the card section
named Date. Cover rendering, exports, permissions, date-only formats and settings
isolation.

Thanks to xet7.
2026-09-23 13:58:24 +03:00
Lauri Ojansivu 16b1b307fc Add cleaner task board presentation and date-only formats.
Add board controls for minicard collapse, labels above the title, checklist due dates and the outer checklist heading. Keep previously collapsed content accessible when its control is hidden, and preserve stored content and existing defaults.

Add personal and admin date-only formats across calendars and exports. Extend the existing smaller font presets with compact checklist and settings spacing. Cover persistence, permissions, layout and date behavior with unit and browser tests.

Thanks to xet7 !
2026-09-19 15:56:01 +03:00
Lauri Ojansivu 749467c802 Enforce private-only policy for trusted board insertions
Apply the instance visibility policy at the shared before-insert hook so copies, imports and lazy helpers cannot create public boards. Keep policy enforcement independent of security logger availability.

Thanks to xet7 !
2026-09-14 12:49:30 +03:00
Lauri Ojansivu c33e9c3bf9 Require administrator privileges for REST board management
Align board title, card settings and all rule mutations with existing DDP administrator policy. Preserve site-admin access and record refused management attempts in bounded Problems summaries.

Actual guard and endpoint inventory tests pass along with card-settings and rule suites. Browser regression syntax-check passes; live execution pending.

Thanks to Wenhao Wu, Southeast University and xet7 !
2026-09-14 11:51:24 +03:00
Lauri Ojansivu 962debc12d Enforce private-only board visibility across server creation methods
Apply instance visibility policy to direct board creation and card-to-board conversion. Record blocked public overrides with bounded Problems summaries, preserving enforcement if logging fails. Positive policy and negative insert-inventory suites pass; browser regression is syntax-checked but live execution remains pending.

Thanks to Wenhao Wu, Southeast University and xet7 !
2026-09-14 11:43:10 +03:00
Lauri Ojansivu c64d3454ac Add REST API for Board Settings / Board View, and OpenAPI blocks for the card settings routes.
GET /api/boards/:boardId/boardViewSettings answers which entries of the
Board View menu a board offers, which one it opens in, separately for a
public and a private board, and the menu order - in the normalised shape the
menu renders with: every view once with both showOnPublic and showOnPrivate
explicit, the two defaults resolved (missing or unknown reads as Swimlanes),
boardViewOrder made whole, and `keys` listing the known views. Board access.

PUT /api/boards/:boardId/boardViewSettings takes any subset of
boardViewSettings, defaultPublicBoardView, defaultPrivateBoardView and
boardViewOrder, through the same pure modifiers the popup's clicks apply
(showBoardViewModifier, defaultBoardViewModifier, normalizeBoardViewOrder),
now composed by boardViewSettingsRequest() in models/lib/boardViewSettings.js:
a default is always shown on its side, hiding a side's current default is a
400 (set another default first - or in the same request, since defaults are
applied before the show flags), an unknown view key anywhere in the body is a
400 and nothing of that request is written, and the order is normalised so the
menu lists every view exactly once. Board admin (or site admin), the same
check as cardFieldOrder. Both answer boardViewSettingsSnapshot().

The existing GET/PUT /api/boards/:boardId/cardSettings routes get the JSDoc
@operation blocks the OpenAPI generator reads (get_board_card_settings,
update_board_card_settings), so the hand-written copy in
openapi/extra_paths.yml - which now duplicated the operationId - is removed.
public/api/wekan.yml and wekan.html are regenerated with the release
workflow's own commands: 158 operations. docs/API/REST-API.md documents both
endpoints with curl examples, and docs/Features/Board/Board-View-Settings.md
links to them.

tests/restApiNewFeatureRoutes.test.cjs pins the four routes to their method,
path, @operation and auth check, that the PUT writes only the helper's $set,
the snapshot's shape, the request helper's positive cases (setting a default
shows it, one request may move the default and hide the old one, the order is
normalised, the input board is not mutated) and negatives (unknown view key in
the order, the settings or a default; hiding a side's default; malformed
bodies; a partly-invalid body applies nothing), and that the generated and the
committed spec carry the four operations exactly once with the old
edit_board_card_settings gone.

Thanks to xet7 !
2026-09-11 21:18:35 +03:00
Lauri Ojansivu bbcd98d9d8 Add REST API for attachment soft delete and restore, Admin Panel Problems, OAuth login provider and passwordless settings, card field order and pausing a rule.
Every feature of the recent releases that had a UI but no endpoint, on the
same server-side code the UI uses:

- DELETE /api/boards/:boardId/attachments/:attachmentId soft-deletes,
  POST .../attachments/:attachmentId/restore restores, and
  GET /api/boards/:boardId/attachments/deleted lists what is restorable -
  all through the attachments.softDelete / attachments.restore methods the
  card and the card history use, run as the request's user. No hard delete.
- GET /api/admin/problems (the Problems status overview plus the new-problem
  count per stream), GET /api/admin/problems/:stream (one page, with
  limit/skip/search) and POST /api/admin/problems/:stream/acknowledge,
  through the admin-only eventLog* methods the Admin Panel pages call.
- GET /api/admin/oauth-providers, PUT /api/admin/oauth-providers/:providerKey
  and PUT /api/admin/passwordless, through saveOauthProviderSettings,
  savePasswordlessSettings and getOauthProviderConfigSources. A provider's
  secret is reported only as { source, hasValue }, never its value.
- GET/PUT /api/boards/:boardId/cardFieldOrder, normalised with the same
  applyCardFieldOrder() the card renders with.
- PUT /api/boards/:boardId/rules/:ruleId accepts `enabled` to pause and
  resume a rule, and GET reports it.

The OpenAPI generator is fixed on the way: server/models/boards.js has had a
bare `catch {` since v11.67, the esprima parser cannot read that, and a parse
failure was silently skipped - so public/api/wekan.yml has shipped WITHOUT
the whole Boards API since then. It now downlevels `catch {` and
`for await (`, warns when a file cannot be parsed, and no longer emits an
empty sub-schema for a primitive array-element marker such as
`wipLimitGroups.$.listIds.$`, which made the spec unparseable YAML.
public/api/wekan.yml and wekan.html are regenerated with the release
workflow's own commands: 156 operations, up from 122.

tests/restApiNewFeatureRoutes.test.cjs pins every new route to its method,
path, @operation block and authentication check, that the OAuth endpoints
never mention a secret outside the input whitelist, the generator's two
fixes, that the generated and the committed spec carry the Boards API and the
new operations, and - as the negative sweep - that no route in models/ or
server/models/ lacks an authentication check.

Thanks to xet7 !
2026-09-11 21:18:35 +03:00
Lauri Ojansivu 9702130100 Board Settings / Card: a toggle for every card section and minicard badge, in card order.
Flowtime, Pomodoro, Stickers and Location shipped without an allows* board
toggle, so they rendered on every card and Card Settings had no way to hide
them. Dependencies, Vote, Planning Poker, Text Notes and the activity history
on the opened card had the same gap, as did the dependencies, stickers,
comment-count, vote and poker badges on the minicard.

Each now has a Boards field (default true, so an existing board keeps showing
what it showed), a setter, a REST card-setting key, a healed true-default in
the schema upgrade, a row in Board Settings / Card with its click handler,
and a gate in cardDetails.jade / minicard.jade. allowsActivities already
existed but gated nothing and its row was commented out; it is wired now.

The rows of the popup are in the order the fields appear on the opened card
(Mark complete, number, cover; then the reorderable sections through the
same orderedCardFieldSections source the card renders from, so a board's own
order applies to both; then checklists ... comments, activities), with the
minicard-only rows beside the card row they belong with. No new i18n keys:
every row reuses the field's existing name.

tests/cardSettingsCoverage.test.cjs derives the card's order from the
template and pins the popup to it, checks every gate has a row and every new
row is read, and that none of the four sections is unconditional.

Thanks to rmb82 and xet7 !

Fixes #6688.
2026-09-11 21:17:34 +03:00
Lauri Ojansivu dce2898382 Attachments: soft delete on the card, restore from the card history, hard delete only with the archived board.
Delete on an attachment used to remove the document and its file at once.
It is now the 'attachments.softDelete' method (History.md section 12): the
document gets deletedAt/deletedBy/deleteBatchId with the same helpers lists
use, the file is kept, and the card's cover is unset if this was it. Every
card-facing read - the opened card's gallery and "Attachments (N)" count,
the minicard paperclip badge, the slideshow, the cover, the board-background
picker, My Attachments, the API list endpoints and the exporters - filters
to live attachments with liveAttachments(); the publications keep sending
the deleted ones so the card history can reach them.

The card history records who deleted it and when, with the filename in the
row. Restore - the table's selection + Restore, or the row's own Restore
button, both through changeHistory.restore and applyAttachmentContent -
clears the mark, so the card, its count and the minicard badge include the
attachment again; the cover is never re-set. An attachment row previews
with the existing attachmentViewer slideshow and downloads with the same
link the gallery draws, and never offers cover or background. Uploads and
renames are recorded through the existing history hooks.

There is no per-attachment hard delete any more: api.attachment.delete,
DELETE /api/attachment/delete/:id and removeBoardBackground soft-delete,
permanentlyDeleteAttachmentFromFilesReport and the Files report's delete
button are gone, Attachments.allow remove and onBeforeRemove refuse every
client remove and log the attempt under Admin Panel / Problems. The one
hard delete is Admin Panel / Problems / Delete enabled, board archived,
board deleted from the archive: boardRemover now removes every attachment
of the board, live and soft-deleted, with its file.

One new i18n key, attachment-soft-delete-pop, replaces the "permanent, no
undo" confirmation text; it is inserted in English into every locale at
the same position for translation.

Thanks to xet7 !
2026-09-11 21:17:33 +03:00
Lauri Ojansivu de4a95474e Show the current swimlane's name at the bottom of a minicard in List view.
Adds a board-wide Boards.allowsSwimlaneNameOnMinicard toggle (default
false), a Card Settings row for it (already landed in
client/components/sidebar/sidebar.jade/.js and models/boards.js via a
concurrent commit), and the minicard label itself: gated on the board
flag, resolving the swimlane reactively via
ReactiveCache.getSwimlane(card.swimlaneId), styled like the existing
list-name label. tests/minicardSwimlaneNameOnMinicard.test.cjs pins the
default, the Card Settings row, and that the minicard only renders the
label when enabled.

Thanks to JB_Pollard and xet7 !

Closes #2426,
2026-09-10 20:48:30 +03:00
Lauri Ojansivu 3158b87c57 Let a board admin choose whether "Time spent" shows on the card/minicard.
The card detail view and minicard already rendered a card's accumulated
spent-time badge (and its overtime indicator) unconditionally once time was
logged, but there was no way to turn it off, and reaching it in the first
place meant the card's hamburger/context menu. Add allowsSpentTime /
allowsSpentTimeOnMinicard board fields (both default true, so no existing
board's display changes) and a matching Card Settings row - the same
"Show on card"/"Show on minicard" pattern already used by
allowsReceivedDate/allowsReceivedDateOnMinicard - so an admin can hide it
per board.

Thanks to matrixes and xet7 !

Closes #2530,
2026-09-10 20:41:04 +03:00
Lauri Ojansivu 5fbbbeca92 Let a user mark a board template as default, applied when creating a board.
#4205: a board template could be applied manually (the "Template" link on
the Create Board form opens a picker of the user's Board Templates and
copies the chosen one), but there was no way to make one the default, so
every new board meant reopening that picker each time.

Add a star toggle to each row of that picker (Template.searchElementPopup,
isBoardTemplateSearch) that marks/unmarks one "Board Templates" card as the
user's default (profile.defaultBoardTemplateId/-BoardId, both optional and
unset by default). Toggling goes through a new toggleDefaultBoardTemplate
method that only accepts a live, unarchived linked-board card from the
caller's own templates board.

The plain "type a name and click Create" board-creation flow now checks for
a default and, when set, applies it by calling the SAME copyBoard method the
manual picker already uses - not a second copy of the board-copying logic -
before falling back to the unchanged blank-board path. A user who never sets
a default sees no change at all. Deleting the underlying template board
clears it as anyone's default so creation cannot fail against a dead id.

Thanks to Jieiku and xet7 !

Closes #4205,
2026-09-10 20:08:01 +03:00
Lauri Ojansivu fa71c8ba4d Add the shared label-text resolution helper and its unit test (#4256).
Completes the per-board default / per-user override for minicard label
text: models/lib/labelTextVisibility.js is the pure resolution function
(user override > board setting > historical default) that
client/lib/minicardLabelText.js now calls instead of duplicating the same
three-way decision, and tests/labelTextVisibility.test.cjs pins all three
cases plus the migration-safety case (an existing board/user with nothing
stored still shows label text). server/models/boards.js's REST
cardSettings whitelist also gets showLabelText, matching every other
board-level card setting there.
2026-09-10 20:00:19 +03:00
Lauri Ojansivu 52972b3e4c Add Admin Panel setting to restrict board creation to admins only.
Admin Panel -> Settings -> Visibility gets a new checkbox beside "Public
boards": "Only admins can create boards"
(tableVisibilityMode-boardCreationAdminOnly, off by default). It follows
the exact TableVisibilityModeSettings pattern its sibling
tableVisibilityMode-allowPrivateOnly already uses: a collection doc seeded
in server/models/collectionBootstrap.js, a jade checkbox and reactive
helper in settingBody.jade/js, and a write in the section's own Save
handler.

The real enforcement is server-side: createBoardWithInitialSwimlanes
(server/models/boards.js) now rejects the call with a not-authorized error
when the setting is on and the caller is not isAdmin === true, before the
board is ever inserted. The client mirrors this only as a convenience - a
new client/lib/boardCreationAllowed.js helper hides the top-bar "+" (header
header.js/.jade) and the All Boards "Add board" tile (boardsList.js) for a
restricted non-admin, but nothing depends on that for security.

A full per-user allow/deny override was left out of this pass: it would
need is own schema field, a People/Admin Panel UI to flip it per account,
and server enforcement layered under the global toggle, which is a larger
change than this issue's "let an admin forbid board creation instance-wide"
core request. The global toggle covers that request cleanly on its own.

Added imports/i18n/data/en.i18n.json's board-creation-admin-only string and
a direct translation (no external translation API) in all other locale
files, in en.i18n.json's key order. tests/boardCreationAdminOnly.test.cjs
pins the default-off setting, the checkbox/handler wiring, the server-side
admin check (and that it runs before the insert), the shared client helper,
the i18n key placement, and - as a negative test - that no OTHER
Boards.insertAsync call site was silently added outside the two already
known and deliberately ungated ones (the per-user Templates container and
createBoardFromCard).

Thanks to belf88 and xet7 !

Closes #4475,
2026-09-10 19:45:52 +03:00
Lauri Ojansivu 828fc2d718 Revert Legacy HTML4 browser interface and parity changes
Remove the progressive HTML4/Legacy Omi middleware, cookieless sessions, page controllers, assets, parity refactors, design documents and associated tests. Restore the standard Meteor interface and operations from before the HTML4 work began.

Preserve intervening translations, backup screenshots, session upgrades, cryptographic test identifiers, local image storage, document previews and lazy browser loading. Extract the GIF utilities still required by image features into imageGif.

Validate the Node suites and add standard-interface and GIF regressions. Two existing failures remain in docsLinksResolve and ruleDetailsLocalization; browser regressions are registered but require a running server.

Thanks to xet7 !
2026-09-07 17:03:59 +03:00
Lauri Ojansivu ed99bb88e0 Add accessible HTML4 permanent board deletion 2026-09-06 23:34:49 +03:00
Lauri Ojansivu a026b12a14 Add accessible HTML4 board creation and copy 2026-09-06 23:14:39 +03:00
Lauri Ojansivu ee5300e38f Add accessible HTML4 All Boards actions 2026-09-06 22:57:19 +03:00
Lauri Ojansivu 71ad5447aa Secure and resume import export operations 2026-09-05 23:51:02 +03:00
Lauri Ojansivu b86a9914cc Revert "Bound empty board creation and publication scans"
This reverts commit 8229e170983c62754baee81103dd4b0bbf628378.
2026-08-29 06:01:39 +03:00
Lauri Ojansivu b7dc63571f Bound empty board creation and publication scans 2026-08-29 06:01:39 +03:00
Lauri Ojansivu 00026ff231 Reduce FerretDB board publication polling
Default FerretDB launchers to adaptive card loading, keep unrelated public boards out of All Boards, index the narrowed query shapes, and share linked-card discovery within one composite parent evaluation without TTL authorization caching.

Thanks to xet7 !
2026-08-25 15:04:22 +03:00