Commit Graph
315 Commits
Author SHA1 Message Date
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 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 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 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 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 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 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 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
Lauri Ojansivu 9ec3723fe6 Share Legacy HTML4 status component 2026-09-07 12:08:24 +03:00
Lauri Ojansivu 915eec906f Add semantic Legacy HTML4 not found page 2026-09-07 11:59:14 +03:00
Lauri Ojansivu 39671b13e5 Add accessible HTML4 document previews 2026-09-07 11:53:41 +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
Lauri Ojansivu 7bfd843746 Add accessible member settings page 2026-09-07 10:22:11 +03:00
Lauri Ojansivu 5e8946c468 Add accessible member password page 2026-09-07 10:18:11 +03:00
Lauri Ojansivu fc182fb079 Add accessible member language page 2026-09-07 10:13:13 +03:00
Lauri Ojansivu 8c36df39e1 Add shared accessible member profile 2026-09-07 10:07:59 +03:00
Lauri Ojansivu 9fdb7d8a66 Add Legacy HTML4 account token flows 2026-09-07 09:58:46 +03:00
Lauri Ojansivu 16a99ec186 Add Legacy HTML4 password recovery 2026-09-07 09:48:15 +03:00
Lauri Ojansivu 119c7f796f Complete Legacy HTML4 attachment settings 2026-09-07 09:41:53 +03:00
Lauri Ojansivu fdac604fcf Add Legacy HTML4 database migration 2026-09-07 09:35:48 +03:00
Lauri Ojansivu d394b5629d Add Legacy HTML4 cloud attachment storage 2026-09-07 09:30:37 +03:00
Lauri Ojansivu 3fb1914998 Add Legacy HTML4 local attachment storage 2026-09-07 09:23:45 +03:00
Lauri Ojansivu b7ef4dd92f Add Legacy HTML4 attachment movement 2026-09-07 09:19:18 +03:00
Lauri Ojansivu 0733793039 Add Legacy HTML4 attachment storage controls 2026-09-07 09:14:37 +03:00
Lauri Ojansivu 552583412f Complete Legacy HTML4 People operations 2026-09-07 09:03:00 +03:00
Lauri Ojansivu 3b6a1d6354 Share secure People creation and editing 2026-09-07 08:49:58 +03:00