Commit Graph
1396 Commits
Author SHA1 Message Date
Lauri Ojansivu 73128dd7fc Add a per-checklist automatic-reset schedule (daily/weekly/monthly).
A checklist can now be set to automatically uncheck all of its items on a
recurring schedule via Checklists.resetInterval ('none' by default, or
'daily'/'weekly'/'monthly') and Checklists.lastResetAt. The due-date
arithmetic is a pure, unit-tested module
(models/lib/checklistResetSchedule.js), and the periodic scan
(server/checklistResetSchedule.js) reuses the existing quave:synced-cron
infrastructure server/scheduledRules.js already registers a job on, running
hourly to uncheck items of checklists whose interval has come due.

Thanks to travelg and xet7 !

Closes #3818,
Closes #4729.
2026-09-10 20:20:35 +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 a9dd6b05b0 Add a My Attachments page to the member menu.
A third sibling of My Cards / My Due Cards: every attachment the current
user has uploaded, across every board they can see (their own boards, and
public ones), in one place. The menu entry sits right after My Due Cards
(client/components/users/userHeader.jade), and its own route (/my-attachments,
config/router.js) renders a dedicated page
(client/components/main/myAttachments.jade/.js) grouped board > swimlane >
list > card, reusing the same "open the card in place" popup mechanism
myCards.js's .js-minicard handler uses (#3640) so a click never navigates
away and loses the reader's place in a list spanning many boards.

The new `myAttachments` publication (server/publications/cards.js) filters
by BOTH the uploader (this user's own attachments only) and board visibility,
using the same boardVisibilitySelectors() the All Boards list and the board
publication already use (GHSA-gwc4-fw7p-gw58) rather than a hand-rolled
duplicate - so an attachment on a board the user cannot see is never
published, even if its userId field somehow matches. The query shape itself
lives in a small pure module, models/lib/myAttachmentsQuery.js, so it is
unit-tested without a database.

Thanks to Jieiku and xet7 !

Closes #3461,
2026-09-10 20:07:59 +03:00
Lauri Ojansivu 4eb54caca8 CHANGELOG: global admin board takeover, and #3249's other three asks.
Thanks to relikd and xet7 !
2026-09-10 20:05:47 +03:00
Lauri Ojansivu 4d9282359e Let a global Admin Panel admin edit/delete any board, not only their own.
A board's own admin/member could leave the organization (or be removed)
and leave nobody - not even a global site admin - able to edit its
settings, add members to it, or archive/delete it: Boards.allow's
update/remove rule only checked board.hasAdmin(userId) against the
board's own member list. inviteUserToBoard already had a bypass for
Meteor.user().isAdmin; the whole-board update/remove rule did not.

server/lib/utils.js gets isBoardAdminOrSiteAdmin (pure, unit-tested) and
allowIsBoardAdminOrSiteAdmin (the async Meteor.users-aware wrapper), and
server/permissions/boards.js's update/remove rules now use it instead of
the board-only allowIsBoardAdmin. Scoped to the whole-board rule only -
the narrower rules/actions/triggers/comments allow rules keep the
board-only check, pinned by a negative test.

Thanks to relikd and xet7 !
2026-09-10 20:04:07 +03:00
Lauri Ojansivu e643f0da71 Add a direct card link and {card}/{cardLink}/{list}/{board}/{member}
template tokens to the Rules "send an email" action.

The "send an email" rule action sent a bare message with no reference to
the card that triggered it - no title, no link, and no way to pull in the
list, board or triggering member. performAction() already builds a
ruleVars map and substituteVars() already replaces {name} tokens in email
subject/body (added for #2475), so this extends that existing mechanism
rather than building a new one:

- {cardLink} resolves via Card.absoluteUrl() (models/lib/cardUrl.js), the
  same helper card activity notification emails already use, so no new
  URL-building code is needed.
- {member} resolves the activity's memberId (the member added/removed/
  etc.) falling back to the acting user when the activity records none.
- {card}/{list}/{board} are short aliases of the existing cardname/
  listname/boardname/username variables, documented next to the email
  fields via a new r-email-vars-hint hint text so the tokens are
  discoverable without external docs.
- Independently of any template the user configures, the card's title and
  link are now always appended to the sent email body, so #3301's core ask
  (a direct link to the card) holds even for a rule someone set up before
  this change with no tokens at all.

substituteVars() moves out of server/rulesHelper.js into a new pure
models/lib/ruleVarsSubstitute.js so it can be unit tested directly, the
way models/lib/cardUrl.js next to it already is; tests/ruleEmailVars.test.cjs
covers token substitution (including case-insensitivity, unknown tokens
left as literal text, and malformed braces not being mistaken for tokens),
the automatic card-link footer, and that the new hint text is present and
translated.

Thanks to vossilius and ivan-paleo and xet7 !

Closes #3304,
Closes #3301,
2026-09-10 20:02:54 +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 af847bd088 Let a Worker check/uncheck a checklist item without editing or deleting it.
A Worker's checkbox was gated behind the same canModifyCard/write check that
also gates editing and deleting a checklist item, so it never drew a
clickable box at all - the server's allow rule refused the write too. Give
checking/unchecking its own, narrower capability (like the existing
move/self-assign carve-out for cards, models/lib/workerCardWrite.js): a
Worker may $set isFinished and nothing else on a checklist item
(models/lib/workerChecklistItemToggle.js), enforced field by field in
server/permissions/checklistItems.js. The client mirrors it with
Utils.canCheckChecklistItem / the canCheckChecklistItem Blaze helper, so
client/components/cards/checklists.jade now draws the checkbox under that
helper while everything else on the row (title edit, drag handle, due-date
edit, delete) still requires the full write capability.

Thanks to mweiss237 and xet7 !

Fixes #3307,
2026-09-10 20:00:09 +03:00
Lauri Ojansivu 1c97bbac85 Add a "Remove all labels" rule action.
WeKan's IFTTT-style Rules already had per-label "add label X" / "remove
label X" card actions (models/cards.js addLabel/removeLabel, wired in
server/rulesHelper.js and the label dropdown in
client/components/rules/actions/cardActions.jade/.js). Removing every
label from a card required one "remove label" action per label.

Card.removeAllLabels() sets labelIds to an empty array in one update
(a card with no labels is a no-op), and a new "Remove all labels" rule
action (actionType 'removeAllLabels', no label-selection sub-field)
calls it from a new dropdown entry next to the existing label actions,
mirroring the existing "Remove all members" action's wiring.

Thanks to Southclaws and xet7 !

Closes #3432,
2026-09-10 19:59:11 +03:00
Lauri Ojansivu 520b2e412e Add Admin Panel / People "Last active" presence for #3678 and #3734.
Both issues ask the same question: which users are actively using WeKan,
and for how long. The `lastConnectionDate` field already existed on the
user schema but was only ever written from a commented-out, env-gated
block in server/publications/users.js - so WeKan never actually recorded
it. Accounts.onLogin now stamps it on every successful login
(server/lastActiveOnLogin.js), and an open client session refreshes it
every two minutes via a `usersHeartbeat` method
(client/lastActiveHeartbeat.js, server/methods/lastActiveHeartbeat.js) -
a periodic timestamp, not a WebSocket/real-time presence system, which is
more than either issue asked for.

Admin Panel / People gets a "Last active" column showing each user's
timestamp with an online-now badge when it is within five minutes
(models/lib/lastActive.js holds the pure recency check, reused by the
unit test). "Last active" and "Online now" are added to en.i18n.json and
translated into 203 other locale files; the remaining minority keep the
English source as the untranslated-everywhere placeholder.

Thanks to eccaw and xet7 !

Closes #3678,
Closes #3734,
2026-09-10 19:59:02 +03:00
Lauri Ojansivu bc91db9e27 Add Open Graph meta tags to public card pages for link previews.
A card URL pasted into Discourse, Slack, Discord etc. now renders an inline
preview: a connect middleware sets request.dynamicHead (the same injection
point Meteor's WebApp boilerplate generator already supports, following the
precedent in server/routes/customHeadAssets.js) with og:title,
og:description, og:url and og:image tags for the '/b/:boardId/:slug/:cardId'
route, before Meteor's normal SPA shell is served. The tags are only ever
built when the card's board is public (board.isPublic()) - a private board's
card serves the normal, unmodified page, since an unfurl request carries no
auth. The gating and rendering logic lives in server/lib/cardOgTags.js as a
Meteor-free pure module with unit + negative test coverage.

Thanks to yelloff and xet7 !

Closes #3456,
2026-09-10 19:56:48 +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 d4876eca3b CHANGELOG: add the Group by Assignee board view.
Thanks to xet7 !
2026-09-10 19:42:08 +03:00
Lauri Ojansivu 8dad0d0506 Add a "Group by Assignee" board view for team-meeting-friendly overviews.
Group cards by assignee, clustered under each assignee's name as a
heading, for a read-only overview well suited to a team stand-up. A
card with several assignees appears under each; a card with none falls
into "No assignee". Reuses the same grouping/translation fold the
Dashboard and Time views already use (models/lib/chartCalculations.js's
NO_ASSIGNEE_GROUP/translateGroupLabel), now generalized into
computeCardsByAssigneeGroup, which returns the grouped cards themselves
rather than a count/hours total. Wired end to end like every other
board view: a "Group by Assignee" Board View menu entry, an
isViewGroupByAssignee() helper/boardBody.jade branch, the
client/lib/utils.js whitelist, the profile.boardView schema, and a
tooltip-name-map entry. Each card row is a simple title + due date +
overtime marker, deliberately not a minicard re-render, and clicking a
card navigates to it like any other view - no drag-and-drop, no export.

Thanks to xet7 !

Closes #4688,
2026-09-10 19:41:33 +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 070a1ad10b Add hours-by-assignee/card breakdown and PDF/Excel export to Time view
#812's 39-comment thread repeatedly asked for external timesheet
integrations (Kimai, Harvest, Titra) that were never resourced - the
maintainer's own 2021 comment quotes a ~1000 EUR / 4-month estimate for a
Kimai sync, shelved shortly after. What the thread DID converge on that
fits inside WeKan itself: "reporting total hours by resource and task
type" (the issue's own words), and export - both added here without any
external service.

server/lib/boardChartData.js answers a new 'time' chartKey with
computeTimeByGroup (models/lib/chartCalculations.js: sums each card's
spentTime per assignee, not a card count - the same shape as
computeDashboardGroups but summing a value instead of counting cards) and
computeTimeByCard (one row per card with logged time, largest first),
scoped to non-archived cards like the Time view's existing summary. 'time'
is registered as a real chartKey in models/exportCharts.js and
models/lib/chartExportRows.js, so it reuses the exact same
/api/boards/:boardId/charts/:chartKey/export* PDF/Excel routes and
ExporterChartPDF/ExporterChartExcel every other board report chart already
uses - one export pipeline, not a second one just for Time. The Time board
view calls the same boardChartData method (chartKey 'time') the 10 report
charts already use and shows the same two breakdowns alongside its
existing 3-row summary, kept exactly as it was.

Thanks to xet7 !

Closes #812,
2026-09-10 19:00:20 +03:00
Lauri Ojansivu b33e2e1beb Translate the Dashboard's "none" group label; fix an invisible chart canvas
The Dashboard view's By Assignee/By Label bars grouped a card with no
assignee or label under the literal English word "none" - untranslated in
every language, on the live chart, the data table, and the PDF/Excel
export alike (models/lib/chartCalculations.js's computeDashboardGroups
hardcoded {key: 'none', label: 'none'}). Two sentinel keys
(NO_ASSIGNEE_GROUP/NO_LABEL_GROUP) plus a shared translateGroupLabel()
replace it with a real "No assignee"/"No label", translated into all 245
locales directly (not left as English placeholders), everywhere that group
label is rendered: server/lib/boardChartData.js (the server chart-data
loader both the live view and the exporters read from),
models/lib/chartExportRows.js (the shared PDF/Excel/data-table shape), and
client/components/boards/charts/boardCharts.js (the live Chart.js bars).

Also fixes a board report chart (reported: Burndown) rendering its export
buttons and table but no visible chart: the `<canvas>` boardCharts.js draws
into only exists once isLoading/hasNoData flip Blaze's jade conditional to
its "else" branch - a sibling reactive change driven by the SAME chartData
update the chart-building autorun also depends on, with no guaranteed
ordering between the two Tracker computations. The very first successful
data load could run the chart-building body before Blaze patched the DOM;
templateInstance.find() silently returned null, no chart was ever built,
and nothing triggered a retry. The canvas lookup is now deferred with
Tracker.afterFlush so it always runs after the DOM has actually been
patched.

Also removes three dead <link> tags in gantt.jade pointing at
gantt.css/ganttCard.css/boardCharts.css's raw source path - all three are
already loaded through the normal bundler import (client/features/gantt.js,
client/features/boards.js), and the runtime <link> to the unserved source
path 404'd as text/html, pure console noise on every Gantt page load.

Thanks to xet7 !
2026-09-10 18:29:40 +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 fb895847b8 Fix PDF search indexing: wrong object destroyed, missing font/cmap assets
Every PDF upload logged "Document search indexing failed: TypeError:
textDocument.destroy is not a function" and left that PDF's contents
unsearchable. pdfjs-dist's getDocument() returns a PDFDocumentLoadingTask;
destroy() lives THERE. Its .promise resolves to a PDFDocumentProxy, which
has no destroy() of its own - calling it on that object throws. The loading
task is now kept and destroyed instead.

Also silences "Ensure that the standardFontDataUrl API parameter is
provided" on every PDF: pdfjs-dist ships its own standard-font metrics and
CJK character maps as plain files in the installed package: point
standardFontDataUrl/cMapUrl at them via the same runtimeResolve trick
already used for the worker file, instead of falling back to an
approximation on every single PDF indexed.

Verified end-to-end against a real uploaded PDF, not just source patterns.

Thanks to xet7 !
2026-09-10 17:28:45 +03:00
Lauri Ojansivu 373980ac8a Restore the full-featured DOCX/XLSX/PPTX viewer and native PDF preview
The minimal server-rendered GIF-slideshow document preview (added this week
to cut dependency weight) kept failing with a bare 415 - its own
rasterization dependency chain (pdf-to-img -> pdfjs-dist's optional
@napi-rs/canvas) needed three separate fixes in a single day for a missing
package, a worker path resolved into the wrong bundle directory, and a stale
stored filename, and still left a text-only fallback as the best case for a
PDF.

Restore the previous full-featured viewer instead: office-open-xml-viewer
(MIT, canvas-based, zero runtime dependencies) renders DOCX/XLSX/PPTX
client-side, and PDF goes back to the browser's own native <embed> viewer -
simpler, zero extra dependencies, and gets the browser's own zoom/search/
print for free.

The server-side full-text search this week's change introduced is kept:
server/lib/documentGif.js now does nothing but extract plain text for the
search index (indexDocumentText, triggered in the background from
Attachments.onAfterUpload) - no rendering, no HTML, no page images - so
pdf-to-img and @napi-rs/canvas are dropped entirely (nothing rasterizes a
PDF page server-side any more) while pdfjs-dist stays, now as a direct
dependency, for its text-only extraction. Searching attachment contents from
the card search box keeps working exactly as before.

Thanks to xet7 !
2026-09-10 16:59:42 +03:00
Lauri Ojansivu 64adab5aa6 Fix #6685: document preview 415 from a stale stored name on disk
After the pdf.worker.mjs fix, opening the PDF preview still failed with a
415, now logging "Attachment image stream is unavailable" from
boundedStreamBuffer: getFileStrategy(attachment, 'original').getReadStream()
returned nothing. The regular attachment download route repairs a stored
name/extension that has drifted from what is actually on disk
(normalizeStoredNameOnRead, fs-path-heal) before it reads the file;
authorizedDocument (shared by all three /document-preview/* routes) never
did, so getReadStream() could resolve the wrong path for an attachment whose
name needed that repair, even though the very same attachment downloads and
previews fine as a plain image.

Thanks to rmb82 and xet7 !
2026-09-10 16:34:10 +03:00
Lauri Ojansivu eb98abe4b2 Fix #6685: PDF preview 415 from pdfjs guessing the worker's bundled path
Opening the PDF slideshow viewer on an attached PDF still failed with a 415
after the previous #6685 fix, now with the real error visible:
"Setting up fake worker failed: Cannot find module
'.../_build/main-dev/pdf.worker.mjs'". pdfjs-dist's Node fake-worker
fallback locates pdf.worker.mjs relative to import.meta.url of the module
that imported it; under the bundled server (_build/main-dev,
_build/main-prod) that URL points into the bundle output, not into
node_modules, so the fallback looked for the worker beside the bundled
server.cjs and never found it - every PDF preview failed, image and text
alike, not only the rasterized-image path the earlier fix addressed.

Point GlobalWorkerOptions.workerSrc at the real on-disk file via Node's own
module resolution (the same runtimeRequire trick already used for fflate)
so pdfjs never falls back to guessing. pdf-to-img imports the same single
pdfjs-dist instance, so this also fixes its internal rasterization.

Thanks to rmb82 and xet7 !
2026-09-10 16:28:51 +03:00
Lauri Ojansivu 9b9c2fe6e4 Fix PDF/DOCX/XLSX/PPTX preview 415 when the optional canvas dep is missing
pdf-to-img rasterizes PDF pages through pdfjs-dist's optionalDependency
@napi-rs/canvas. A Docker/Snap build that skips optional dependencies, or
lacks a prebuilt binary for its target architecture, then throws on the
very first PDF preview - "Cannot load @napi-rs/canvas", "Cannot polyfill
DOMMatrix" - which the generic catch in server/routes/universalFileServer.js
turned into a bare 415 with the real error never logged.

@napi-rs/canvas is now a direct dependency so it installs the same way
every other required package does. Rasterization is also no longer
all-or-nothing: pdfjs-dist's text extraction does not need canvas, so when
rasterizing still fails for any reason the PDF preview now degrades to
text-only pages (dropped images, kept text) instead of failing outright -
the same graceful degradation the minimal viewer already applies to an
unreadable embedded image in a DOCX/PPTX/XLSX. The three document-preview
routes now log the caught error before returning 415.

Thanks to rmb82 and xet7 !

Fixes #6685,
2026-09-10 16:22:02 +03:00
Lauri Ojansivu 1e18c824d5 Give the HttpOnly login cookie a fallback expiry
The native useHttpOnlyCookies resume flow only attaches Expires/Max-Age to
meteor_login_token when it can match the freshly issued token back to a
stored resume token in the database at the exact moment the cookie is
written. When that lookup misses, the cookie is written with no expiry at
all, so the browser treats it as a plain session cookie and drops it the
moment the browser closes - silently downgrading the configured 90-day
login into a same-session-only one. http.ServerResponse.prototype.setHeader
is now patched to guarantee a fallback expiry, decided by a pure, tested
helper (server/lib/loginCookieExpiry.js), whenever a Set-Cookie header for
that cookie carries neither directive.

This hardens the failure mode that best matches #6684, but has not been
confirmed as its root cause from a live browser-restart reproduction; the
issue stays open pending that.

Thanks to markusst1982 and xet7 !
2026-09-10 16:21:52 +03:00
Lauri Ojansivu 3abc1078c2 Implement the 10 board report charts and Gantt/chart PDF+Excel export.
The Board View menu's Dashboard, Burndown, Burnup, Cumulative Flow, Control
Chart, Lead/Cycle Time, Flow Efficiency, Throughput Histogram and WIP Run
entries opened a plain "not implemented yet" page. Each now computes and
renders its chart from this board's own Cards/Lists/Activities, per
docs/Features/Reports/charts.tsv's calculation descriptions - plain HTML/CSS
bars and a data table, no new charting dependency.

Every chart page, and the Gantt view, gets "Export to PDF" / "Export to
Excel" buttons that reuse the existing card/board export renderers
(pdfDocument's line/bar builder, createWorkbook's Excel styling) through the
same public-board / authToken / logged-in-user auth gate every other export
route already uses.

Completion date is card.endAt || card.archivedAt (WeKan has no dedicated
"Done" list flag); WIP Run's limit line only draws when a list's own WIP
limit is enabled (no invented board-level schema); Flow Efficiency's
"active" time is card.spentTime (WeKan does not track per-list queue time).
Each deviation from charts.tsv is documented where the calculation is.

models/lib/chartCalculations.js (20 tests), models/lib/chartExportRows.js
(8 tests) and the export routes' auth shape (10 tests) are covered by
tests/chartCalculations.test.cjs, tests/chartExportRows.test.cjs and
tests/chartExportRoutesAuth.test.cjs; tests/boardViewMenu.test.cjs is
updated for the now-real views. Not verified here: actual Blaze rendering
and generated PDF/XLSX bytes (no browser/Meteor runtime in this
environment) - matched syntactically against statsView/timeView and the
existing exporters.
2026-09-10 15:04:05 +03:00
Lauri Ojansivu e6a894f5fc Give the 4 Attachments/Avatars advisories their own Hall of Fame names.
The upload path-traversal guard was logging under the pre-existing
PathBleed key (a different, already-published advisory,
GHSA-4mxf-m8pq-xc9p about avatar versions.path and board export) - it
now has its own UploadPathBleed key, so the two incidents are not
conflated on the public Hall of Fame page or in Admin Panel / Problems.
The two High advisories (missing Avatars.protected, unauthenticated
serveLegacyAvatar) now also log a blocked attempt, under new
authz.avatar-protected/PortraitBleed and
authz.legacy-avatar/RelicAvatarBleed keys, matching the site entries
added at .tools/wekan.fi.

tests/securityRegressionCoverage.test.cjs's inventory and
tests/attachmentAvatarSecurityAdvisories.test.cjs are updated so all four
names (WipeBleed, UploadPathBleed, PortraitBleed, RelicAvatarBleed) are
recognized as GUARDED, matching the published Hall of Fame count.
2026-09-09 18:15:10 +03:00
Lauri Ojansivu 9947e0138a Fix 4 security advisories in Attachments/Avatars (ostrio:files 3.0.1).
CRITICAL - Unauthenticated Arbitrary File Write via Path Traversal in
Attachment Upload namingFunction: Attachments overrode ostrio:files'
sanitize() to an identity function and used the client-supplied fileId
verbatim as the on-disk file name, so an anonymous upload with
fileId: "../../../../tmp/pwn" could write attacker-controlled content
anywhere the WeKan process can write. sanitize() is restored to the same
whitelist models/avatars.js already used for the same tokens, and
namingFunction now validates the (sanitized) fileId against the ObjectId
shape WeKan itself generates, regenerating a fresh one otherwise.

CRITICAL - Unauthenticated DDP Methods _FilesCollectionRemove_attachments/
_FilesCollectionRemove_avatars Allow Instance-Wide Deletion: ostrio:files
registers its own remove method, gated only by allowClientCode and never
routed through Attachments.allow/Avatars.allow (those only gate the
ordinary Mongo .remove() call). Attachments had no onBeforeRemove at all
and Avatars' unconditionally returned true, so any anonymous DDP caller
could pass selector {} and wipe every attachment or avatar on the
instance. Both now require this.userId and check every matched file:
attachments need the caller's board-write access, avatars need ownership
or site-admin status.

High - Avatars Collection Lacks `protected` Callback: unlike Attachments,
Avatars never set `protected`, so ostrio:files' own library-native
download route (its _checkAccess defaults to allowing everything when
`protected` is unset) served any avatar to anyone, bypassing
isAuthorizedForAvatar entirely. Avatars.protected now mirrors
Attachments.protected: any authenticated caller, or an anonymous one only
when the avatar's owner is on a public board.

High - serveLegacyAvatar Serves Legacy CollectionFS Avatars Without Any
Authentication: both call sites in server/routes/avatarServer.js streamed
a legacy avatar to any caller who knew its old filerecord id, one of them
(/cfs/files/avatars) with no check at all. Both now require an
authenticated caller (isLegacyAvatarAuthorized) - legacy records carry no
owner/board link that can be safely checked for the public-board
exemption current avatars get, so this is deliberately narrower rather
than reusing that exemption on an unverifiable claim.

Both CRITICAL fixes log a blocked attempt through the shared security log
(new authz.file-remove/WipeBleed catalog key, and the existing
authz.file-path/PathBleed key), so Admin Panel / Problems shows an
attempt was made. tests/attachmentAvatarSecurityAdvisories.test.cjs pins
all four fixes and the negative cases (no dangling anonymous bypass, no
regression to the legitimate admin avatar-delete and public-board
redirect flows).
2026-09-09 18:15:10 +03:00
Lauri Ojansivu 5c48be8e67 Add board-wide list-width/swimlane-height resize locks (#6680).
Adds three independent per-board toggles in the top header, right of the
drag-handles toggle:

  - list-width resize lock: left-right arrow icon plus a lock/unlock icon
    that flips when clicked. Locked, the drag-resize handle between lists
    does nothing for anyone on the board.
  - swimlane-height resize lock: same shape, up-down arrow icon, gates the
    drag handle at the top of each swimlane.
  - "same width for all lists": the board-wide equivalent of the existing
    per-user "Set width" popup's fixed-width mode. An admin can force every
    list on the board to one shared width for every viewer, overriding each
    member's own personal choice while it is on.

All three are board settings (models/boards.js: listWidthResizeLocked,
swimlaneHeightResizeLocked, sameWidthForAllLists, sameWidthForAllListsValue),
shown only on a board page and only to board admins (client) - turning a
toggle itself on/off is admin-only on the server too
(server/permissions/boards.js's default allowIsBoardAdmin rule). Dragging
the shared same-width VALUE, though, is allowed for any board member with
write access, via a new sole-field Boards.allow rule
(canUpdateBoardSameWidthValue in server/lib/utils.js) shaped exactly like
the existing canUpdateBoardSort rule: it approves a modifier ONLY when
sameWidthForAllListsValue is the one field touched, so a lower-privilege
member can never smuggle another board field into the same update.

client/components/lists/list.js's canResizeList/effectiveListWidth/
saveListWidth and client/components/swimlanes/swimlanes.js's resize
startResize are the actual enforcement points - the lock is checked before
a drag can start, and the board-wide fixed width takes priority over each
viewer's personal fixed-width mode.

Added the 3 new tooltip strings to all 235 locale files (not just English),
per this repo's translation policy; a handful of lower-resource languages
(Klingon, Wolof, Cherokee, and similar) were translated with lower
confidence and will be replaced by a human Transifex translation
automatically when one arrives. tests/listSwimlaneResizeLock.test.cjs pins
the schema, the header wiring, the permission rule shape, and that each
resize handle actually checks its lock.

Thanks to Hallsie and xet7.

Fixes #6680,
2026-09-09 01:30:08 +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 d27e22d120 Add Legacy HTML4 card history 2026-09-07 16:17:05 +03:00
Lauri Ojansivu 88e6c3b594 Add Legacy HTML4 card transfers 2026-09-07 15:54:28 +03:00
Lauri Ojansivu 9d5866e84c Add Legacy HTML4 card destination operations 2026-09-07 15:42:43 +03:00
Lauri Ojansivu 6a4ce04e2b Add Legacy HTML4 Trello API imports 2026-09-07 15:19:09 +03:00
Lauri Ojansivu c0492e13d3 Preserve Trello workspaces in Legacy HTML4 imports 2026-09-07 15:02:48 +03:00
Lauri Ojansivu 80dd9585d1 Add HTML4 import member mapping 2026-09-07 14:09:06 +03:00
Lauri Ojansivu a5acea6fde Protect Legacy HTML4 linked card content 2026-09-07 13:32:36 +03:00
Lauri Ojansivu 59e4f1fe2f Honor Card Settings in Legacy HTML4 2026-09-07 13:05:14 +03:00
Lauri Ojansivu 86bf8dca86 Identify card covers in Legacy HTML4 2026-09-07 12:56:12 +03:00
Lauri Ojansivu 5473560929 Show card numbers in Legacy HTML4 titles 2026-09-07 12:50:17 +03:00
Lauri Ojansivu 7f6ccb72f9 Add Legacy HTML4 card date format parity 2026-09-07 12:44:24 +03:00
Lauri Ojansivu cde8d53f47 Add accessible HTML4 media previews 2026-09-07 12:22:52 +03:00
Lauri Ojansivu 7ccc0d0202 Add accessible HTML4 text previews 2026-09-07 12:16:22 +03:00