Commit Graph
295 Commits
Author SHA1 Message Date
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 c50d7b4ea7 Authorize subtask deposit reads and destination writes
Remove unvalidated deposit and null board IDs from source-card scope. Publish deposit content beneath its own reactive visibility-filtered board cursor, applying destination assignment restrictions and reactive card children. Filter status counts by visible assigned scopes.

Require destination write access before pointer changes and subtask landing structures, and deny client pointer rename bypasses. Summarize blocked writes in Problems. Positive decisions, scope/dispatcher inventory and existing subtask/status suites pass; browser regression syntax-check passes with live execution pending.

Thanks to Wenhao Wu, Southeast University and xet7 !
2026-09-14 12:09:35 +03:00
Lauri Ojansivu 26e9e70304 Prevent linked cards from promoting non-writing source roles
Require source write access for authoritative and DDP link creation, including pointer changes. Treat explicit non-writing source roles as a ceiling on delegated writes, covering legacy self-created links. Match UI permissions and remove the link action from the non-writer menu. Record denied writes in bounded Problems summaries.

Actual shared permission decisions for every role, creation/deny inventory and existing link and role suites pass. Browser regression syntax-check passes; live execution pending.

Thanks to Wenhao Wu, Southeast University and xet7 !
2026-09-14 12:05:14 +03:00
Lauri Ojansivu af93621261 Authorize every board grant before sending registration invitations
Domain-approved inviters must hold an allowed inviter role on each requested board. Site admins retain access to real boards; missing boards fail closed. Validate the complete grant before creating or changing any invitation code or sending mail, and summarize rejected grants in Problems.

Role and grant inventory plus invitation email suites pass. Browser regression syntax-check passes; live execution pending.

Thanks to Wenhao Wu, Southeast University and xet7 !
2026-09-14 12:02:59 +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 d7ac619d63 Bind comment inserts to the authorized card board
Reject foreign-card REST and DDP comment inserts and prevent DDP rebinding from bypassing the boundary. Keep card-authoritative legacy comment listing. Add bounded Problems summaries and attack, negative insert inventory and browser regression coverage.

Targeted Node suites pass; browser regression is syntax-checked with live execution pending.

Thanks to Wenhao Wu, Southeast University and xet7 !
2026-09-14 11:49:40 +03:00
Lauri Ojansivu 9b1fb5214f Require board write capability for list moves and sibling mutations
Enforce the canonical role policy for both sides of list, swimlane and checklist moves, scoped imports, attachment renames and history writes. Record denied attempts through bounded Problems summaries without allowing logging failures to bypass authorization.

Add role-matrix decisions, the reported moveList attack, sibling guard inventory and a browser regression. Targeted Node suites pass; live browser execution remains pending.

Thanks to Wenhao Wu, Southeast University and xet7 !
2026-09-14 11:47:29 +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 1c47bcc4ac Await the Meteor 3 subscription transition during admin impersonation
Finish setUserId before returning to the client, so subscription recreation cannot race the client identity change. Add a deferred-promise regression and verify switch failures propagate.

Thanks to gleneindre and xet7 !

Fixes #6691,
2026-09-13 16:44:49 +03:00
Lauri Ojansivu 5057a0a2c1 Add member-selected calendars and accessible date and time controls
Apply the selected calendar to shared date displays, calendar month views and date inputs. Provide mouse and keyboard date navigation and hour/minute selection while preserving native date storage. Document the supported offline calendars and add display, picker and browser regressions.

Thanks to mimZD and xet7 !
2026-09-12 21:01:41 +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 83d2a7fc75 Add Google, GitHub, Facebook, X, Meteor Developer, Weibo, Meetup and passwordless login.
Meteor's own accounts packages - accounts-google, accounts-github,
accounts-facebook, accounts-twitter, accounts-meteor-developer,
accounts-weibo, accounts-meetup and accounts-passwordless - are added, so
every way to log in that Meteor's accounts system offers is available.

models/lib/oauthProviders.js is the pure catalog of the seven providers
(env var names, ServiceConfiguration id field, login method, icon, label
key) with the decisions built on it: OAUTH_<PROVIDER>_ENABLED plus id and
secret (each also read from a <NAME>_FILE Docker secret), the Admin Panel
override winning over the env var, OAUTH_PROVIDERS_LOGIN_STYLE,
OAUTH_PROVIDERS_MERGE_EXISTING_USERS and PASSWORDLESS_ENABLED.

server/lib/oauthProviders.js writes ServiceConfiguration for every enabled
provider at startup and on demand (reconfigureOauthProviders, called by the
Admin Panel after a save) and removes it for a disabled one, so switching a
provider off takes effect without a restart. A first login through a
provider becomes a WeKan user the way OIDC does, fail-closed: an existing
account of another login method is only linked when merging is on and the
provider verified the address, otherwise the login is refused and the
attempt recorded on the new oauth.account-conflict canary for Admin Panel
-> Problems. Passwordless is gated on both the token-request method and
the login attempt while it is off.

getAuthenticationsEnabled reports each enabled provider key and
passwordless, and the login form shows one button per provider and a
two-step e-mailed-code form under the SAML button, with errors in the same
region as the password form. No credential ever reaches the client.

tests/oauthProviders.test.cjs covers the catalog, the env/_FILE/admin
resolution, the enabled and takeover decisions, the ServiceConfiguration
upsert/remove, the canary, the login form and the no-secret-on-the-client
negative checks.

Thanks to xet7 !
2026-09-11 11:52:04 +03:00
Lauri Ojansivu d1b5d0a75c Admin Panel: override the OAuth login provider and passwordless env vars.
Admin Panel / People / Login gets a section for Meteor's own accounts-*
login services (Google, GitHub, Facebook, X/Twitter, Meteor Developer, Weibo,
Meetup) and for passwordless login, built the same way as the LDAP section:
every OAUTH_<PROVIDER>_ENABLED / _CLIENT_ID / _SECRET env var, the shared
OAUTH_PROVIDERS_LOGIN_STYLE and OAUTH_PROVIDERS_MERGE_EXISTING_USERS, and
PASSWORDLESS_ENABLED can be set there, a value set in the Admin Panel wins
over the env var, and a badge beside each field names the source in effect.

The secret is stored in Settings.oauthProviders.<key>.secret and, like the
LDAP bind password, is never published: only the boolean secretSet is, an
empty secret submission leaves the stored one untouched, and the sources
method reports it through hasConfigValue() only. saveOauthProviderSettings
validates the provider key against the catalog and both save methods call
reconfigureOauthProviders() so a change takes effect without a restart.

Tests: tests/oauthProvidersAdminOverride.test.cjs, and the whole-tree secret
sweep in tests/ldapAdminOverrideSecurity.test.cjs now also matches
hyphenated sub-document keys.

Thanks to xet7 !
2026-09-11 11:49:48 +03:00
Lauri Ojansivu e5092c87e8 Move the card_comment_reactions indexes into the collection bootstrap.
server/models/collectionBootstrap.js already owned this collection's index
(the unique cardCommentId one); 03ffb56a5 added a second module for the
same collection. One place per collection: the cardId and boardId indexes
now sit beside the existing one there, and the separate module is gone.
tests/cardCommentReactionsIndexes.test.cjs pins that arrangement.

Thanks to xet7 !
2026-09-11 11:27:17 +03:00
Lauri Ojansivu 03ffb56a5e Index card_comment_reactions, and document why MongoDB's data directory must be local.
From a reported MongoDB crash series (.tools/crash: WeKan and MongoDB in one
Kubernetes pod, the database volume on an SMB/DFS share):

- The crash itself is WiredTiger's checkpoint fsync() returning ENOSPC
  ("No space left on device" with 519 MB used and 10 GiB free) on the
  network share, followed by a fatal assertion and abort - every checkpoint,
  so a restart loop. That is the storage, not WeKan: MongoDB requires a
  local filesystem with real fsync semantics under its data directory.
  docs/Databases/MongoDB/Storage-Requirements.md now says so, shows what
  the log looks like when it is not, and what to do (local block volume;
  attachments may still live on a share; MONGO_URL over TCP is fine).
- The WeKan-side finding in the same logs: card_comment_reactions had no
  index at all, and every board open queried it by `cardId: { $in: [...] }`
  and by `boardId` as a full collection scan - 3,397 COLLSCANs of that one
  collection in the last crash log, up to 1.6 s each, the bulk of its
  "Slow query" lines. server/models/cardCommentReactions.js now ensures
  indexes on cardId, boardId and cardCommentId at startup, like every other
  per-card collection.

tests/cardCommentReactionsIndexes.test.cjs pins both.

Thanks to xet7 !
2026-09-11 11:23:53 +03:00
Lauri Ojansivu 563a0a6edc Guard toLowerCase() call sites reached by non-string values.
Fix TypeError: string.toLowerCase is not a function server unhandledRejections
reported in production. The registration invitation-code check in
Users.after.insert() read doc.authenticationMethod.toLowerCase() unguarded,
but authenticationMethod is only set for oauth2/ldap signups - a normal
password/invitation signup left it undefined and crashed this hook on every
insert whenever disableRegistration was on; doc.emails[0].address was also
read unguarded. The buffered notification-email sender likewise read
user.emails[0].address.toLowerCase() unguarded, crashing when a user (e.g. a
header-auth/LDAP account) has an empty emails array. The CSV/TSV importer's
header-row mapping read headerRow[i].toLowerCase() unguarded, which could
throw on a sparse row cell that isn't a string.

A full audit of every server-reachable .toLowerCase() call site (server/,
models/, packages/) found the rest already guarded (typeof checks, ||
'' fallbacks, or values sourced from validated schema fields).

Thanks to xet7 !
2026-09-10 22:37:03 +03:00
Lauri Ojansivu ac363f979f Add Admin Panel overrides for LDAP_* environment variables, and a Test
LDAP Connection button.

Every LDAP_* setting server/authentication.js and packages/wekan-ldap read
straight from process.env can now be overridden from Admin Panel / Login,
with an explicit admin value winning over the env var and the env var
winning over nothing (models/lib/configResolver.js's resolveConfigValue(),
pure and unit-tested for the precedence and for its 'admin'/'env'/'default'
source tag). The Admin Panel LDAP section shows, next to every field,
which source is currently in effect - an env var name, "Admin Panel", or
"Unset" - so it is always clear whether a value comes from the environment
or from an admin override.

The bind password never reaches the browser: it is stored in the new
Settings.ldap.bindPassword field, which server/publications/settings.js
deliberately never publishes (only the boolean ldap.bindPasswordSet is).
The password input starts empty and an empty submission leaves the
existing value/source untouched, matching the existing mail-server
password field's pattern. hasConfigValue() is the parallel, secret-safe
resolver: it returns only a boolean and a source, never the value, and a
negative test fuzzes several secret shapes through it to prove that.

Found while wiring this up: packages/wekan-ldap/server/testConnection.js's
existing ldap_test_connection method had its isAdmin check commented out
("TODO: this needs to be fixed - security issue"), so any authenticated
user - not only an admin - could trigger a real LDAP bind attempt against
the configured directory. Fixed to require isAdmin, the same check every
other admin-only Settings method uses, before any connection is attempted.
A new "Test LDAP Connection" button in Admin Panel / Login calls this
method against whichever config (admin override or env var) is currently
resolved and shows the result - success or the directory's own error -
inline, satisfying the "get back error message visible at admin panel"
request without adding a second LDAP client dependency.

Switching between LDAP, OAuth2, SAML and password login already has its
own UI (the Login pane's "Default Authentication Method" selector plus
each method's own enabled flag) and needed no separate switcher; this only
extends "enabled" itself to be admin-overridable, the same as every other
LDAP field.

Scope: LDAP is covered end to end (override + test-connection). OAuth2/
SAML/CAS's env vars are unchanged and stay env-only for now - the resolver
is written to extend to them, but doing so was out of scope for this pass.

Tests: tests/configResolver.test.cjs (precedence, source tagging,
hasConfigValue's secret non-leak, redactCredentialsInUrl for the composite-
connection-string case); tests/ldapAdminOverrideSecurity.test.cjs (the
publication never sends ldap.bindPassword, a whole-tree negative sweep for
any OTHER publication doing the same, the isAdmin gate on
ldap_test_connection runs before any connection attempt, and the method's
response never carries the password); tests/settingPublishedFields.test.cjs
extended to understand dotted/sub-document published fields so it keeps
checking the LDAP section's currentSetting.ldap.* reads against what is
actually published.

Thanks to xet7 !
2026-09-10 21:37:53 +03:00
Lauri Ojansivu 84c7140012 CHANGELOG: link the Star Swimlane/List/Card entry to its commit (#1172). 2026-09-10 21:13:00 +03:00
Lauri Ojansivu c5740e8046 Add Star/Unstar to the Swimlane, List and Card menus, a "Starred" page and a header bookmarks section for them.
Starring a board already existed (profile.starredBoards, toggleBoardStar
in models/users.js / server/models/users.js). This generalizes that same
per-user id-array shape to profile.starredSwimlanes, profile.starredLists
and profile.starredCards, each with its own toggleSwimlaneStar /
toggleListStar / toggleCardStar Meteor method that checks the id and
requires a login the same way toggleBoardStar does.

A Star/Unstar row was added to the Swimlane, List and Card hamburger menus
- a reading action, alongside Copy link and History, above the rows that
change the board. The list's own per-board `starred` field
(client/components/lists/listHeader.js isStarred()/.star(), used for the
sticky/pinned-list highlight) is untouched; the new per-user star uses its
own isListItemStarred helper and js-star-list-item row.

A new "Starred" page (/starred-items) lists everything the current user
has starred, grouped by type, reusing the "open card in place" popup
mechanism myCards/myAttachments already use for the card group. It is
reachable from the "All Pages" member menu next to My Cards / My Due
Cards / My Attachments.

The header bookmarks dropdown (starredBoardsPopup) gained three more
capped sections - Starred Swimlanes/Lists/Cards, five each, most-recently-
starred first - with a "see all" link to the uncapped Starred page. Both
the dropdown and the Starred page read the same starredItemsByType() query
(client/components/main/header.js, imported by starredItems.js), so there
is one definition of "what is starred" rather than two that could drift.

tests/starredItems.test.cjs pins the persistence shape for all three new
types, that starredCount() sums all five starred kinds, that the shared
query has exactly one definition, and that the new i18n keys are used by
all three menus. tests/starredPages.test.cjs's count assertion was updated
to match: the count now goes through the shared starredCount() aggregate
rather than two lengths added inline, still covering every starred kind.

The new labels (Star/Unstar, Starred Swimlanes/Lists/Cards, "See all
starred items", the empty-state message) are added to en.i18n.json and to
every other locale file with real per-language translations.

Thanks to chris-kwng and xet7 !

Closes #1172,
2026-09-10 21:12:34 +03:00
Lauri Ojansivu 099ab39dd4 Add PUT endpoints for a checklist's title and a comment's text over the REST API.
Auditing the REST API surface against #1037 found two clean CRUD gaps:
every other board sub-resource with GET/POST/DELETE already had a
matching PUT, but a checklist and a comment did not, so editing either
meant deleting and re-creating it.

PUT /api/boards/:boardId/cards/:cardId/checklists/:checklistId renames
a checklist (title only), mirroring the existing DELETE's lookup and
checkBoardWriteAccess check.

PUT /api/boards/:boardId/cards/:cardId/comments/:commentId edits a
comment's text, reusing validateCommentBody and the same
assertCanMutateComment rule (and foreign-edit canary) the DELETE
handler already applies.

tests/restApiEditGaps.test.cjs pins both routes as source-pattern
tests, the same way tests/restApiIdorBatch.test.cjs already does for
this REST surface.

Thanks to mayjs and xet7 !
2026-09-10 21:11:34 +03:00
Lauri Ojansivu bde66a5c7d Add a 3-tier Notification Settings popup (Member/Board/Admin).
Admin Panel / People, Board Settings and Member Settings each gain a
"Notification Settings" menu entry, right below Email in Admin Panel /
People. All three open the same reusable notificationSettingsPopup
template, letting notifications (tray/in-app and email, the two services
Notifications.notify already dispatches to) be turned on or off with the
same precedence the theme override already uses: Admin Panel default,
then Board override, then the member's own override.

models/lib/notificationSettings.js is a small pure module with the
resolution function (resolveNotificationSetting) and the notification-type
catalog; server/notifications/profile.js and server/notifications/email.js
now resolve the decision before adding to the tray or buffering an email,
so a disabled service is genuinely skipped rather than only hidden in the
UI. Settings.notifyDefaultTray/Email hold the admin default,
Board.notifyOverrideTray/Email the board override, and
profile.notifyOverrideTray/Email the member override; each is optional/
nullable so "unset" always falls through to the next level.
2026-09-10 21:00:20 +03:00
Lauri Ojansivu bc25eee1ba Add "Save as Template" card action, and extract the shared Templates board
creation it reuses.

#2209 (a 2019 follow-up to #2165's template-feature checklist) asked for
"create template from element" - creating a template directly from an
existing board/list/card, rather than only from scratch. WeKan's own
"insert a card FROM a template" flow (searchElementPopup) already existed,
but nothing did the reverse: turning an existing card INTO a template.

The card menu now offers "Save as Template" beside "Copy Card". It posts
to a new saveCardAsTemplate server method that copies the card into the
user's own "Card Templates" swimlane (creating the personal Templates
board on first use, exactly as the existing default-board-template flow
already does), marking the copy type: 'template-card' so it behaves as a
template rather than an ordinary card.

The lazy per-user Templates board creation used to live only inline in
the ensureTemplatesBoard Meteor method; it is now exported as
ensureTemplatesBoardForUserId (server/models/users.js) so this new method
can call it directly server-side instead of duplicating the board/
swimlane setup.

#2209's other two sub-items were checked and are already handled:
"cards don't appear in swimlanes if the general swimlane is deleted"
(#1959) already has thorough startup-rescue coverage in
server/lib/schemaUpgradeSteps.js (the "swimlane-structure" step) plus
regression tests in tests/schemaUpgradeSteps.test.cjs, and "templated
users" was explicitly out of scope per the issue's own text.

Thanks to andresmanelli and xet7 !
2026-09-10 20:54:01 +03:00
Lauri Ojansivu 632a107f33 CHANGELOG: triage remaining open Rules (IFTTT) issues to TODO Later.
Copy/link rule actions (#4160, #3235), email attachments (#3948),
custom-field rule values (#3195), GitLab sync (#2698), a scheduled
due-date rule action (#4278) and more template variables (#3815) are
each a real feature or need external infrastructure this sandbox
cannot stand up, so they are recorded with their reasons rather than
forced.
2026-09-10 20:50:08 +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 76dcb6575a Add an "Admin only" flag on custom field definitions (#3141).
A custom field marked Admin only has its value hidden from - and cannot be
set by - a non board-admin board member: not on the card detail view, not on
the minicard, not in the card's "assign a custom field" popup list, and not
through the setCardCustomFieldCheckbox/setCardCustomFieldCurrency Meteor
methods or a direct client write of customFields.<index>.value. The toggle
itself, in the custom-field definition editor, is only rendered for and only
writable by a board admin (CustomFields.allow's update/insert rules now check
board.hasAdmin() specifically for the adminOnly field, on top of the existing
write-access check every other field edit already requires).

models/lib/customFieldsWD.js gets a small pure filterAdminOnlyDefinitions()
helper so the gate has one tested choke point: models/cards.js's
customFieldsWD() - shared by both the card-detail and minicard templates -
filters admin-only definitions out before matching them to a value, and
client/components/cards/cardCustomFields.js reuses the same helper for the
popup's field list.

Thanks to CarloRampini and xet7 !

Closes #3141,
2026-09-10 20:34:30 +03:00
Lauri Ojansivu 9d1b2915ef Send a push notification (not just email) when a user is invited to a board.
#3136: Users.inviteUserToBoard (server/models/users.js) only ever sent an
invitation email. Board membership/watcher changes already fan out through
Notifications.notify(user, title, description, params) - the same helper
server/models/activities.js calls for card assignment, due dates, mentions
and every other activity-driven notification, reaching both the email
service and the in-app notification bell - but an invite itself never went
through it.

inviteUserToBoard now also calls Notifications.notify(user, 'push-invite-title',
'push-invite-text', params) with the same params object built for the
invitation email, right after the email is sent. It is guarded by
`!isNewUser`: a brand-new invitee created from an email address with no
matching WeKan account has no established notification target yet, so they
stay email-only, exactly as before, with no error. The push call has its own
try/catch so a failing notification service can never break the invite.

Added push-invite-title/push-invite-text to en.i18n.json and every other
locale file, reusing each locale's own already-translated
email-invite-subject/email-invite-text wording (the only existing invite
wording to draw a style from), so every locale ships a real translation
immediately - no English placeholders except the en-* regional variants,
which are English by design.

Added tests/boardInvitePushNotification.test.cjs: a source-inspection
regression test (inviteUserToBoard is a full Meteor method and cannot run
outside a Meteor server) pinning that the fix reuses the exact
Notifications.notify(user, title, description, params) helper/signature
already used elsewhere - exactly one call site, not a second
implementation - guarded by `if (!isNewUser)`, wrapped in its own try/catch,
with the email send left unconditional, and that every locale file carries
the two new keys with the same placeholder tokens as their email
counterparts.

Thanks to CondensedTea and xet7 !

Closes #3136,
2026-09-10 20:32:27 +03:00
Lauri Ojansivu 2e752c1e96 Extract the OIDC RP-Initiated Logout URL builder into a pure, tested helper.
#2905 asked for Single Logout (SLO): logging out of Wekan should also end the
identity provider's own SSO session for OIDC/OAuth2 providers that support
RP-Initiated Logout (e.g. Keycloak's
/realms/<realm>/protocol/openid-connect/logout), via the optional
OAUTH2_LOGOUT_ENDPOINT env var. This was already implemented for #6158
(getOauthLogoutUrl() in server/models/settings.js, wired into
config/accounts.js's onLogoutHook(), documented in
docs/Features/Login/Keycloak/Keycloak.md and the docker-compose.yml OAuth2
example blocks) - when unset (the default), logout is unchanged.

The URL-building logic lived inline in the Meteor method, so it had no direct
test coverage. Extracted it to server/lib/oauthLogoutUrl.js's
buildOauthLogoutUrl(), a plain-Node pure function (endpoint/serverUrl/
clientId/redirectUri in, the end_session URL out - or '' when endpoint is
unset), following the same pattern as server/lib/ldapPasswordLoginGuard.js.
getOauthLogoutUrl() now just calls it; behavior is unchanged.

Added tests/oauthLogoutUrl.test.cjs covering: the default no-op when
OAUTH2_LOGOUT_ENDPOINT is unset/empty, a Keycloak-shaped path endpoint
resolved against OAUTH2_SERVER_URL (with and without a trailing slash), an
absolute endpoint that ignores serverUrl, an endpoint that already carries a
query string, optional client_id/post_logout_redirect_uri, and percent-
encoding of the redirect URI.

Thanks to Dzordzu and xet7 !

Closes #2905,
2026-09-10 20:27:34 +03:00
Lauri Ojansivu 5605e08dd9 Add a board-wide "sticky list headers" toggle to the List hamburger menu.
A list's cards scroll inside .list-body (overflow-y: scroll), a sibling
AFTER .list-header rather than a child of it, so the header already stays
put in the ordinary bounded-height board layout. Add Boards.stickyListHeaders
(default false) and position: sticky on .list-header when it is on, so the
header also stays pinned in any layout where .list itself turns out to be
the actual scrolling ancestor instead. The toggle is board-wide - freezing
one list's header while its neighbours scrolled normally would look
inconsistent - but it is exposed from each List's own hamburger menu
(listActionPopup) for discoverability, next to Set WIP Limit.

Thanks to JFa-Orkis and xet7 !

Closes #3847,
2026-09-10 20:14:09 +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 fb761c7f10 Update changelog. 2026-09-10 19:50:55 +03:00
Lauri Ojansivu 17c6d8d9b9 Update changelog. 2026-09-10 19:47:15 +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 6e36dcabe5 Add an audio ding when a checklist item is checked off.
A short, synthesized Web Audio tone (OscillatorNode + GainNode envelope)
plays when a checklist item transitions from unchecked to checked, gated on
a new per-user Member Settings preference ('profile.checklistDingSound'),
off by default. The sound is synthesized rather than a bundled audio file,
since a previously proposed bundled sound was not copyfree/MIT/BSD-licensed
and was rejected for that reason.

Thanks to C0rn3j and xet7 !

Closes #5427,
2026-09-10 19:05:55 +03:00
Lauri Ojansivu ce1cbf6fff Move minicard title to the top; add a whole-minicard collapse caret
The title used to render after the dates/cover/upload-progress block. It
now renders first, right after the drag handle and details-menu button, so
it stays visible regardless of collapse state.

A caret at the minicard's top-left corner - the same caret-down/caret-right
convention already used for list, swimlane and per-checklist folding, with
the same accessibility attributes (role="button", tabindex, aria-expanded)
as the per-checklist caret on the minicard itself - collapses everything
except the caret and title: dates, cover, upload progress, labels, custom
fields, assignees/members, checklists, badges, description, list name and
parent-task prefix/subtext. The details-menu button and the optional drag
handle render before the caret/collapse guard, so they stay reachable
either way.

State persists the same way list collapse already does:
Utils.getCardCollapseState/setCardCollapseState (client/lib/utils.js) check
a Session cache first, then profile.collapsedCards on the user document
(models/users.js, server method in server/models/users.js) - deliberately
with no anonymous/cookie fallback, since a public board can have far more
cards than lists and a per-card cookie entry per anonymous visitor would
grow without bound; an anonymous visitor's fold still works for the
session, it just does not survive a reload.

Thanks to xet7 !
2026-09-10 18:02:10 +03:00
Lauri Ojansivu 59bed92f32 Revert "Hardcode list width to 240px and remove the width/height set-value popups"
This reverts commit 8614949580.

Restores the per-user/per-list resizable list width (drag-resize handle, the
"Set width" list-menu popup, the board-settings "Personal list width"
sidebar toggle, and the auto-width mode) and the "Set swimlane height"
popup, at the maintainer's request.

Thanks to xet7.
2026-09-09 00:17:38 +03:00
Lauri Ojansivu 8614949580 Hardcode list width to 240px and remove the width/height set-value popups
List width is now a single hardcoded constant (models/lib/listWidth.js,
240px) applied to every list on every board for every viewer. This
replaces the #5659/#5729/#6409 model built up over time: a personal
per-user width, a per-list shared width, a viewer-toggled "same width for
all lists" mode, and a viewer-toggled auto-width mode. All of it - the
"Set width" list-menu popup, the board-settings "Personal list width"
sidebar toggle, the drag-resize handle, and every schema field and Meteor
method behind them - is removed rather than left dead.

The "Set swimlane height" menu popup goes too, as a redundant text-input
alternative to the working drag-resize handle from the swimlane-resize fix
earlier this release; that drag handle itself is untouched.

Two knock-on fixes this surfaced: models/wekanCreator.js was still mapping
the now-removed allowsPersonalListWidth/autoWidth board fields on WeKan
JSON import, which would have failed schema validation on any import; and
the CloneBleed security-regression test's applyListWidth sub-suite tested
a method that no longer exists, replaced with a comment pointing at
tests/listWidthDefaults.test.cjs's negative coverage of the removal.

tests/listWidthPopupLayout.test.cjs and
tests/playwright/specs/38-fixed-list-width.e2e.js tested only the removed
feature and are deleted outright; listWidthDefaults.test.cjs and
listWidthDuringDrag.test.cjs are rewritten/adjusted for the new model.

Thanks to xet7.
2026-09-08 17:49:26 +03:00
Lauri Ojansivu f07e2e69b7 Revert branding and board background images to external URLs
Restore editable external image URL fields for the login logo, top-left
corner logo, and board backgrounds, and undo the switch to server-side
download-and-convert-to-GIF storage. Uploading is still available as an
option alongside the URL field for boards; instance and Organization
branding again accept a direct image URL. Imports may again carry
Trello's and WeKan's external background URLs. Tests updated to match.
2026-09-08 03:23:28 +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 18fafa5b0c Add Legacy HTML4 card deletion 2026-09-07 16:35:27 +03:00
Lauri Ojansivu d66ef0b37d Add Legacy HTML4 copy many cards 2026-09-07 16:26:45 +03:00
Lauri Ojansivu 9d5866e84c Add Legacy HTML4 card destination operations 2026-09-07 15:42:43 +03:00
Lauri Ojansivu 7f6ccb72f9 Add Legacy HTML4 card date format parity 2026-09-07 12:44:24 +03:00
Lauri Ojansivu 2e300f7f22 Add accessible member invitation and logout 2026-09-07 11:07:35 +03:00
Lauri Ojansivu 4f27463581 Add accessible member avatar page 2026-09-07 10:49:36 +03:00
Lauri Ojansivu b55df82f86 Add accessible member appearance pages 2026-09-07 10:32:42 +03:00