Commit Graph
134 Commits
Author SHA1 Message Date
Lauri Ojansivu 482c2c29f4 Attachments, avatars and backups in S3 can be encrypted at rest.
Admin Panel / Attachments / S3 / Server-side encryption: SSE-S3 (AES256)
or SSE-KMS (aws:kms, with a KMS key or the account's default). S3
encrypts each object as it is written and decrypts it for WeKan on read,
so reads, range requests and moves are unchanged. Every attachment and
avatar upload, every renamed object and every backup written to S3 now
carries the choice; a value that is not one of them, or a malformed key,
adds nothing.

On the filesystem, encryption at rest stays with the disk or volume
(LUKS, an encrypted cloud volume): exports, PDF, thumbnails, virus scans,
backups and WebDAV all read the stored files directly, and encrypting
them inside WeKan would change every one of those and convert every file
already stored.

The new interface strings are pending translation.

Thanks to xet7 !
2026-10-31 00:12:09 +02:00
Lauri Ojansivu 01968fc637 History on FerretDB: date paths are stored as strings, and the migration reports refused documents.
A History row of a date-valued custom field held datePaths as an array of
path arrays, [["3","value"]]. FerretDB v1 does not store an array inside an
array, so on FerretDB the change was not recorded, and migrateTextDatabase
to FerretDB dropped those rows while it swallowed the per-document error and
still reported success.

Each path is now a JSON string, '["3","value"]'. Rows already written in
the array form on MongoDB still restore, and the migration to FerretDB
rewrites them to strings. The migration counts every document the target
refuses and ends as failed with the count per collection and the first
error, instead of success: true.

Thanks to vijlautens and xet7 !

Fixes #6832.
2026-10-29 16:58:21 +02:00
Lauri Ojansivu d9cf523f9e Admin Panel / Problems: Data health, a nightly scan of broken references, with repairs.
The scan counts what points at nothing: cards on a missing or another board's
list or swimlane, ghost and duplicate board members, boards with no active
admin, custom field values and boards that no longer exist, checklist items
without a checklist, and subtasks or linked cards whose card is gone. It runs
nightly when the CPU is low, claimed so that only one pod scans or repairs.

A repair that only moves data reuses the upgrade steps; one that deletes asks
twice, and the server refuses it without that confirmation. Every repair edits
with $pull or a guarded update, so a concurrent edit is not overwritten, and a
member dedupe keeps the admin entry. Legacy scalar boardId and string boardIds
of custom fields are understood.

Translations done with low confidence: ay, csb, lld, kok, wa-RR, ve-CC, bi, tpi.

Thanks to Raymond-Voogt and xet7 !

Fixes #6818.
2026-10-27 17:08:15 +02:00
Lauri Ojansivu 7ed3ca7c5c A card opened from its link stays open when the connection drops and comes back while the page loads.
Behind a reverse proxy the DDP connection can drop and come back while a
card's link is still loading (a WebSocket upgrade the proxy refuses,
SockJS falling back). Every subscription re-runs on the way back, one
answers before the resumed login with nothing, and the card leaves
Minimongo for a moment. #3114's close-on-removal took that moment for a
deletion: it closed the card and went to the board's address.

The window now waits while the subscription, the connection or the login
is settling, and when the card looks gone with everything settled, asks
the server (cards.openCardAvailable, the 'card' publication's own rule,
now one function in server/lib/openCardAccess.js) and closes only on its
no, if Minimongo still agrees. A card really deleted, archived or moved
elsewhere still closes. Not reproduced here: no proxy in this
environment; the browser test drops and restores the connection.

Thanks to brlin-tw and xet7 !

Fixes #6808.
2026-10-27 10:05:01 +02:00
Lauri Ojansivu e413cd4720 The Sandstorm .spk leaves out every login method but Sandstorm's, and FerretDB's other database handlers.
A grain has one login (Sandstorm's), one database (FerretDB on SQLite) and one
mailbox (the grain's own address), but the .spk carried every login package
WeKan has and a FerretDB with the PostgreSQL, MySQL and SAP HANA handlers.

releases/sandstorm-slim-spk.sh, used by sandstorm.yml, release-all.yml's
build-sandstorm job and build.sh's "Make the .spk package", builds with the
package profile of releases/sandstorm-slim.mjs - accounts-password, 2FA,
passwordless, lockout, OAuth2/OIDC, CAS, LDAP, SAML and the seven social
logins removed from a copy of .meteor/packages for that one build, then
restored - trims the bundle for a linux/x64 grain, verifies none of those
packages got in and packs with spk pack (meteor-spk pack rebuilds and would
undo the trim). sandstorm-src/build-deps.sh builds FerretDB from source with
ferretdb_no_postgresql,ferretdb_no_mysql.

Under Sandstorm the Admin Panel hides the E-mail, Login, Locked users, SAML,
LDAP, OAuth2, CAS, Header login, OAuth providers and Passwordless panes,
Attachments / Database migration, the Email-to-card IMAP and webhook settings,
the New user button and the password fields; a hidden pane opened by URL lands
on the first visible one. POST /users/login and /users/register answer 404
sandstorm-sso-only, database migration is refused and the IMAP/webhook
settings are not stored. Without accounts-password the server creates
Accounts.emailTemplates with the package's defaults and marks useraccounts
initialised, which otherwise stopped the first grain.

Against wekan-12.63-sandstorm.spk, built from the same source: 181,307,364
instead of 185,271,476 bytes (-3.8 MiB, -2.1 %), unpacked 26.7 MiB smaller.
Docker, Snap and the bundles build from the full package list, and a test fails
if that list is slimmed. Tested on a local Sandstorm 0.308: a grain starts, a
board, a list and a card are created, and the removed options are not shown.
tests/sandstormSlim.test.cjs and tests/playwright/specs/sandstorm-slim.e2e.js
pin it. Design: docs/Platforms/FOSS/Container/Sandstorm/Smaller-wekan-spk.md.

Thanks to xet7 !
2026-10-23 19:34:34 +03:00
Lauri Ojansivu 06b7ce994a Backup status: every run recorded, failures and overdue backups shown, old local backups pruned - in Admin Panel too.
The result of an Admin Panel backup lived only in the memory of the server
process that ran it. After a restart, or on another pod of a multi-pod
deployment, the Backup pane said "idle", so nobody could see whether last
night's backup had worked. There was no history, no warning when a scheduled
backup failed or did not run, and local backups were never cleaned up.

- Every run, scheduled or "Backup now", is recorded in backupRuns: start and
  end, who or the schedule, scope, storage, status, size, duration and error.
  Records are kept 400 days. A run still "running" after 24 hours counts as
  failed, and a scheduled run skipped for another backup is recorded as failed.
- Admin Panel / Problems / Backup shows the last success (overdue when its
  period has passed), the last failure with its error, the next run and the
  last 30 runs. The same status is above the schedule in Attachments / Backup.
- Problems / Summary lists "Backup failed" and "Backup overdue". /metrics adds
  wekan_backup_last_success_timestamp_seconds,
  wekan_backup_last_run_timestamp_seconds, wekan_backup_last_run_success and
  wekan_backup_overdue for alerting.
- BACKUP_KEEP_DAYS: after a successful backup, local backups of the same scope
  older than N days are deleted. The newest is always kept, and only a
  directory inside the backup root holding a backup.zip is removed.

From the patch by Raymond-Voogt, and in Admin Panel as well:
- BACKUP_KEEP_DAYS is the catalog's backup section
  (models/lib/authConfigCatalog.js), overridable beside the schedule in
  Admin Panel / Attachments / Backup and resolved through authEnv at every
  backup.
- It is listed on every platform: the compose files, start-wekan.sh and .bat,
  the snap config and help, and the Dockerfile, which the patch's version
  had missed. Its platform hunks, written before #6789, were re-applied by
  hand.

tests/backupRuns.test.cjs (21): the run records, overdue and pruning against a
real directory, and the Admin Panel override, including that nothing reads the
variable around it. tests/authConfigCatalog.test.cjs checks every platform.
admin-attachment-retention.e2e.js checks the Backup pane shows the field.

Thanks to Raymond-Voogt and xet7 !

Fixes #6790.
2026-10-20 13:30:00 +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 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 2211b24119 Rule suggestions from what people on a board keep doing by hand.
Board menu -> Rules shows Suggested rules above the rule list: when the
same person does one thing to a card and, within two minutes, another, that
pair is counted once per card, and a pair seen on three cards in the last 30
days is offered as a rule (moved to a list -> label, member or archive;
added to a list -> label or member; label added -> member). A pair a rule
already does is not offered. Create goes through rules.createRule with the
same trigger and action the wizard builds; Dismiss hides one suggestion for
that admin on that board (profile.dismissedRuleSuggestions).

Only board admins get suggestions, and Admin Panel / Settings / Visibility /
Features has a Rule suggestions tick that turns them off, on the server too.
Translated in every language.

Thanks to xet7 !
2026-10-17 14:42:59 +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 b6a3d98736 Admin Panel / Problems: Memory Usage and Disk usage reports.
The RAM and Disk usage pages were designs that no code carried out. Both
monitors now run beside the CPU one and, like it, record only the start and
the end of a sustained high-usage period:

- Memory: RAM from /proc/meminfo's MemAvailable - os.freemem() is MemFree,
  which counts the page cache as used and shows a healthy server as full -
  and swap, which alone also starts a period. Without /proc/meminfo it uses
  what Node reports. Settings WEKAN_RAM_* and WEKAN_SWAP_HIGH_PERCENT.
- Disk: each filesystem WeKan writes to - the files root, its temp directory
  for uploads and the snap's data directory - measured once per device, with
  an episode of its own. WEKAN_DISK_WATCH_PATHS replaces the paths.
- Each report has a live line above its rows and a URL
  (/admin/problems/ram, /admin/problems/disk). The menu and titles use the
  existing memory-usage and sandstorm-disk-usage keys, which every language
  translates, and the Summary names the cpu, ram and disk streams.

Observe and report only, as designed. The three monitors share one event
recorder (server/lib/resourceLog.js) and one intEnv (models/lib/intEnv.js),
which three files had each defined. The pure halves are tested without
Meteor, and resourceMonitorsWiring checks the wiring and that no copy of
either shared piece returns.

Thanks to xet7 !
2026-10-17 01:14:16 +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 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 1dc5b82369 Sandstorm: Jira List Sync works from a grain.
It was recorded as impossible: Jira signs in only with an Authorization
header, and the bridge proxy takes that header for the grain's grant. But
Sandstorm's HTTP driver can keep the sign-in in the grant itself
(shell/imports/server/drivers/external-ui-view.js in the Sandstorm
source): the member connects the Powerbox to "any address" and enters the
Jira address with the credentials in it - https://EMAIL:API-TOKEN@site
(the e-mail's @ as %40), or https://jira.example.org#TOKEN for a Server /
Data Center token - and Sandstorm moves them into the grant and adds
Authorization: Basic (or Bearer) to every request the grain sends through
it. WeKan never sees them.

- egress.mjs syncApiRoot grants a Jira list at its own address, and the
  Powerbox request asks for Basic authentication
  (ApiSession.PowerboxTag.authentication; apiSessionDescriptor takes it).
- In a grain the Jira fetcher sends no Authorization of its own, and a
  Jira source needs no WeKan token there: a marker credential says the
  grant holds the sign-in. Only for Jira - GitLab sends its token in the
  query, where a marker would reach GitLab.
- The List Sync popup tells a Jira list in a grain what to enter in the
  Powerbox, translated in all locales; the Sandstorm docs say how, and
  that the same #token form may let a private GitHub, Gitea or Forgejo
  through (not tried yet).
- TODO Later drops "Not possible from a Sandstorm grain", its last
  category naming an issue; changelogFormat no longer needs one.

Not run in a real grain here. Tests: sandstormSyncEgress.test.mjs (the
root and the Basic descriptor, and an address with credentials in it
still refused), sandstormJiraGrant.test.cjs (the server, the fetcher,
the marker only for Jira, the popup and the docs).

Thanks to xet7 !
2026-10-15 00:33:30 +03:00
Lauri Ojansivu d6c1d6fce1 List Sync: write WeKan's changes back to GitLab.
#2698. A list synced from GitLab gets a Sync option of its own, off by
default: Write changes back to GitLab. With it, every Sync run first
sends what members did on the list's cards, then reads GitLab, so the
read finds both sides agreeing:

- a title or description edited in WeKan, when the issue still has the
  text both sides last agreed on - the local-only edit the reconcile
  already keeps. The Source footer Sync adds is not sent; when both sides
  changed, nothing is written and it stays a conflict to resolve;
- a card archived in WeKan closes its open issue, and restoring a card
  WeKan closed reopens it (syncClosedByWeKan); an issue GitLab closed is
  never reopened by WeKan;
- a comment written in WeKan becomes a note, and keeps the note's id
  (syncCommentId) so the comments sync does not bring it back twice.

Only what happens after it was switched on is sent (writeBackSince), at
most 100 writes a run. Every write is fenced by the list's Sync
reservation, goes through the same address checks as the reads (no
redirects, PUT or POST to an issue or its notes only), and records on
the WeKan side only while the card or comment is still as planned. A
refused write is shown in the Sync popup (syncWriteBackError, beside
syncSource because the run's list writes match syncSource whole) and the
read sync still runs. Not in Sandstorm, whose bridge only reads.

Tests: tests/listSyncWriteBack.test.cjs (the plan with GitLab's shapes,
the parser's footer, every negative - conflict, legacy card, old
archive or comment, foreign card, issue GitLab closed - and the wiring),
server/lib/tests/listSyncWriteBack.tests.js (end to end through
syncOneList against a fake GitLab). The live test,
releases/live-tests/gitlab-write-back.mjs, runs from build.sh / build.bat
-> Tests -> Live tests with the glab login releases/mirror.sh uses, on one
scratch issue in a private project of that account; it is human-run and
was not run here. releases/live-tests/run.mjs runs every live test and
skips a service with no login.

Also: the English variants get the SQRL and Windows sign-in strings
(their key order follows en.i18n.json); buildScriptParity accounts for
the scripts CI runs inside their own environments; new strings
translated in all locales.

Thanks to xet7 !
2026-10-14 22:08:34 +03:00
Lauri Ojansivu f4a3690256 Rules can be shown to board members, read-only, when the Admin Panel allows it.
Admin Panel / Settings / Visibility / Rules gets "Boards may show their
Rules to members, read-only", off by default (Settings
rulesReadOnlyForMembers, site admin only). With it on, a board admin ticks
"Show these Rules to board members, read-only" on the board's Rules page
(rulesVisibleToMembers). Members of that board then get Rules in Board
Settings and see the rules list and each rule's details, with no control
that changes a rule; the methods that change rules keep their board-admin
checks, so nothing is granted. Without both ticks only board and site
admins see the Rules page, which until now drew its list for any member
who opened the address.

models/lib/rulesReadOnly.js decides 'edit', 'read' or 'none', and
client/lib/rulesAccess.js is the one place the Rules page, Board Settings
and rule details ask. tests/rulesReadOnly.test.cjs covers both switches,
each alone, a non-member, and that a reader's page has no edit control.
boardMenuOrder now leaves the reader's alternative branch out of the
admin's sequence and pins it alone; instanceFeatures counts the fourth
site-admin method; roleHelperRegressions follows the canAdmin check to
rulesAccess.js. The new strings are English placeholders until the next
translation pass.

Thanks to justinr1234 and xet7 !

Fixes #2217.
2026-10-14 14:23:31 +03:00
Lauri Ojansivu e0317a9ff3 Drain the activity notification recovery list; index synced-cron's lookup.
#6768: the recovery scan retried every pending activity notification each
round, and one whose delivery fails for good - its activity deleted or
changed since, a recipient who lost access, a plan with nothing or too much
to send - failed the same way every round, forever, so the list only grew.
Such an error is terminal now: after a ten-minute grace (an activity being
written is never touched) the scan cancels that notification through the
same cancellation an administrator uses, as the system, which compacts it
to a cancelled receipt. A pending notification older than
ACTIVITY_NOTIFICATION_MAX_AGE_DAYS (7) is cancelled as expired instead of
being delivered a week late. Network and other transient failures are still
retried. Admin Panel -> Problems gets "Retry all" and "Cancel older..." for
the whole list at once, site administrators only.

#6769: before each run synced-cron asks whether a job of that name is still
running - { name, finishedAt: { $exists: false } } - every minute for every
job on every instance, and only { intendedAt, name } and the TTL on
startedAt were indexed, so it scanned the job history. { name, finishedAt }
is created at startup with WeKan's ensureIndex.

The new strings are translated in every locale.

Thanks to Raymond-Voogt and xet7 !

Fixes #6768,
Fixes #6769.
2026-10-14 14:00:21 +03:00
Lauri Ojansivu 86ec72fade Optional APIs: Trello, Jira, GitHub and Gitea compatible, off by default.
Admin Panel / Settings / Visibility / Optional APIs ticks REST APIs in the
shape of Trello's, Jira's, GitHub's and Gitea's, so apps and scripts written
for them - Trellinator, Jira and GitHub clients - can use WeKan as their
backend, each described on the page with the address a client uses.

None has rights of its own. Each is a translator: a request in the other
tracker's shape becomes the matching request to WeKan's own REST API, made
with the caller's own WeKan token on the loopback address, and the answer
becomes the other tracker's JSON. Every WeKan permission therefore applies
unchanged - read-only and comment-only roles, assigned-only members, list
permissions - and an API that is not ticked answers 404. All of them sit
under /api, so WITH_API turns them off with the rest of the REST API.

Trello: members, boards, lists, cards, labels, comments and checklists; a
deleted card is archived. Jira: projects are boards (the board key), issues
are cards (DEV-7), statuses are lists and transitions move cards, with
simple JQL. GitHub and Gitea: repositories are boards and issues are cards,
open or closed as in Board View / Version Control, with labels, milestones,
comments and Link pagination.

The new strings are translated in every locale. A runtime test over real
HTTP shows a read-only member refused and a Trello-created card readable
through Jira and GitHub.

Thanks to xet7 !

Fixes #4930.
2026-10-14 13:11:23 +03:00
Lauri Ojansivu 326d9bbf61 Board View / Version Control, issue files and synced issue details.
Version Control shows the board as a GitHub or Gitea issue tracker in the
board's own theme: cards are issues (open, or closed when archived, in a
Closed or Done list, or closed upstream), the board's labels are labels,
labels with a due date and the importers' milestone: labels are
milestones, comments are the conversation and attachments are the files.
The issue list takes GitHub's search words (is:open, label:, milestone:,
author:, assignee:@me, no:label, sort:). New issue, Close and Reopen write
through the ordinary collections, so the History tab - the board's
history table - shows them and Restore undoes them. Import links open the
GitHub, GitLab, Gitea and Forgejo importers, and each synced list has a
Sync now button.

The GitHub, GitLab, Gitea and Forgejo importers bring each issue's files:
user-attachments and user-images links, GitLab uploads, and Gitea and
Forgejo assets, downloaded through the import's SSRF guard and stored as
card attachments in Admin Panel / Attachments / Default Storage.

List sync has a new option, Comments, labels, state and files, off by
default: comments come from one paged repository-wide list (GitHub,
Gitea) or each issue's notes (GitLab), keyed by the tracker's ids, so a
second run writes only what changed, and nothing written in WeKan is
changed. Gitea issues are fetched without pull requests, and a rate
limited answer is waited out once or ends the run with the time to retry.

A public board's Show on / Default on Public Board settings are for the
public: visitors and non-members get them, read-only, and the board's own
members get the private side, so any view - Version Control, Email, Chat
and the rest - can be the read-only public view.

The card menu has a QR code of the card's link, drawn in the browser by
WeKan's own encoder, which the tests check module for module against
qrcode-svg.

The new strings are translated in every locale.

Thanks to xet7 !

Fixes #2015.
2026-10-14 12:09:34 +03:00
Michael Nutt 3df146c164 Defer ZIP and Excel initialization until first use
Load archive libraries only when an import, export or restore needs them.
Keep lightweight timing enabled and make detailed Meteor profiling opt-in.
Include first-use regression checks and production measurements.
2026-10-11 23:30:56 -04:00
Lauri Ojansivu ab785acd1e Choose what notifications contain, and group and schedule them, for e-mail, the tray and webhooks.
One delivery model (models/lib/notificationDelivery.js) for every channel -
e-mail, the notification tray and outgoing webhooks - set in the
Notifications popup at Admin Panel, board and Member Settings scope, and in
each one-way webhook's form:

- Content. Webhooks: the text on or off, and which property groups are sent
  (standard, ids, names, links, actor, people, details), with checklist,
  list, swimlane and board names, before/after values, the card description
  and links added as opt-in groups. E-mail and tray: the classic sentence or
  a clear layout - the board as a link first, the actor and card in bold -
  and which parts are shown.
- Grouping: one message per event, per card, per board, or all together.
- Scheduling: immediately, every 5 minutes to 24 hours, or once a day, with
  optional quiet hours, in the time zone of whoever set it.

The most specific explicit setting wins: member, then board, then Admin
Panel for e-mail and tray; the webhook, then its board, then Admin Panel for
webhooks. A member can only leave their own name out of outgoing webhooks.
The built-in defaults keep today's behaviour. Grouped and scheduled webhooks
and e-mail go through durable queues that survive restarts; queued webhooks
use the SSRF guard and log a blocked address in Admin Panel - Problems.
Values of admin-only custom fields now reach only board admins in e-mail and
tray, and never a webhook.

The new strings are in English in every locale, pending Transifex.

Thanks to HaKePlan, Meeques and xet7 !

Fixes #3695,
Fixes #5171.
2026-10-10 15:28:26 +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 c06bf8d0e9 Sync sprints and releases into Scrum planning.
List Sync from Jira or GitLab now carries an issue's sprint and fix
versions / milestones into the board's Scrum planning while Scrum is
enabled on the board. A missing sprint or release is created on this
board with the dates the source gives; an existing one is matched by its
source ID first, then by name. A local planning change stays until the
source changes that issue's planning, and a first Sync never removes
planning. The writes go through the durable Sync journal and steps, so
an interrupted Sync is finished or discarded like any other.

Thanks to xet7 !
2026-10-08 12:35:58 +03:00
Lauri Ojansivu cb69750b17 Let administrators discard List Sync operations that cannot be replayed.
A saved List Sync operation whose list was removed, recreated or
reconfigured, or whose actor lost full-list write access, could never be
replayed. The replay job refused it every minute with only a console line,
and because a new Sync of the list resumes the pending operation first,
that list could not Sync at all.

Such an operation is now marked once, with one Recovery event, and a
blocked manual Sync says why. Admin Panel / Problems / Recovery lists these
operations with what they applied and their live replayability. An
instance administrator can discard one only while the same checks a replay
makes still fail. The discard holds the list's Sync lease, records one
immutable decision, then removes the saved steps and the operation marker,
reading each removal back. It writes no card: changes already applied stay
and the rest are never written. A retry or a second administrator only
finishes the removal, and a replay that finds a decided discard completes it
instead of resuming. The intent stays as evidence and the discard is
audited in Recovery.

Unit, source-wiring and negative tests cover recording once, refusing
non-administrators and replayable operations, and discarding twice; an app
test and a Playwright case cover the Recovery page. New interface text is
in English, pending Transifex.

Thanks to xet7 !
2026-10-08 11:53:06 +03:00
Lauri Ojansivu 03975e7d31 Admin Panel / Settings / Visibility / Features: choose which card fields every board shows.
Above the Features Save there is now one tick per field type of Board
Settings / Card - the same icons and names, all ticked by default. An
unticked field, for example Pomodoro, is not offered in any board's Board
Settings / Card and is not shown on any opened card or minicard, whatever
the board chose. Visibility only: no card data and no board setting is
written, so ticking it again shows every board as it was set. There is no
ordering here; the order stays each board's own.

The catalog and the decisions are models/lib/cardFieldVisibility.js. It is
stored as cardFieldStates on the settings document (missing means shown,
so existing installs are unchanged), published with the other Features
settings and saved by the site-admin-only saveInstanceFeatures method,
which refuses unknown field keys. The hiding happens at the client's one
board read (ReactiveCache.getBoard), which returns the board with the
hidden fields' flags reading false - the same object when nothing is
hidden - so every card and minicard template that reads a board flag agrees
without being edited; the per-card List title and the user's Labels text
override check the same mark. The server's reads, publications and the REST
API are unchanged. A whole-column tick in Board Settings / Card leaves the
hidden fields' board values alone.

Thanks to xet7 !
2026-10-08 08:54:04 +03:00
Lauri Ojansivu 4f4de145b1 Sync GitLab's weight or time estimate into a numeric field.
List Sync from GitLab can now carry an estimate, as Jira's already
could. The Sync settings choose GitLab's weight (in points) or its time
estimate (given in seconds, stored in hours), and any numeric custom
field on the board to hold it. An issue without a weight clears the
value; local changes are reviewed as conflicts, as for Jira. The
durable journal accepts the GitLab mapping, and the source coverage
report counts the mapped attribute as used. GitHub, Gitea and Forgejo
issues have no estimate to sync. New interface text is in English,
pending Transifex.

Thanks to xet7 !
2026-10-02 19:34:47 +03:00
Lauri Ojansivu 18d57b2b8f Let administrators choose which optional features WeKan offers.
Admin Panel / Settings / Visibility has a new Features group. Each
optional group of board views (Table, Calendar, Time, Overview, Gantt,
Scrum, Flow charts, Map) can be turned off for the whole instance. A
disabled feature is removed from the Board View menu and from Board
Settings / Board View rather than greyed out, and a user who had it open
is moved to the board's default view. Its data and every permission stay
as they are.

Administrators can preview disabled features, and named pilot users see
them too. An opt-in policy keeps features added by later WeKan updates
disabled until an administrator enables them; the features present when
it is turned on stay as they were. Swimlanes and Lists are core and
cannot be disabled. The English texts are pending Transifex.

Thanks to nalilord and xet7 !

Fixes #6736.
2026-10-02 15:26:22 +03:00
Lauri Ojansivu 94a8c41b3c Let only a site admin assign a tenant hostname, and never the instance's own.
An Organization's own admin could set its tenant hostnames to anything not
yet claimed, the instance's ROOT_URL host included, which put that
Organization's branding on everybody's sign-in page. The instance host is
now refused for everyone and an org admin's attempt is recorded under
TenantBleed. A new hostname from an org admin is stored as a request that a
site admin assigns by saving it; dropping hostnames still applies at once.

The three new strings are in English only, pending Transifex.

Thanks to xet7 !
2026-10-02 14:25:56 +03:00
Lauri Ojansivu 0dd33ef806 Refuse to restore a backup file through a symlink.
The attachment and avatar restore checked that an entry's name stays inside
the files directory, then wrote with fs.createWriteStream, which follows a
symlink already on that path. It now skips such entries and replaces the
file exclusively, as the full-backup restore already did.

Thanks to xet7 !
2026-10-02 11:42:49 +03:00
Lauri Ojansivu 1a218ead02 Keep assigned-only members to their own cards on every read path.
The board publication shows an assigned-only member only the cards assigned
to them, but the attachment API (REST and DDP list, download and info), the
activities publication, Due Cards with all users, Global Search, the
structural move pickers and position history asked only for board membership
and so showed every card of the board. Each now applies the same rule; a
download or info request for another card's attachment is recorded under
AssignedBleed in Admin Panel -> Problems.

Thanks to xet7 !
2026-10-02 11:37:40 +03:00
Lauri Ojansivu c49d9d8d3e Fix the JamBleed regression: a login lockout never disables the account being guessed.
The lockout reporter recorded brute.lockout (high, blocked) with the GUESSED
account as its userId, and a high-severity blocked event with a userId
disables that account. So three wrong passwords from anyone who knew a username
disabled its owner until an admin re-enabled it - worse than the per-user lock
GHSA-rf3w-rj48-jxcc removed - and a user who mistyped their own password three
times was disabled the same way.

The reporter is now one module for startup and reload and names the account as
targetUserId; a catalog key can declare blocksAccount: false, and brute.lockout
does. An account already disabled keeps the reason it was disabled for instead
of later events overwriting it. tests/jamBleedVictimBlock.test.cjs drives the
real blocking decision with the real catalog; its negative test fails if a
lockout is recorded anywhere else or a login target is recorded as an actor.

Thanks to xet7 !
2026-10-02 10:31:23 +03:00
Lauri Ojansivu 2172f19d88 Fix SyncBleed: send List Sync requests through the SSRF guard and keep responses out of errors.
GHSA-5q84-p3vr-f3xv: a board member with write access chooses the List Sync
server URL for Gitea, Forgejo, GitLab and Jira. It was fetched with the
platform fetch(), so it reached 127.0.0.1, private networks and the cloud
metadata address, and up to 200 bytes of a failed response were copied into
the error the preview returns and lastSyncError stores. An open and a closed
internal port also answered differently.

Every request now goes through fetchSafe: internal addresses refused, DNS
pinned, redirects refused, response size and time bounded. An error carries the
origin and HTTP status only, a non-JSON answer says so without quoting it, and
a guard refusal is one message that does not name what a host resolved to.
Saving Sync settings refuses an internal address too, so none is stored. Both
refusals are recorded as SyncBleed in Admin Panel -> Problems.

A self-hosted tracker on the server's network is allowed only by the
administrator, with LIST_SYNC_ALLOWED_PRIVATE_HOSTS (exact hosts); the test
server allows 127.0.0.1 for the List Sync specs' mock tracker. The browser test
found that an IPv6 literal such as [::1] kept its brackets and was looked up as
a name at save time; the shared validator now checks it as an address.

tests/syncBleed.test.cjs reproduces the report on the real fetcher for every
provider, and fails on a platform fetch() to anything but a fixed or
administrator-allowed host, or a response body copied into an error, anywhere
in the server tree. list-sync-source.e2e.js saves and previews internal
addresses in the browser and checks no request reaches the mock tracker.
securityRegressionCoverage lists CacheBleed and SyncBleed with their tests.

Thanks to alham-rizvi and xet7 !
2026-10-02 09:46:00 +03:00
Lauri Ojansivu f5d20a18d7 Let administrators review legacy rule emails instead of leaving them stuck.
A rule email prepared before commands recorded their source (no source
binding), or one with card Details whose binding predates the related-
source chain, is refused by dispatch and was waiting for a recovery that
did not exist. Admin Panel -> Problems -> Recovery now lists them with
their board, card, recipients, subject and reason. Nothing runs them
automatically. An administrator re-binds one - its content is prepared
again from the card as it is now, after re-checking that the rule's
author is enabled with write access and that the rule and action are
unchanged - or discards it, which records a dropped attempt so the rule
stage completes without mail. Each decision writes one immutable audit
record, is serialized per command, and is final once an attempt exists.

Unit, MongoDB integration and source tests cover listing, re-bind,
discard and every refusal, and pin that only the admin methods call
them; a Playwright case covers review and discard. New interface text is
in English, pending translation.

Thanks to xet7 !
2026-09-30 01:49:49 +03:00
Lauri Ojansivu 252f27986b Let administrators resolve partially accepted rule emails.
When SMTP accepts a rule email for only some recipients, or its answer is
lost, the attempt stays unconfirmed and WeKan never sends it again by
itself. Admin Panel -> Problems -> Recovery now shows each recipient as
accepted or not confirmed, and an administrator can resend to the
unconfirmed recipients only (same headers, narrowed SMTP envelope), mark
the attempt sent, or drop it. A drop completes the rule stage without
mail. Decisions wait ten minutes after the attempt started, longer than
any SMTP send can last, are one immutable record per attempt, and are
serialized per command across server processes. A resend records its
intent before SMTP, so an interrupted one is shown as in progress rather
than repeated silently. The offline acceptance tool and the online
decision exclude each other.

Unit, MongoDB integration and source tests cover resend, partial resend,
mark sent, drop, the quarantine and the refusals; a Playwright case
covers review and drop in the Admin Panel. New interface text is in
English, pending translation.

Thanks to xet7 !
2026-09-30 01:46:04 +03:00
Lauri Ojansivu f8b9f26c5f Correct Bulgarian activity messages and common controls 2026-09-29 17:14:55 +03:00
Lauri Ojansivu 58d166029c Set due-date reminder days and webhook delivery per board.
Board Settings -> Notifications now has due-date reminders: a board's own
offsets override NOTIFY_DUE_DAYS_BEFORE_AND_AFTER (an empty list turns
them off, an empty field restores the server default), and a switch sends
the board's reminders to all of its enabled outgoing webhooks, whatever
activities those subscribe to. The reminder scan now runs when either the
environment variable or a board sets offsets, and writes a reminder only
for the offsets that board uses. A validated method limited to board
admins stores the setting.

The new strings are English, pending Transifex. add-pending-keys.mjs now
writes symlinked locales once and checks every file before writing any.

Thanks to xet7 !

Fixes #5323,
2026-09-29 13:44:54 +03:00
Lauri Ojansivu cb8c68c540 Expose bounded administrator metadata reports for stored rule email attempts 2026-09-28 16:01:45 +03:00
Lauri Ojansivu f1e572db5c Integrate cancelled notification payload cleanup and terminal receipt reporting 2026-09-28 15:13:39 +03:00
Lauri Ojansivu b590d3d76f Cancel remaining activity notification delivery with permanent replay protection 2026-09-28 15:04:37 +03:00
Lauri Ojansivu 7fef4f4cdc Add administrator pause and resume controls for activity notifications 2026-09-28 15:00:31 +03:00
Lauri Ojansivu 169a19817a Report pending activity notifications and allow guarded manual retry 2026-09-28 14:49:56 +03:00
Lauri Ojansivu 5e1ed32f58 Sync Jira original and remaining time estimates with conflict review
Map selected aggregate seconds to the board's imported numeric time fields in hours. Preserve zero, missing and explicit null; validate mapping identities and retain unrelated fields through conditional array writes.

Twenty-five focused Node suites and twenty-two Chromium scenarios pass with local MongoDB and Jira fixtures. Live Jira, FerretDB and other browsers remain unverified.

Thanks to xet7 !
2026-09-28 03:49:38 +03:00
Lauri Ojansivu 20b47995b2 Add administrator recovery controls for queued notification email
Summarize recipients without mail payloads, paginate with bounded memory, and coordinate pause/resume/cancel with sender reservations. Persist holds, cancellation cutoffs and idempotent request receipts so replay cannot undo newer actions or cancel later messages.

Verify current administrator access, interrupted commands, lost write acknowledgements, stable cancellation and private collection boundaries with MongoDB and Chromium tests. Keep translations limited to English source labels.

Thanks to xet7 !
2026-09-28 03:15:09 +03:00
Lauri Ojansivu a00c009ba6 Bind scheduled Sync to its authorizing account 2026-09-28 02:30:48 +03:00
Lauri Ojansivu 79fcd0061e Sync explicitly mapped Jira estimates with local conflict review
Select an existing numeric Jira estimate field in the Sync popup, retain field/unit identity, request the selected Cloud field, and merge numeric estimates with source baselines. Preserve zero, explicit null clearing, unrelated custom fields and their order; reject invalid or changed mappings and stale card writes. Cover source selection, conflicts, remapping, invalid values and full popup flow in Node and Chromium.

Thanks to xet7 !
2026-09-28 01:30:24 +03:00
Lauri Ojansivu 6a4e5e29a8 Expose retained Sync diagnostics in Problems Recovery 2026-09-28 00:34:27 +03:00
Lauri Ojansivu adf646177b Persist private Sync run outcomes and bounded coverage reports 2026-09-28 00:28:58 +03:00
Lauri Ojansivu 80ccf100a7 Preview Sync changes and normalized omissions without applying writes
Reuse the actual merge and write plan, scope full-list previews to unrestricted writers, bound reports and keep omitted values private. Exclude status-only diffs from update counts. Preserve empty and whitespace source text through schema cleaning so repeated runs do not keep changing comparison baselines. Cover preview parity, saved settings, access changes, no-write errors, storage behavior and browser flows.

Thanks to xet7 !
2026-09-28 00:14:46 +03:00
Lauri Ojansivu 352dcbea87 Create durable Sync replacements without changing moved or detached cards
Persist conditional replacement decisions before card insertion. Revalidate source previews, restrict replacement to full-list writers and preserve the previous card. Cover stale decisions, database races and lost acknowledgements, moved and detached UI flows, and private collection writes.

Thanks to xet7 !
2026-09-27 23:53:07 +03:00
Lauri Ojansivu ed1615369c Keep Sync parents local when active subtasks block archival
Offer a scoped archive-conflict preview and a parent-only mapping removal. Refetch source absence and revalidate the parent and archive blocker before conditional resolution. Preserve all subtask content and hide subtask identifiers from previews; assigned-only callers retain their write scope.

Ten Sync Node suites and thirteen Chromium scenarios pass, including both permission scopes, returning source items, unchanged subtasks and existing Sync behavior. Local release audit passes with advisory warnings. Add English source labels only. Creation collisions after moved or detached cards remain pending.

Thanks to xet7 !
2026-09-27 23:44:40 +03:00