mirror of
https://github.com/wekan/wekan.git
synced 2026-11-23 12:45:04 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
183ced3106 | ||
|
|
2f65e04748 | ||
|
|
a39a1b227c | ||
|
|
938689d594 | ||
|
|
5471f416e1 | ||
|
|
4dde05662f | ||
|
|
9da7639123 | ||
|
|
46da0ba75a | ||
|
|
f533d16aca | ||
|
|
0e2fb14856 | ||
|
|
df965e7dab | ||
|
|
52e6453e5a | ||
|
|
ef3163dfcc | ||
|
|
1c99a6bf29 | ||
|
|
d32f30941c | ||
|
|
72615db30a | ||
|
|
d7701ffd56 | ||
|
|
f35b828ef9 | ||
|
|
c4d0e41a5f | ||
|
|
8904a84488 | ||
|
|
e3acbceae4 | ||
|
|
a34f977968 | ||
|
|
82c067855a | ||
|
|
15add8144d | ||
|
|
530b6b8619 | ||
|
|
b957af7402 | ||
|
|
8617782dfa | ||
|
|
378aff443c | ||
|
|
5fe04bfb67 | ||
|
|
cd3e5ec7e2 | ||
|
|
b9529540cd | ||
|
|
a1932a2a42 | ||
|
|
4d3d12ff97 | ||
|
|
081d2d919f | ||
|
|
8dc88d96d1 | ||
|
|
c767eafa97 | ||
|
|
9836304f0b | ||
|
|
28cae50f02 | ||
|
|
febd5cf16a | ||
|
|
89d946cde4 | ||
|
|
b7d36b0bf4 | ||
|
|
5f38b7a80e | ||
|
|
590cafcd5d | ||
|
|
d2e9340471 | ||
|
|
acd353f154 | ||
|
|
74df995e7d | ||
|
|
540f5ec5d4 | ||
|
|
ecbfb856e6 | ||
|
|
c7d6d3e490 | ||
|
|
620dadbf5e | ||
|
|
f22985a9ad | ||
|
|
d1cb4e3516 | ||
|
|
cd9aae2d88 | ||
|
|
5f8a7cf482 | ||
|
|
287d08fbe5 | ||
|
|
9a4fd217f3 | ||
|
|
cc5b8f311a | ||
|
|
ebc5071835 | ||
|
|
a8c9e08aa2 | ||
|
|
9524bb7b65 | ||
|
|
7a1fe9f42d | ||
|
|
73469e2d37 | ||
|
|
8de8a5aa67 | ||
|
|
03bd5d6ae6 | ||
|
|
18831b501e | ||
|
|
9fab402b4a | ||
|
|
342d2871e3 | ||
|
|
7e5ff7dea5 | ||
|
|
3474d6ef45 | ||
|
|
7829f10089 | ||
|
|
eb832428cd | ||
|
|
9097bc17f6 | ||
|
|
713176878c | ||
|
|
cb1b30c25d | ||
|
|
0675109501 | ||
|
|
b71bcdecf1 | ||
|
|
e51cdd3ba5 | ||
|
|
7e2bde2cce | ||
|
|
fabf89355f | ||
|
|
49912490dc | ||
|
|
c977c6f649 | ||
|
|
5e4fcf78d1 | ||
|
|
fd8f265b3d | ||
|
|
19d0d1dd17 | ||
|
|
679d2d8549 | ||
|
|
f892edd08c | ||
|
|
cd6f572d40 | ||
|
|
1caa26ee5c | ||
|
|
16b8d496ea | ||
|
|
7d1e6ddbdb | ||
|
|
14aee38339 | ||
|
|
a5b46cfd11 | ||
|
|
72c54bb77d | ||
|
|
133e84c185 | ||
|
|
daabd51426 | ||
|
|
926250b1df | ||
|
|
3721b8b31d | ||
|
|
780a76ed10 | ||
|
|
7ab3417446 | ||
|
|
f0601b6cfb | ||
|
|
a158f12b1b | ||
|
|
207f737da4 | ||
|
|
66bedb80a7 | ||
|
|
1306e1b98e | ||
|
|
933fb07d04 | ||
|
|
c48a51f727 | ||
|
|
5c13a21df8 | ||
|
|
36695df2a5 | ||
|
|
b379bb53db | ||
|
|
8da1088c59 | ||
|
|
8ea6a96a0a | ||
|
|
8358b2227b | ||
|
|
e1b10f883e | ||
|
|
51eea5c444 | ||
|
|
93cc236fea | ||
|
|
8ee8cb73fe | ||
|
|
d623c9802b | ||
|
|
52a056160d | ||
|
|
eeacb60455 | ||
|
|
7d356b5e19 | ||
|
|
321c0925c9 | ||
|
|
6ca0dff202 | ||
|
|
f3a0476c00 | ||
|
|
ecf63b0ccc | ||
|
|
0bf3f94458 | ||
|
|
185570c6a4 | ||
|
|
259ba4939c | ||
|
|
f794709270 | ||
|
|
1abb202030 | ||
|
|
070c72759a | ||
|
|
ac7c3d93fe | ||
|
|
165326abca | ||
|
|
20ac1563ee | ||
|
|
8a8b5e8b09 | ||
|
|
4015192f16 | ||
|
|
3dd68d3e65 | ||
|
|
9d44b3f3e2 | ||
|
|
1083b52a36 | ||
|
|
9f22d02b5d | ||
|
|
c7b48bce2f | ||
|
|
82042473a9 | ||
|
|
6fbbb83cd2 | ||
|
|
df16bc55de | ||
|
|
c90bbbcd30 | ||
|
|
cdf4da3d8d | ||
|
|
d2b40f64df | ||
|
|
030a9e4a29 | ||
|
|
7f12264542 | ||
|
|
83189de8ca | ||
|
|
f5181faf77 | ||
|
|
3a4e889957 | ||
|
|
e039e1716a | ||
|
|
9e8bdc5381 | ||
|
|
0d74e6ec25 | ||
|
|
136fdebf96 | ||
|
|
8892734fa9 | ||
|
|
493af44998 | ||
|
|
04436a739d | ||
|
|
0aa3d0b9d6 | ||
|
|
bad1407412 | ||
|
|
70769674d6 | ||
|
|
bfd83d09b6 | ||
|
|
02baa650fe | ||
|
|
94c598dd6b | ||
|
|
377a7b3abc | ||
|
|
0e8d3e5683 | ||
|
|
64ed512467 | ||
|
|
4364c7d008 | ||
|
|
99ab728ff9 | ||
|
|
98b8a76bca | ||
|
|
f4439cb285 | ||
|
|
f6dcb7aade | ||
|
|
3690697c56 | ||
|
|
94c0ee6437 | ||
|
|
47fc873e1d | ||
|
|
bdaad563ac | ||
|
|
4c86108dcb | ||
|
|
85c057de8c | ||
|
|
acbc4e0222 | ||
|
|
db43260918 | ||
|
|
52a51148cd | ||
|
|
7377724b6b | ||
|
|
2beb52cea8 | ||
|
|
55ed7065ff | ||
|
|
ed7aa22642 | ||
|
|
ac856dd38f | ||
|
|
c5b3b597e8 | ||
|
|
68dcfd14fe | ||
|
|
8f5a091b22 | ||
|
|
57a24eb8ba | ||
|
|
3c00120c32 | ||
|
|
22bfe054bb | ||
|
|
24be123ee5 | ||
|
|
705f12e754 | ||
|
|
942d1f022c | ||
|
|
9e01b2db1a | ||
|
|
bfa0748518 | ||
|
|
c7fa0e3e84 | ||
|
|
681927309e | ||
|
|
e16e698b5c | ||
|
|
d076911d93 | ||
|
|
3e6a5fdf5e | ||
|
|
75f02d9c32 | ||
|
|
04c5b399aa | ||
|
|
407ad71e28 | ||
|
|
a65fe52a2d | ||
|
|
2dbc2a30be | ||
|
|
80b70100bb | ||
|
|
dfbd1a6d18 | ||
|
|
17fdad790a | ||
|
|
6bb55652ec | ||
|
|
f4264cf7a9 | ||
|
|
6e7cd35eda | ||
|
|
bea184b2ea | ||
|
|
80b45a4c58 | ||
|
|
688760a402 | ||
|
|
124b61f286 | ||
|
|
2f9fb01ff1 | ||
|
|
90e1da878d | ||
|
|
87a283cb29 | ||
|
|
49666d2abb | ||
|
|
150a470e58 | ||
|
|
910239b53f | ||
|
|
9e97f5119d | ||
|
|
c9b297d976 | ||
|
|
74717ea829 | ||
|
|
acd6c500e5 | ||
|
|
a8d9e271fe | ||
|
|
a28cd22db7 | ||
|
|
601c04504e | ||
|
|
174debbeea | ||
|
|
33a3e2f8a3 | ||
|
|
698b65b94a | ||
|
|
193baae902 | ||
|
|
89af889874 | ||
|
|
c66af0e134 | ||
|
|
4a016735cb | ||
|
|
d894858793 | ||
|
|
70d767208d | ||
|
|
77dc56591d | ||
|
|
c8397afbfc | ||
|
|
d7af7a3a66 | ||
|
|
4599e34518 | ||
|
|
b335c5df07 | ||
|
|
689d538152 | ||
|
|
9372148915 | ||
|
|
e5bfcf0d53 | ||
|
|
3c6427cbfd | ||
|
|
b530f5c1a4 | ||
|
|
81ca7b868b | ||
|
|
a7cd22f94c | ||
|
|
6a5e8360f0 | ||
|
|
53c0fbeba0 | ||
|
|
cd74045a9f | ||
|
|
e9923f28e3 | ||
|
|
d6652f19b7 | ||
|
|
68a2b16739 | ||
|
|
39cd6c4e91 | ||
|
|
6d842a5e2f | ||
|
|
58cc90526e | ||
|
|
d6f3707d59 | ||
|
|
942349f9de | ||
|
|
25e9d02517 |
No files matched your search
@@ -126,3 +126,9 @@ mongo-tools-patches/
|
||||
|
||||
# Generated on the Windows single-EXE runner (releases/append-windows-payload.mjs --manifest)
|
||||
wekan-real-files.h
|
||||
|
||||
# The Meteor 3 hosting menu's settings (docs/Platforms/FOSS/Container/Docker/Meteor3/build.sh): this machine's server name and directory.
|
||||
docs/Platforms/FOSS/Container/Docker/Meteor3/settings.ini
|
||||
|
||||
# Python bytecode of the release scripts (releases/sec/ and others).
|
||||
__pycache__/
|
||||
@@ -270,8 +270,27 @@ replaced with the language named by that tag.**
|
||||
### Shared translation source for WeKan prototypes under `.tools/`
|
||||
|
||||
The WeKan catalogs in `imports/i18n/data/` are the source of truth for
|
||||
translations in every WeKan prototype under `.tools/`, including WeLite,
|
||||
Weddy, Wami, and any future WeKan prototype with its own catalog.
|
||||
translations in every WeKan prototype under `.tools/`, including Omi, Wami,
|
||||
Weddy, WeLite, and any future WeKan prototype with its own catalog. A prototype
|
||||
does not keep translations of its own that WeKan's catalogs do not have.
|
||||
|
||||
Version control translations come from ONE place too:
|
||||
`.tools/w/gitea-patches/dist/translations/gitea-locale/locale_<lang>.json`,
|
||||
upstream Gitea's locale files with gitea-patches' own translations merged in.
|
||||
Only gitea-patches has the complete Finnish, so a prototype never takes its
|
||||
Gitea strings from upstream Gitea directly. Refresh them with gitea-patches'
|
||||
`./build.sh translations` (menu: "Download the newest Gitea translations from
|
||||
upstream") and commit them there.
|
||||
|
||||
So a prototype that needs translations - Omi, Wami, Weddy, WeLite,
|
||||
github-to-gitea and the rest of the WeKan and version control prototypes under
|
||||
`.tools/w/` - COPIES them directly: WeKan's strings from WeKan's catalogs, and
|
||||
Gitea's own things (repositories, issues, pull requests, releases,
|
||||
organizations) from gitea-patches' `gitea-locale`, into its own catalog format.
|
||||
It uses no other translation source. Gitea's strings are NOT added to WeKan's
|
||||
catalogs (decided 2026-11-22: they would grow every WeKan locale file by about
|
||||
45 %). A string that neither has is added to WeKan's catalog, as in step 2
|
||||
below, and is used from there in WeKan and in the `.tools` repositories.
|
||||
|
||||
1. Before adding a translation key in a prototype, search WeKan's English
|
||||
catalog for a key with the same meaning and usage. Reuse that key and its
|
||||
|
||||
+560
-748
File diff suppressed because it is too large.
Load diff
+30
-33
@@ -5,6 +5,36 @@ each one changed and the project status are in
|
||||
Written by `node releases/changelog-short.mjs` from CHANGELOG-big.md:
|
||||
make changes there.
|
||||
|
||||
# v13.29 2026-11-23 WeKan ® release
|
||||
|
||||
**EVERYTHING** tests now run one stage and one worker at a time by
|
||||
default, so a full test run no longer runs the machine out of RAM; the
|
||||
two-worker mode stays available when asked for.
|
||||
|
||||
[All changes in v13.29](CHANGELOG-big.md#v1329-2026-11-23-wekan--release)
|
||||
|
||||
# v13.28 2026-11-23 WeKan ® release
|
||||
|
||||
A board can be a **Shop** with invoices and order email, the
|
||||
**Admin Panel** can be
|
||||
limited to chosen addresses, all **webhooks** can be turned off at once, the
|
||||
**Cloud Panel** exists only in a
|
||||
Cloud Admin container with the `CLOUD` variable (**CloudPanelBleed**), a forged
|
||||
bounce report can no longer stop email (**BounceBleed**), and every setting that
|
||||
turns something off is **refused on the server**. The **audit log**, **sign-in
|
||||
address retention** and a **personal-data inventory** begin the missing law and
|
||||
standard features, and every **feature page** of the docs has one shape.
|
||||
|
||||
[All changes in v13.28](CHANGELOG-big.md#v1328-2026-11-23-wekan--release)
|
||||
|
||||
# v13.27 2026-11-22 WeKan ® release
|
||||
|
||||
**CodeQL** alert #611 is fixed: the **autolink rules** find the
|
||||
links already in a card's text in linear time, so a description built of
|
||||
thousands of brackets no longer takes seconds to render.
|
||||
|
||||
[All changes in v13.27](CHANGELOG-big.md#v1327-2026-11-22-wekan--release)
|
||||
|
||||
# v13.26 2026-11-22 WeKan ® release
|
||||
|
||||
New **Workload and capacity**, **Budget and billing** and **Cloud
|
||||
@@ -26,36 +56,3 @@ point, SandChat user ids come from a cryptographic generator, and the guards
|
||||
that missed these shapes now find them anywhere in the tree.
|
||||
|
||||
[All changes in v13.25](CHANGELOG-big.md#v1325-2026-11-21-wekan--release)
|
||||
|
||||
# v13.24 2026-11-21 WeKan ® release
|
||||
|
||||
Six more of **Microsoft**'s tools are imported and exported under
|
||||
the Microsoft heading: **Azure DevOps Boards**, **Microsoft Lists**,
|
||||
**Microsoft Project** (XML), **Outlook** (.msg in, .eml out), **Teams** and
|
||||
**OneNote**, the last two also fetched from Microsoft Graph. **Sandstorm** grain
|
||||
backups of twelve apps are imported and nine exported, and **Vietnamese** no
|
||||
longer shows Malay text.
|
||||
|
||||
[All changes in v13.24](CHANGELOG-big.md#v1324-2026-11-21-wekan--release)
|
||||
|
||||
# v13.23 2026-11-20 WeKan ® release
|
||||
|
||||
The **Import** page and the **Export** menu list a company's
|
||||
products under the company's name: **37signals**, **Atlassian**, **Google** and
|
||||
**Microsoft**.
|
||||
|
||||
[All changes in v13.23](CHANGELOG-big.md#v1323-2026-11-20-wekan--release)
|
||||
|
||||
# v13.22 2026-11-20 WeKan ® release
|
||||
|
||||
Repeating tasks of **Taskwarrior**, **Microsoft To Do**,
|
||||
**Todoist**, **TickTick**, **Tasks.org**, **Vikunja**, **Super Productivity**,
|
||||
**iCalendar**, **Org mode** and **Obsidian Kanban** now repeat in WeKan, and
|
||||
their exports write the repeat back. **Release All**
|
||||
builds and pushes **wekan**, **wekan-ondra** and **wekan-gantt-gpl** to every
|
||||
Snap Store channel, and **Release All Missing** adds what a release lacks,
|
||||
snaps included. A **WeKan board** imported from its own export keeps all of
|
||||
its Board Settings and card fields, and **Rocket.Chat** and **Fizzy** are
|
||||
imported and exported.
|
||||
|
||||
[All changes in v13.22](CHANGELOG-big.md#v1322-2026-11-20-wekan--release)
|
||||
@@ -270,8 +270,27 @@ replaced with the language named by that tag.**
|
||||
### Shared translation source for WeKan prototypes under `.tools/`
|
||||
|
||||
The WeKan catalogs in `imports/i18n/data/` are the source of truth for
|
||||
translations in every WeKan prototype under `.tools/`, including WeLite,
|
||||
Weddy, Wami, and any future WeKan prototype with its own catalog.
|
||||
translations in every WeKan prototype under `.tools/`, including Omi, Wami,
|
||||
Weddy, WeLite, and any future WeKan prototype with its own catalog. A prototype
|
||||
does not keep translations of its own that WeKan's catalogs do not have.
|
||||
|
||||
Version control translations come from ONE place too:
|
||||
`.tools/w/gitea-patches/dist/translations/gitea-locale/locale_<lang>.json`,
|
||||
upstream Gitea's locale files with gitea-patches' own translations merged in.
|
||||
Only gitea-patches has the complete Finnish, so a prototype never takes its
|
||||
Gitea strings from upstream Gitea directly. Refresh them with gitea-patches'
|
||||
`./build.sh translations` (menu: "Download the newest Gitea translations from
|
||||
upstream") and commit them there.
|
||||
|
||||
So a prototype that needs translations - Omi, Wami, Weddy, WeLite,
|
||||
github-to-gitea and the rest of the WeKan and version control prototypes under
|
||||
`.tools/w/` - COPIES them directly: WeKan's strings from WeKan's catalogs, and
|
||||
Gitea's own things (repositories, issues, pull requests, releases,
|
||||
organizations) from gitea-patches' `gitea-locale`, into its own catalog format.
|
||||
It uses no other translation source. Gitea's strings are NOT added to WeKan's
|
||||
catalogs (decided 2026-11-22: they would grow every WeKan locale file by about
|
||||
45 %). A string that neither has is added to WeKan's catalog, as in step 2
|
||||
below, and is used from there in WeKan and in the `.tools` repositories.
|
||||
|
||||
1. Before adding a translation key in a prototype, search WeKan's English
|
||||
catalog for a key with the same meaning and usage. Reuse that key and its
|
||||
|
||||
+4
-1
@@ -38,7 +38,7 @@ FROM --platform=$BUILDPLATFORM debian:trixie AS bundle
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
ARG VERSION=13.26
|
||||
ARG VERSION=13.29
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY --chmod=755 releases/check-telemetry.py /tmp/check-telemetry.py
|
||||
@@ -185,6 +185,7 @@ ENV \
|
||||
MATOMO_DO_NOT_TRACK=true \
|
||||
MATOMO_WITH_USERNAME=false \
|
||||
METRICS_ALLOWED_IP_ADDRESSES="" \
|
||||
ADMIN_PANEL_ALLOWED_IP_ADDRESSES="" \
|
||||
BROWSER_POLICY_ENABLED=true \
|
||||
TRUSTED_URL="" \
|
||||
WEBHOOKS_ATTRIBUTES="" \
|
||||
@@ -317,8 +318,10 @@ ENV \
|
||||
WEKAN_DISK_MONITOR="" \
|
||||
WEKAN_DISK_WATCH_PATHS="" \
|
||||
WEKAN_RAM_MONITOR="" \
|
||||
CLOUD="" \
|
||||
WEKAN_IMPORT_RUN_STALE_MS="" \
|
||||
EVENTLOG_RETENTION_DAYS="" \
|
||||
LOGIN_ADDRESS_RETENTION_DAYS="" \
|
||||
CORS="" \
|
||||
CORS_ALLOW_HEADERS="" \
|
||||
CORS_EXPOSE_HEADERS="" \
|
||||
|
||||
@@ -38,6 +38,8 @@ that by providing one-click installation on various platforms.
|
||||
build.bat.
|
||||
- [Features](https://github.com/wekan/wekan/tree/main/docs/Features):
|
||||
- Real-time user interface
|
||||
- [Help button](docs/Features/General/Help-Button.md): a ? at every feature place - board views, sidebar, Board and Member Settings,
|
||||
card sections, Admin Panel panes - shows What is it? and How it works? in your own language
|
||||
- All Boards page, Drag drop reorder with one or Multi-Selection:
|
||||
- Board icons at Remaining, (Sub)Workspaces, Archive
|
||||
- Shared Templates: Boards, Lists, Cards
|
||||
@@ -94,7 +96,13 @@ that by providing one-click installation on various platforms.
|
||||
- Swimlanes, Lists
|
||||
- Minicard: At list there is card, that has not been not opened yet
|
||||
- Card: Opened card popup of minicard
|
||||
- Attachments viewer for PDF and Office documents
|
||||
- Attachments viewer for PDF and Office documents, and a slideshow that reads only what is on the screen -
|
||||
also of text, CSV, code, ZIP and tar listings, calendars, Outlook .msg and OpenDocument
|
||||
- [Search inside attachments](docs/Features/Cards/Attachments/Attachment-Search-And-Integrity.md) with Filter,
|
||||
Search and Search All Boards; every attachment's SHA-256 is checked when it is read, with a warning in
|
||||
Admin Panel / Problems when a file changed behind WeKan's back
|
||||
- The [card details width](docs/Features/Cards/Card-Details-Width.md) is remembered per user, and an admin
|
||||
sets the default as a percentage of the browser window
|
||||
- Kanban and Scrum flow fields: Blocked, Class of service, MoSCoW priority, WSJF score
|
||||
- List policies, Definition of Ready, commitment point, WIP limit per person,
|
||||
lists split into Doing and Done
|
||||
@@ -111,7 +119,8 @@ that by providing one-click installation on various platforms.
|
||||
Throughput Run Chart, Due Date Performance
|
||||
- Overview: Statistics, Dashboard, Pulse, Workload, Distribution, Dependency Map, Activity Heatmap
|
||||
- Communication and code: Email, Chat, Version Control,
|
||||
[Website](docs/Features/Board-Sidebar/Board-Settings/Import-Export/Website/Website.md): the board as a website, which a public board can show at its own address instead of the kanban
|
||||
[Website](docs/Features/Board-Sidebar/Board-Settings/Import-Export/Website/Website.md): the board as a website, which a public board can show at its own address instead of the kanban,
|
||||
[Shop](docs/Features/Board-Header/Board-Views/Shop.md): the products on the cards as a web shop - cart, checkout, orders as cards, Budget and billing's payment methods - which a public board can show instead of the kanban
|
||||
- The charts and reports each have PDF and Excel export
|
||||
- Right Sidebar / Board Settings:
|
||||
- Rules: like IFTTT like Trello Butler
|
||||
@@ -150,20 +159,27 @@ that by providing one-click installation on various platforms.
|
||||
- Admin Panel
|
||||
- Settings
|
||||
- Version
|
||||
- Features: which features this WeKan offers, Card fields, Feature profiles
|
||||
- Features: which features this WeKan offers, Card fields, Feature profiles,
|
||||
[Turn off all webhooks](docs/Features/Admin-Panel/Settings/Turn-Off-All-Webhooks.md) at once: every webhook screen hidden,
|
||||
nothing sent and no webhook added or changed on the server, the saved ones kept
|
||||
- Appearance: What is shown/hidden, Whitelabeling
|
||||
- Announcement
|
||||
- Accessibility
|
||||
- Translation: Add custom translation strings
|
||||
- PWA
|
||||
- Global Webhooks
|
||||
- Privacy and security: [Allowed addresses](docs/Features/Admin-Panel/Admin-Panel-Allowed-Addresses.md), the IPv4 and IPv6
|
||||
addresses and ranges the Admin Panel and the admin REST API can be used from
|
||||
- People
|
||||
- Email, Notifications, Domains, Organizations, Teams, People
|
||||
- Cloud: the [Cloud Panel](docs/Features/Admin-Panel/Cloud-Panel.md) Domain and its SuperAdmin. At that domain the Cloud Panel keeps
|
||||
the customer domains - each with its own WeKan and MongoDB, or sharing this WeKan - and merges many WeKans into one,
|
||||
with CloudFlare DNS, Caddy routes, each customer's invoices, and a chat with earlier Rocket.Chat and SandChat conversations
|
||||
- Locked Users, Roles, Shared Templates
|
||||
- Login, SAML, LDAP, OAuth2 login providers, Passwordless login
|
||||
- Cloud, only in a container started with the environment variable `CLOUD=<its domain>`: the
|
||||
[Cloud Panel](docs/Features/Admin-Panel/Cloud-Panel.md). Its site administrators are the Cloud Admins - the first
|
||||
registered user is one - and keep the customer domains, each with its own WeKan and MongoDB or sharing this WeKan,
|
||||
merge many WeKans into one, with CloudFlare DNS, Caddy routes, invoices, support tickets and chat on a support board per
|
||||
domain, and the addresses a Cloud Admin may sign in from. A customer signs in there with the password of their own
|
||||
WeKan, checked against its database, and sees their invoices, tickets and chat. No REST API at that address
|
||||
- Attachments
|
||||
- Scheduled Backups, Continuous realtime backups, Move Attachments, Default Save Storage, Limits
|
||||
- Storage: MongoDB GridFS, Filesystem, S3/MinIO, Azure Blob, Google Cloud
|
||||
@@ -178,6 +194,7 @@ that by providing one-click installation on various platforms.
|
||||
- Security: shows any attempted attacks based on names from https://wekan.fi/hall-of-fame/ like built-in SIEM with country flag and city based of location of IP address based on location headers like CloudFlare etc
|
||||
- Impersonation
|
||||
- Performance, Speed, Tests, CPU usage, Instrumentation, Broken Cards, Files, Rules, Boards, Recovery, Offices, API, Database problems, Filesystem integrity
|
||||
- [Webhooks](docs/Features/Admin-Panel/Problems/Webhooks.md): every webhook, its board or Global, the user who added it and what it sends, tokens hidden
|
||||
- [Platforms](https://wekan.fi/install/):
|
||||
- Windows/Mac/Linux bundle .zip
|
||||
- Linux [Snap](https://snapcraft.io/wekan): Automatic updates
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
|
||||
appVersion: "v13.26.0"
|
||||
appVersion: "v13.29.0"
|
||||
files:
|
||||
userUploads:
|
||||
- README.md
|
||||
|
||||
@@ -15,6 +15,124 @@ the changelog only says what changed.
|
||||
|
||||
`tests/todoFile.test.cjs` checks this shape.
|
||||
|
||||
**Where things are** (2026-11-22). Each repository's own TODO.md has the
|
||||
details; WeKan's are below.
|
||||
|
||||
| Repository | In progress, or not verified yet | Needs a person |
|
||||
| --- | --- | --- |
|
||||
| WeKan | The help button's texts in 176 of 232 languages; the test build that runs out of memory; the changelog of the newest work; Latvian with Lithuanian words; laws and standards WP-4 onwards; accessibility; the docs folders | Push; the CVEs and advisories of ListLockMoveBleed and BounceBleed after the release; the Snap Store review ([#6929](https://github.com/wekan/wekan/issues/6929)) |
|
||||
| [gitea-patches](https://github.com/wekan/gitea-patches/blob/main/TODO.md) | 90 new upstream Gitea strings not yet in Finnish | Push; run "Migrate all Gitea to backups" with `--dry-run` first |
|
||||
| [omi](https://github.com/wekan/omi/blob/main/TODO.md) | Delete and import not yet run on a real Gitea folder or against the real GitHub; the import has no reactions, review comments, LFS, Actions or fork branches | Push; stop and back up Gitea before the first real write |
|
||||
| [welite](https://github.com/wekan/welite/blob/main/TODO.md) | WeKan data folders: no zip archives, GridFS or object-storage downloads, avatars or cross-target builds yet; retro-browser acceptance | - |
|
||||
| [weddy](https://github.com/wekan/weddy/blob/main/TODO.md) | 20 of WeKan's 174 templates in Go; attachments' Office preview and WebP thumbnails; more of WeKan's specs; Firefox and WebKit; netbsd/arm64 | Its "For the maintainer (on GitHub)" items |
|
||||
| [caddy-ferretdb-plugin](https://github.com/wekan/caddy-ferretdb-plugin/blob/main/TODO.md) | The Windows SQLite URI fix, checked on Linux only | Close the otel Dependabot alert; push before caddy-wekan-plugin |
|
||||
| [caddy-wekan-plugin](https://github.com/wekan/caddy-wekan-plugin/blob/main/TODO.md) | Weddy behind WeKan's newest settings; the Windows fixes, checked on Linux only | Push; close the otel Dependabot alert |
|
||||
| [node-patches](https://github.com/wekan/node-patches/blob/main/TODO.md) | The clone retry, until the next Release All | - |
|
||||
| [wekango](https://github.com/wekan/wekango/blob/main/TODO.md) | The Windows and macOS fixes, checked on Linux only | Confirm the mongo-tools notice review |
|
||||
| [weror](https://github.com/wekan/weror/blob/main/TODO.md) | - | Decide on the demo account that takes any password; close the rack Dependabot pull request |
|
||||
| [wekan.fi](https://github.com/wekan/wekan.fi/blob/main/TODO.md) | - | Rerun the Pages deploy; the CVE numbers into the Hall of Fame |
|
||||
| [wekan-meteor3-html4](https://github.com/wekan/wekan-meteor3-html4/blob/main/TODO.md) | Left out for now | - |
|
||||
| wena | aros-i386 without AHI audio | Rerun Release all for haiku-amd64 |
|
||||
| wepica | Left out: too old | - |
|
||||
|
||||
## In progress
|
||||
|
||||
Work being done now. Each item moves to the `# Upcoming WeKan ® release`
|
||||
section of `CHANGELOG-big.md`, and to the docs, when it is committed.
|
||||
|
||||
- A help button (?) at the top of every feature's place, mirrored for
|
||||
right-to-left languages, opening "What is it?" and "How it works?" for that
|
||||
feature as plain text without links, in every language. Done: the button,
|
||||
the popup, 161 places and the English texts. Translating the 323
|
||||
descriptions: 176 of the 232 non-English locales are done (2026-11-22),
|
||||
the rest are being translated, a few languages at a time. Not yet run: the
|
||||
Playwright spec `feature-help.e2e.js`.
|
||||
- The Meteor test build (`meteor test --full-app`) ran out of memory before
|
||||
any test started after the help texts grew every locale file; the release
|
||||
build (`meteor build`) still works. To find out why and fix it, then run
|
||||
the Shop, webhooks and Admin Panel addresses server tests, and their
|
||||
Playwright specs in Firefox and WebKit.
|
||||
- The changelog entries for what landed since the last changelog update:
|
||||
ListLockMoveBleed, the help button, the Shop's Product line kind, the
|
||||
Meteor 3 hosting localhost limit, the Omi and WeLite translation keys, and
|
||||
the translation rule for the prototypes.
|
||||
- Wrong-language and wrong-meaning words seen by the help-text translators,
|
||||
to correct once they are done with those files: Latvian (`lv`) has
|
||||
Lithuanian words; Estonian (`et-EE`) calls a board "juhatus" (a company's
|
||||
management board) in "Board Settings" and "Board View"; Aromanian (`rup`)
|
||||
and Sicilian (`scn`) have Italian menu names; Northern Sami (`se`) has two
|
||||
Finnish values; Shona (`sn`) has half-English menu names; Brazilian
|
||||
Portuguese (`pt-BR`) calls an assignee "Administrador"; Somali (`so`) calls
|
||||
card recurrence an automatic reset; Pashto and Sindhi (`ps`, `sd`) have odd
|
||||
"Check Version" and "WIP Limit Groups" terms; Serbian (`sr`) uses списи,
|
||||
предмет and Управа for board, card and Admin Panel; Macedonian (`mk`) has
|
||||
Bulgarian values (Хора, Наблюдавай, Имейл, Описание, Разпределена от,
|
||||
Поискан от); Luxembourgish (`lb`) is partly German; Punjabi and Odia (`pa`,
|
||||
`or_IN`) call a swimlane "swimming"; Maltese (`mt`) has "Bord Ara" for
|
||||
Board View.
|
||||
- The docs folders keep their main page as `README.md` instead of a page named
|
||||
after the folder, and `docs/Features/README.md` holds the website's feature
|
||||
overview. Every topic in one folder at the `docs/Features/` level: the
|
||||
`General/` level goes, its folders move up into the same-named folders, and
|
||||
the folders of `# Moved` stubs are removed, with every link updated.
|
||||
- Everything about accessibility in one folder, `docs/Features/Accessibility/`
|
||||
(from `General/Accessibility/` and the Admin Panel's Accessibility page).
|
||||
- Accessibility: every missing WCAG 2.2 AA feature added, and the accessibility
|
||||
tests extended to every page, popup and Admin Panel pane - axe with the WCAG
|
||||
2.2 rules, keyboard-only use, visible focus, 200 % zoom and 320 px reflow,
|
||||
target size, reduced motion and every theme's contrast - run through build.sh.
|
||||
- Laws and standards - GDPR, NIS2, ISO 27001, HIPAA and the others - checked
|
||||
against what WeKan already has (`docs/Compliance/`). Done: the complete admin
|
||||
audit log (WP-1), retention of sign-in addresses (WP-2) and the
|
||||
personal-data inventory (WP-3). Next: complete erasure (WP-4, the 40
|
||||
collections the inventory lists), a personal-data export (WP-5), legal pages
|
||||
with accepted versions (WP-6), then WP-7 to WP-14.
|
||||
- Found while documenting, to fix: the per-address login delay is never
|
||||
applied; Broken Cards counts unknown card types in its list but not in the
|
||||
Summary or its repair; the database, integrity and mail streams have no name
|
||||
in the Summary; the Recovery pane's text says it does not retry or cancel;
|
||||
the attachment retention form allows a larger per-run number than the
|
||||
retention applies.
|
||||
|
||||
## For the maintainer: needs a person, not code
|
||||
|
||||
- Push `main` here and in the `.tools/w/` repositories with local commits:
|
||||
gitea-patches, omi, welite, wekan.fi, charts and caddy-wekan-plugin.
|
||||
- [GHSA-394w-8q99-q4qx](https://github.com/wekan/wekan/security/advisories/GHSA-394w-8q99-q4qx)
|
||||
(ListLockMoveBleed) and
|
||||
[GHSA-7w85-38ph-c96v](https://github.com/wekan/wekan/security/advisories/GHSA-7w85-38ph-c96v)
|
||||
(BounceBleed): fixed in Upcoming; after the release, request the CVEs and
|
||||
publish the advisories. The Hall of Fame says "CVE requested" for both.
|
||||
- The Snap Store push of v13.27 failed and waits for the Store's manual review
|
||||
([#6929](https://github.com/wekan/wekan/issues/6929)); nothing to change in
|
||||
the code.
|
||||
- Dependabot pull requests and alerts to close by hand: the
|
||||
go.opentelemetry.io/otel/sdk/log update in caddy-ferretdb-plugin and
|
||||
caddy-wekan-plugin (Dependabot cannot resolve their local `replace`, and the
|
||||
version is already on main), weror's rack-3.1.21 branch (main has rack
|
||||
3.2.9), nekan alert 207 and caddy-gitea-plugin alerts 1, 2, 4, 18, 24, 25
|
||||
and 37.
|
||||
- wena: rerun Release all for haiku-amd64 (the Haiku VM never answered SSH);
|
||||
aros-i386 needs SDL's AHI audio driver off for i386, whose AROS toolchain has
|
||||
no AHI headers - not cloned or built here, as there is no Docker.
|
||||
- wekan.fi: rerun "Deploy static content to Pages", which failed with a 500
|
||||
from GitHub's Pages API after its checks passed.
|
||||
- weror: decide whether the demo account `user@demo.test` may sign in with any
|
||||
password, as its tests ask; restored as tested, and a risk if weror is
|
||||
public.
|
||||
- wekango: confirm the review of the new mongo-tools license notices (only
|
||||
permissive attributions changed).
|
||||
|
||||
## Repositories left out, and why
|
||||
|
||||
- wepica: too old; its failing Dependabot runs are not fixed (decided
|
||||
2026-11-22).
|
||||
- wekan-meteor3-html4: left out for now (decided 2026-11-22). Its failing
|
||||
Dependency Review needs the dependency graph turned on in its settings; its
|
||||
own TODO.md says so.
|
||||
- sandstorm-io/sandstorm under `.tools/sandstorm`: somebody else's project,
|
||||
cloned for reference only.
|
||||
|
||||
## Need the running app to reproduce/verify
|
||||
|
||||
- The WebKit stage cannot run in the Flatpak sandbox: MiniBrowser needs its own
|
||||
|
||||
@@ -41,7 +41,7 @@ if /I "%~1"=="--list" goto cli_list_exit
|
||||
if /I "%~1"=="list" goto cli_list_exit
|
||||
REM The same non-interactive EVERYTHING as `./build.sh --run-everything [mode]`.
|
||||
if /I "%~1"=="--run-everything" (
|
||||
if "%~2"=="" (set "WEKAN_EVERYTHING_MODE=two-worker") else (set "WEKAN_EVERYTHING_MODE=%~2")
|
||||
if "%~2"=="" (set "WEKAN_EVERYTHING_MODE=sequential") else (set "WEKAN_EVERYTHING_MODE=%~2")
|
||||
goto test_everything
|
||||
)
|
||||
call :cli_run %*
|
||||
@@ -177,11 +177,11 @@ REM ===========================================================================
|
||||
:menu_tests
|
||||
echo.
|
||||
echo -- Tests -- ^(0 = Back^)
|
||||
echo 1^) EVERYTHING two-worker: one stage at a time, two Playwright workers
|
||||
echo per browser; every database and all FerretDB tests remain sequential.
|
||||
echo 1^) EVERYTHING one by one: one stage and one Playwright worker at a time
|
||||
echo for minimum RAM usage; database and FerretDB stages stay sequential.
|
||||
echo Logs in .tools\log\^<datetime^>\
|
||||
echo 2^) EVERYTHING one by one: one stage and one Playwright worker at a time
|
||||
echo for minimum RAM usage; database and FerretDB stages stay sequential
|
||||
echo 2^) EVERYTHING two-worker: one stage at a time, two Playwright workers
|
||||
echo per browser; every database and all FerretDB tests remain sequential
|
||||
echo 3^) EVERYTHING at once: WeKan test jobs concurrently; database and
|
||||
echo FerretDB stages remain sequential
|
||||
echo 4^) Mocha ^(server-side^)
|
||||
@@ -207,8 +207,8 @@ echo 19^) Playwright single spec: one spec on the browsers you choose; builds a
|
||||
echo starts the test server when none is running on :3000
|
||||
set "choice="
|
||||
set /p "choice=Choose: "
|
||||
if "%choice%"=="1" goto test_everything_two
|
||||
if "%choice%"=="2" goto test_everything_one
|
||||
if "%choice%"=="1" goto test_everything_one
|
||||
if "%choice%"=="2" goto test_everything_two
|
||||
if "%choice%"=="3" goto test_everything_all
|
||||
if "%choice%"=="4" goto test_mocha
|
||||
if "%choice%"=="5" goto test_import
|
||||
|
||||
@@ -775,6 +775,7 @@ function run_playwright_docker(){
|
||||
-e WEKAN_TEST_SERVER_MODE="${WEKAN_TEST_SERVER_MODE:-bundle}" \
|
||||
-e WEKAN_TEST_SMTP_PORT="${WEKAN_TEST_SMTP_PORT:-}" \
|
||||
-e WEKAN_TEST_REVERSE_PORTS="$reverse_ports" \
|
||||
-e WEKAN_TEST_CLOUD="${WEKAN_TEST_CLOUD:-}" \
|
||||
-e PLAYWRIGHT_HTML_OPEN=never \
|
||||
-e WEKAN_FILES_PATH="$filesroot" \
|
||||
-e PLAYWRIGHT_JSON_OUTPUT_NAME="${PLAYWRIGHT_JSON_OUTPUT_NAME:-}" \
|
||||
@@ -1334,7 +1335,7 @@ mongo_answers() {
|
||||
}
|
||||
|
||||
function run_all_tests(){
|
||||
local REQUESTED_MODE="${1:-two-worker}"
|
||||
local REQUESTED_MODE="${1:-sequential}"
|
||||
local RUN_MODE="$REQUESTED_MODE" PLAYWRIGHT_WORKERS=1
|
||||
case "$REQUESTED_MODE" in
|
||||
two-worker) RUN_MODE=sequential; PLAYWRIGHT_WORKERS=2 ;;
|
||||
@@ -2007,7 +2008,7 @@ function floating_promises_checks(){
|
||||
# releases/db-conformance.sh, which needs it a stage earlier). .tools/ is ignored
|
||||
# by git and by Meteor, so a companion repo cannot reach a commit or a rebuild.
|
||||
function run_everything(){
|
||||
local EVERYTHING_MODE="${1:-two-worker}"
|
||||
local EVERYTHING_MODE="${1:-sequential}"
|
||||
acquire_everything_lock || return 1
|
||||
trap 'trap - EXIT INT TERM; cleanup_everything_processes own; release_everything_lock' EXIT
|
||||
trap 'trap - EXIT INT TERM; cleanup_everything_processes own; release_everything_lock; exit 130' INT TERM
|
||||
@@ -3132,7 +3133,7 @@ cli_run() {
|
||||
# on Windows): the same "EVERYTHING (sequential)" the Tests menu offers, without
|
||||
# the menu.
|
||||
case "${1:-}" in
|
||||
--run-everything) run_everything "${2:-two-worker}"; exit $? ;;
|
||||
--run-everything) run_everything "${2:-sequential}"; exit $? ;;
|
||||
--playwright-spec)
|
||||
[ -n "${2:-}" ] || { echo "Usage: ./build.sh --playwright-spec <spec> [chromium|firefox|webkit|all] [title filter]" >&2; exit 2; }
|
||||
run_playwright_spec "$2" "${3:-chromium}" "${4:-}" build; exit $? ;;
|
||||
@@ -3167,8 +3168,8 @@ while [ -z "$opt" ]; do
|
||||
"Kill all dev servers|Kill all dev servers (free ports 3000/3001/3100/3101/4000/4001/8080)" ;;
|
||||
"Tests")
|
||||
choose "Tests" \
|
||||
"EVERYTHING two-worker|Run EVERYTHING with stages one by one and two Playwright workers per browser; database and FerretDB stages stay sequential; logs in log/<datetime>/" \
|
||||
"EVERYTHING one by one|Run EVERYTHING one stage and one Playwright worker at a time for minimum RAM usage; database and FerretDB stages stay sequential; logs in log/<datetime>/" \
|
||||
"EVERYTHING two-worker|Run EVERYTHING with stages one by one and two Playwright workers per browser; database and FerretDB stages stay sequential; logs in log/<datetime>/" \
|
||||
"EVERYTHING at once|Run EVERYTHING with the WeKan test jobs concurrently; database backends and FerretDB stages stay sequential; logs in log/<datetime>/" \
|
||||
"EVERYTHING source one by one|Run EVERYTHING against Dev server nobuild on localhost:3000, one test at a time, all browsers" \
|
||||
"Mocha (server-side)|Test Mocha unit + security + API-logic tests (server-side only, no browser)" \
|
||||
|
||||
@@ -144,6 +144,8 @@ template(name="boardBody")
|
||||
+chatView
|
||||
else if isViewWebsite
|
||||
+websiteView
|
||||
else if isViewShop
|
||||
+shopView
|
||||
else if isViewVersionControl
|
||||
+versionControlView
|
||||
else if isViewColumnSets
|
||||
|
||||
@@ -1025,6 +1025,9 @@ Template.boardBody.helpers({
|
||||
isViewWebsite() {
|
||||
return Utils.boardView() === 'board-view-website';
|
||||
},
|
||||
isViewShop() {
|
||||
return Utils.boardView() === 'board-view-shop';
|
||||
},
|
||||
isViewColumnSets() {
|
||||
return Utils.boardView() === 'board-view-column-sets';
|
||||
},
|
||||
@@ -1309,8 +1312,12 @@ Template.calendarView.helpers({
|
||||
locale: TAPi18n.getLanguage(),
|
||||
rtl: TAPi18n.isRTL(),
|
||||
}),
|
||||
editable: true,
|
||||
selectable: true,
|
||||
// Dragging a card and clicking a day to add one are writes: only for
|
||||
// who may write on the board. The server refuses the rest and records
|
||||
// the refusal as an attempt (server/models/cards.js createCardWithDueDate),
|
||||
// which it is only when the calendar did not offer it.
|
||||
editable: Utils.canModifyBoard(),
|
||||
selectable: Utils.canModifyBoard(),
|
||||
/* TODO: lists as resources: https://fullcalendar.io/docs/vertical-resource-view */
|
||||
navLinks: true,
|
||||
businessHours: {
|
||||
|
||||
@@ -364,3 +364,5 @@ template(name="boardViewMenu")
|
||||
if $eq boardView 'board-view-stats'
|
||||
i.fa.fa-pie-chart
|
||||
span.board-header-btn-label= boardViewName
|
||||
//- The open view's ? (featureHelp.jade), after the menu that names it.
|
||||
+featureHelp(id=boardViewHelp)
|
||||
@@ -10,6 +10,7 @@ import Swimlanes from '/models/swimlanes';
|
||||
import TableVisibilityModeSettings from '/models/tableVisibilityModeSettings';
|
||||
import visibilityDesc from '/imports/i18n/lib/visibilityDesc';
|
||||
const { boardViewMenuEntries } = require('/models/lib/boardViewSettings');
|
||||
const { boardViewHelpId } = require('/models/lib/featureHelp');
|
||||
import { allowBoardView } from '/client/lib/instanceFeatures';
|
||||
import { Filter } from '/client/lib/filter';
|
||||
// Which way a button that opens a sidebar view goes on a click - one answer,
|
||||
@@ -517,6 +518,10 @@ Template.boardChangeViewPopup.events({
|
||||
Utils.setBoardView('board-view-website');
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-open-shop-view'() {
|
||||
Utils.setBoardView('board-view-shop');
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-open-version-control-view'() {
|
||||
Utils.setBoardView('board-view-version-control');
|
||||
Popup.back();
|
||||
@@ -985,6 +990,10 @@ Template.boardViewMenu.helpers({
|
||||
boardView() {
|
||||
return Utils.boardView();
|
||||
},
|
||||
// The ? of the view that is on (docs/Features/General/Help-Button.md).
|
||||
boardViewHelp() {
|
||||
return boardViewHelpId(Utils.boardView());
|
||||
},
|
||||
// The tooltip: the name of the view that is ON. The button is icon only, so
|
||||
// this is the only place the name appears. docs/Features/Header-Bar/Header.md
|
||||
boardViewName() {
|
||||
@@ -1028,6 +1037,7 @@ Template.boardViewMenu.helpers({
|
||||
'board-view-email': 'board-view-email',
|
||||
'board-view-chat': 'board-view-chat',
|
||||
'board-view-website': 'board-view-website',
|
||||
'board-view-shop': 'board-view-shop',
|
||||
'board-view-version-control': 'board-view-version-control',
|
||||
'board-view-column-sets': 'board-view-column-sets',
|
||||
'board-view-created-resolved': 'board-view-created-resolved',
|
||||
|
||||
@@ -611,7 +611,7 @@ template(name="workspaceActionsPopup")
|
||||
//- and Multi-Selection still open the sidebar, straight into their own view.
|
||||
//-
|
||||
//- Each names itself beside its icon where the bar has room, and the one rule
|
||||
//- in header.css drops every label below 1100px, leaving the tooltips.
|
||||
//- in header.css drops every label at 1000px and narrower, leaving the tooltips.
|
||||
//- docs/Features/All-Boards/All-Boards.md
|
||||
template(name="allBoardsHeaderButtons")
|
||||
a.board-header-btn.js-open-boards-sort(title="{{_ 'sort-boards'}}" class="{{#unless isBoardsSort 'custom'}}emphasis{{/unless}}")
|
||||
|
||||
@@ -0,0 +1,233 @@
|
||||
/* Board View / Shop: a readable shop page, whatever the board's colours. */
|
||||
.shop-view {
|
||||
max-width: 72em;
|
||||
margin-inline: auto;
|
||||
padding: 1em;
|
||||
background: #fff;
|
||||
color: #222;
|
||||
line-height: 1.5;
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.shop-header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.6em 1em;
|
||||
border-block-end: 1px solid #ddd;
|
||||
margin-block-end: 1em;
|
||||
}
|
||||
.shop-title {
|
||||
flex: 1 1 auto;
|
||||
margin: 0.3em 0;
|
||||
}
|
||||
.shop-title a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
.shop-cart-button,
|
||||
.shop-settings-link {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.shop-cart-button.is-current {
|
||||
font-weight: bold;
|
||||
}
|
||||
.shop-cart-count {
|
||||
display: inline-block;
|
||||
min-width: 1.4em;
|
||||
margin-inline-start: 0.3em;
|
||||
padding: 0 0.3em;
|
||||
border-radius: 0.7em;
|
||||
background: #2e7d32;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
.shop-notice {
|
||||
padding: 0.5em 0.8em;
|
||||
border-radius: 4px;
|
||||
background: #fff3cd;
|
||||
color: #5c4400;
|
||||
}
|
||||
.shop-error {
|
||||
background: #fde2e1;
|
||||
color: #7a1712;
|
||||
}
|
||||
.shop-categories {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.4em;
|
||||
margin-block: 0.6em 1em;
|
||||
}
|
||||
.shop-categories a {
|
||||
padding: 0.2em 0.7em;
|
||||
border-radius: 1em;
|
||||
border: 1px solid #ccc;
|
||||
text-decoration: none;
|
||||
}
|
||||
.shop-categories a.is-current {
|
||||
font-weight: bold;
|
||||
outline: 2px solid #222;
|
||||
}
|
||||
.shop-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(min(100%, 13em), 1fr));
|
||||
gap: 1em;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.shop-tile {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3em;
|
||||
padding: 0.6em;
|
||||
border: 1px solid #e3e3e3;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.shop-tile-link {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3em;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
.shop-tile-image {
|
||||
width: 100%;
|
||||
aspect-ratio: 4 / 3;
|
||||
object-fit: cover;
|
||||
border-radius: 4px;
|
||||
background: #f2f2f2;
|
||||
}
|
||||
.shop-tile-noimage {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 2.5em;
|
||||
color: #bbb;
|
||||
}
|
||||
.shop-tile-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.shop-tile-short {
|
||||
color: #555;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.shop-price {
|
||||
font-weight: bold;
|
||||
color: #2e7d32;
|
||||
}
|
||||
.shop-sold-out {
|
||||
color: #b71c1c;
|
||||
font-weight: bold;
|
||||
}
|
||||
.shop-product-page {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1.5em;
|
||||
}
|
||||
.shop-product-image {
|
||||
flex: 1 1 18em;
|
||||
max-width: min(100%, 32em);
|
||||
border-radius: 6px;
|
||||
object-fit: contain;
|
||||
}
|
||||
.shop-product-details {
|
||||
flex: 1 1 18em;
|
||||
min-width: 0;
|
||||
}
|
||||
.shop-add,
|
||||
.shop-checkout,
|
||||
.shop-settings {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3em;
|
||||
max-width: 32em;
|
||||
}
|
||||
.shop-add input[type="number"] {
|
||||
max-width: 6em;
|
||||
}
|
||||
.shop-cart-table-wrap,
|
||||
.shop-cart {
|
||||
overflow-x: auto;
|
||||
}
|
||||
.shop-cart-table {
|
||||
border-collapse: collapse;
|
||||
min-width: 100%;
|
||||
}
|
||||
.shop-cart-table th,
|
||||
.shop-cart-table td {
|
||||
padding: 0.3em 0.5em;
|
||||
border-block-end: 1px solid #eee;
|
||||
text-align: start;
|
||||
}
|
||||
.shop-cart-table input[type="number"] {
|
||||
width: 4.5em;
|
||||
}
|
||||
.shop-amount {
|
||||
text-align: end;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.shop-totals {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto;
|
||||
justify-content: start;
|
||||
gap: 0.2em 1.5em;
|
||||
}
|
||||
.shop-totals dd {
|
||||
margin: 0;
|
||||
text-align: end;
|
||||
}
|
||||
.shop-total {
|
||||
font-weight: bold;
|
||||
}
|
||||
.shop-methods {
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.shop-check,
|
||||
.shop-method,
|
||||
.shop-terms {
|
||||
display: block;
|
||||
}
|
||||
.shop-qr svg {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.shop-barcode {
|
||||
max-width: 32em;
|
||||
}
|
||||
.shop-settings fieldset {
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
max-height: 14em;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.shop-settings-method {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 0.5em;
|
||||
}
|
||||
.shop-saved {
|
||||
color: #2e7d32;
|
||||
}
|
||||
/* The shop's forms use labelled native checkboxes and radio buttons, not the
|
||||
hidden material inputs of the rest of WeKan. */
|
||||
.shop-view input[type="checkbox"],
|
||||
.shop-view input[type="radio"],
|
||||
.shop-settings input[type="checkbox"] {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
min-height: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-inline-end: 6px;
|
||||
appearance: auto;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
//- Board View / Shop (models/lib/shop.js, docs/Features/Board-Header/Board-Views/Shop.md):
|
||||
the products on the board's cards as a web shop - a card with a price in a
|
||||
list on sale is a product, its labels the categories. The cart is kept in
|
||||
this browser; the checkout sends card ids and quantities, and the server
|
||||
prices the order from the cards and writes it as a card in the Orders list.
|
||||
A public board can open in it (Board Settings / Shop or Board View), so a
|
||||
visitor shops at the board's address instead of seeing the kanban. Every
|
||||
text of a card is drawn as text, or through the Markdown viewer.
|
||||
template(name="shopView")
|
||||
.shop-view
|
||||
header.shop-header
|
||||
h1.shop-title
|
||||
a.js-shop-home(href="?") {{shopTitle}}
|
||||
if isBoardAdmin
|
||||
a.shop-settings-link.js-open-shop-settings(href="#" title="{{_ 'board-view-shop'}}" aria-label="{{_ 'board-view-shop'}}")
|
||||
i.fa.fa-cog
|
||||
a.shop-cart-button.js-shop-cart(href="#" class="{{#if $eq mode 'cart'}}is-current{{/if}}")
|
||||
i.fa.fa-shopping-cart
|
||||
| {{_ 'shop-cart'}}
|
||||
span.shop-cart-count {{cartCount}}
|
||||
unless settings.enabled
|
||||
p.shop-notice.shop-closed {{_ 'shop-closed'}}
|
||||
if showShop
|
||||
if $eq mode 'done'
|
||||
+shopOrderDone(order=order)
|
||||
else if $eq mode 'checkout'
|
||||
+shopCheckout
|
||||
else if $eq mode 'cart'
|
||||
+shopCart
|
||||
else if productPage
|
||||
with productPage
|
||||
article.shop-product-page
|
||||
if coverUrl
|
||||
img.shop-product-image(src=coverUrl alt=title)
|
||||
.shop-product-details
|
||||
h2.shop-product-title {{title}}
|
||||
p.shop-price {{money priceMinor}}
|
||||
if sku
|
||||
p.shop-sku {{_ 'shop-product-code'}}: {{sku}}
|
||||
if soldOut
|
||||
p.shop-sold-out {{_ 'shop-sold-out'}}
|
||||
else
|
||||
if hasStock
|
||||
p.shop-stock {{_ 'shop-in-stock' count=stock}}
|
||||
form.shop-add.js-shop-add(data-id=_id)
|
||||
label(for="shop-quantity") {{_ 'shop-quantity'}}
|
||||
input#shop-quantity(type="number" name="quantity" min="1" max="{{maxQuantity}}" step="1" value="1")
|
||||
button.primary(type="submit") {{_ 'shop-add-to-cart'}}
|
||||
if description
|
||||
.shop-product-description
|
||||
+viewer
|
||||
= description
|
||||
a.js-shop-home(href="?") {{_ 'shop-continue'}}
|
||||
else
|
||||
if shopIntro
|
||||
.shop-intro
|
||||
+viewer
|
||||
= shopIntro
|
||||
if categories.length
|
||||
nav.shop-categories(aria-label="{{_ 'labels'}}")
|
||||
a.js-shop-category(href="#" data-id="" class="{{#unless category}}is-current{{/unless}}") {{_ 'shop-all-categories'}}
|
||||
each cat in categories
|
||||
a.js-shop-category(href="#" data-id=cat._id class="card-label-{{cat.color}} {{#if $eq cat._id category}}is-current{{/if}}") {{cat.name}}
|
||||
if products.length
|
||||
ul.shop-grid
|
||||
each product in products
|
||||
li.shop-tile(data-id=product._id)
|
||||
a.shop-tile-link.js-shop-product(href="?product={{product._id}}" data-id=product._id)
|
||||
if product.coverUrl
|
||||
img.shop-tile-image(src=product.coverUrl alt=product.title loading="lazy")
|
||||
else
|
||||
span.shop-tile-image.shop-tile-noimage
|
||||
i.fa.fa-shopping-bag
|
||||
span.shop-tile-title {{product.title}}
|
||||
span.shop-price {{money product.priceMinor}}
|
||||
if product.short
|
||||
span.shop-tile-short {{product.short}}
|
||||
if product.soldOut
|
||||
span.shop-sold-out {{_ 'shop-sold-out'}}
|
||||
else
|
||||
button.js-shop-add-one(type="button" data-id=product._id) {{_ 'shop-add-to-cart'}}
|
||||
else
|
||||
p.quiet.shop-empty {{_ 'shop-empty'}}
|
||||
|
||||
template(name="shopCart")
|
||||
section.shop-cart
|
||||
h2 {{_ 'shop-cart'}}
|
||||
if priced.lines.length
|
||||
table.shop-cart-table
|
||||
thead
|
||||
tr
|
||||
th {{_ 'title'}}
|
||||
th {{_ 'shop-quantity'}}
|
||||
th {{_ 'billing-amount'}}
|
||||
th
|
||||
tbody
|
||||
each line in priced.lines
|
||||
tr(data-id=line.cardId)
|
||||
td
|
||||
a.js-shop-product(href="?product={{line.cardId}}" data-id=line.cardId) {{line.title}}
|
||||
td
|
||||
input.js-shop-quantity(type="number" min="1" max="999" step="1" value=line.quantity data-id=line.cardId aria-label="{{_ 'shop-quantity'}}")
|
||||
| × {{money line.unitMinor}}
|
||||
td.shop-amount {{money line.lineMinor}}
|
||||
td
|
||||
a.js-shop-remove(href="#" data-id=line.cardId title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
|
||||
i.fa.fa-trash
|
||||
+shopTotals(totals=priced)
|
||||
if checkoutRefusal
|
||||
p.shop-notice {{refusalText}}
|
||||
else
|
||||
button.primary.js-shop-checkout(type="button") {{_ 'shop-checkout'}}
|
||||
else
|
||||
if priced.error
|
||||
p.shop-notice {{priceErrorText}}
|
||||
p.quiet {{_ 'shop-cart-empty'}}
|
||||
a.js-shop-home(href="?") {{_ 'shop-continue'}}
|
||||
|
||||
template(name="shopTotals")
|
||||
dl.shop-totals
|
||||
if totals.vatMinor
|
||||
dt {{_ 'billing-net'}}
|
||||
dd {{money totals.netMinor}}
|
||||
dt {{_ 'billing-vat'}} {{totals.vatPercent}} %
|
||||
dd {{money totals.vatMinor}}
|
||||
dt.shop-total {{_ 'billing-total'}}
|
||||
dd.shop-total {{money totals.totalMinor}}
|
||||
|
||||
template(name="shopCheckout")
|
||||
form.shop-checkout.js-shop-place-order
|
||||
h2 {{_ 'shop-checkout'}}
|
||||
+shopTotals(totals=priced)
|
||||
label(for="shop-name") {{_ 'fullname'}}
|
||||
input#shop-name(type="text" name="name" required maxlength="100" autocomplete="name")
|
||||
label(for="shop-email") {{_ 'email'}}
|
||||
input#shop-email(type="email" name="email" required maxlength="254" autocomplete="email")
|
||||
label(for="shop-phone") {{_ 'billing-phone'}}
|
||||
input#shop-phone(type="tel" name="phone" maxlength="40" autocomplete="tel")
|
||||
label(for="shop-address") {{_ 'billing-address'}}
|
||||
textarea#shop-address(name="address" rows="3" maxlength="500" autocomplete="street-address")
|
||||
label(for="shop-note") {{_ 'shop-note'}}
|
||||
textarea#shop-note(name="note" rows="3" maxlength="1000")
|
||||
fieldset.shop-methods
|
||||
legend {{_ 'billing-method'}}
|
||||
each method in paymentMethods
|
||||
label.shop-method
|
||||
input(type="radio" name="paymentMethodId" value=method.id required checked="{{#if $eq @index 0}}checked{{/if}}")
|
||||
| {{method.label}}
|
||||
if settings.termsUrl
|
||||
label.shop-terms
|
||||
input(type="checkbox" name="termsAccepted" required)
|
||||
| {{_ 'shop-accept-terms'}}
|
||||
| (
|
||||
a(href=settings.termsUrl target="_blank" rel="noopener noreferrer") {{settings.termsUrl}}
|
||||
| )
|
||||
p.quiet.shop-privacy {{_ 'shop-privacy-note'}}
|
||||
if error
|
||||
p.shop-notice.shop-error {{error}}
|
||||
button.primary(type="submit" disabled="{{#if sending}}disabled{{/if}}") {{_ 'shop-place-order'}}
|
||||
a.js-shop-cart(href="#") {{_ 'back'}}
|
||||
|
||||
template(name="shopOrderDone")
|
||||
section.shop-done
|
||||
h2 {{_ 'shop-order-placed' number=order.number}}
|
||||
+shopTotals(totals=order)
|
||||
with order.payment
|
||||
section.shop-payment
|
||||
h3 {{methodLabel}}
|
||||
if error
|
||||
p.shop-notice {{error}}
|
||||
else
|
||||
if qr
|
||||
p.quiet {{_ 'billing-pay-by-scanning'}}
|
||||
.shop-qr {{{qrCode}}}
|
||||
if barcode
|
||||
.shop-barcode {{{barcodeCode}}}
|
||||
each line in lines
|
||||
p.shop-payment-line {{line}}
|
||||
if safeLink
|
||||
p
|
||||
a(href=safeLink target="_blank" rel="noopener noreferrer") {{safeLink}}
|
||||
if order.reference
|
||||
p {{_ 'billing-payment-reference'}}: {{formattedReference}}
|
||||
if order.invoiceNumber
|
||||
p.shop-invoice-number {{_ 'billing-invoice'}}: {{order.invoiceNumber}}
|
||||
a.js-shop-home(href="?") {{_ 'shop-continue'}}
|
||||
|
||||
//- Board Settings / Shop (docs/Features/Board-Sidebar/Board-Settings/Shop.md).
|
||||
Saved as a whole by the shopSetSettings method (server/shop.js), which
|
||||
checks every value again: who saves, the fields, the lists, the Orders
|
||||
list's board and the payment methods.
|
||||
template(name="boardShopSettingsPopup")
|
||||
form.shop-settings.js-shop-settings
|
||||
label.shop-check
|
||||
input(type="checkbox" name="enabled" checked=draft.enabled)
|
||||
| {{_ 'shop-open'}}
|
||||
label(for="shop-set-title") {{_ 'title'}}
|
||||
input#shop-set-title(type="text" name="title" maxlength="200" value=draft.title placeholder=boardTitle)
|
||||
label(for="shop-set-intro") {{_ 'shop-intro'}}
|
||||
textarea#shop-set-intro(name="intro" rows="3" maxlength="5000") {{draft.intro}}
|
||||
label(for="shop-set-price") {{_ 'shop-price-field'}}
|
||||
select#shop-set-price(name="priceFieldId")
|
||||
option(value="") {{_ 'shop-not-chosen'}}
|
||||
each field in fieldsFor 'priceFieldId'
|
||||
option(value=field._id selected="{{#if $eq field._id draft.priceFieldId}}selected{{/if}}") {{field.name}}
|
||||
label(for="shop-set-sku") {{_ 'shop-sku-field'}}
|
||||
select#shop-set-sku(name="skuFieldId")
|
||||
option(value="") {{_ 'shop-not-chosen'}}
|
||||
each field in fieldsFor 'skuFieldId'
|
||||
option(value=field._id selected="{{#if $eq field._id draft.skuFieldId}}selected{{/if}}") {{field.name}}
|
||||
label(for="shop-set-stock") {{_ 'shop-stock-field'}}
|
||||
select#shop-set-stock(name="stockFieldId")
|
||||
option(value="") {{_ 'shop-not-chosen'}}
|
||||
each field in fieldsFor 'stockFieldId'
|
||||
option(value=field._id selected="{{#if $eq field._id draft.stockFieldId}}selected{{/if}}") {{field.name}}
|
||||
label.shop-check
|
||||
input(type="checkbox" name="decrementStock" checked=draft.decrementStock)
|
||||
| {{_ 'shop-decrement-stock'}}
|
||||
label(for="shop-set-currency") {{_ 'billing-currency'}}
|
||||
input#shop-set-currency(type="text" name="currency" maxlength="3" pattern="[A-Za-z]{3}" value=draft.currency)
|
||||
label(for="shop-set-vat") {{_ 'billing-vat'}} %
|
||||
input#shop-set-vat(type="number" name="vatPercent" min="0" max="100" step="0.01" value=draft.vatPercent)
|
||||
label.shop-check
|
||||
input(type="checkbox" name="pricesIncludeVat" checked=draft.pricesIncludeVat)
|
||||
| {{_ 'shop-prices-include-vat'}}
|
||||
label(for="shop-set-reference") {{_ 'billing-payment-reference'}}
|
||||
select#shop-set-reference(name="referenceType")
|
||||
each ref in referenceTypes
|
||||
option(value=ref.value selected="{{#if $eq ref.value draft.referenceType}}selected{{/if}}") {{ref.label}}
|
||||
fieldset
|
||||
legend {{_ 'shop-sale-lists'}}
|
||||
each list in boardLists
|
||||
label.shop-check
|
||||
input(type="checkbox" name="saleListIds" value=list._id checked=list.checked)
|
||||
| {{list.title}}
|
||||
fieldset
|
||||
legend {{_ 'shop-category-labels'}}
|
||||
each label in boardLabels
|
||||
label.shop-check
|
||||
input(type="checkbox" name="categoryLabelIds" value=label._id checked=label.checked)
|
||||
span.card-label(class="card-label-{{label.color}}") {{label.name}}
|
||||
label(for="shop-set-orders") {{_ 'shop-orders-list'}}
|
||||
select#shop-set-orders(name="orders")
|
||||
option(value="") {{_ 'shop-not-chosen'}}
|
||||
each target in orderTargets
|
||||
optgroup(label=target.title)
|
||||
each list in target.lists
|
||||
option(value="{{target._id}}/{{list._id}}" selected="{{#if isOrdersList target._id list._id}}selected{{/if}}") {{list.title}}
|
||||
p.quiet {{_ 'shop-orders-private'}}
|
||||
label.shop-check
|
||||
input(type="checkbox" name="guestCheckout" checked=draft.guestCheckout)
|
||||
| {{_ 'shop-guest-checkout'}}
|
||||
label.shop-check
|
||||
input(type="checkbox" name="confirmationEmail" checked=draft.confirmationEmail)
|
||||
| {{_ 'shop-confirmation-email'}}
|
||||
label(for="shop-set-terms") {{_ 'shop-terms-url'}}
|
||||
input#shop-set-terms(type="url" name="termsUrl" maxlength="2000" value=draft.termsUrl placeholder="https://")
|
||||
label.shop-check
|
||||
input(type="checkbox" name="showOnPublic" checked=showsOnPublic)
|
||||
| {{_ 'shop-show-on-public'}}
|
||||
p.quiet {{_ 'shop-show-on-public-note' view=publicViewName}}
|
||||
fieldset.shop-settings-methods
|
||||
legend {{_ 'billing-payment-methods'}}
|
||||
each method in draftMethods
|
||||
.shop-settings-method(data-id=method.id)
|
||||
label.shop-check
|
||||
input.js-shop-method-enabled(type="checkbox" data-id=method.id checked=method.enabled)
|
||||
| {{method.label}}
|
||||
if method.summary
|
||||
| · {{method.summary}}
|
||||
a.js-shop-method-remove(href="#" data-id=method.id title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
|
||||
i.fa.fa-trash
|
||||
label(for="shop-method-type") {{_ 'billing-method'}}
|
||||
select#shop-method-type.js-shop-method-type
|
||||
each type in methodTypes
|
||||
option(value=type.value selected="{{#if $eq type.value methodType}}selected{{/if}}") {{type.label}}
|
||||
each fieldName in methodFields
|
||||
label(for="shop-method-{{fieldName.name}}") {{fieldName.label}}
|
||||
if $eq fieldName.name 'details'
|
||||
textarea.js-shop-method-field(id="shop-method-{{fieldName.name}}" data-name=fieldName.name rows="2" maxlength="2000")
|
||||
else
|
||||
input.js-shop-method-field(id="shop-method-{{fieldName.name}}" type="text" data-name=fieldName.name maxlength="2000" placeholder=fieldName.placeholder)
|
||||
button.js-shop-method-add(type="button") {{_ 'billing-add-method'}}
|
||||
if error
|
||||
p.shop-notice.shop-error {{error}}
|
||||
if saved
|
||||
p.shop-saved {{_ 'feature-saved'}}
|
||||
button.primary(type="submit") {{_ 'save'}}
|
||||
@@ -0,0 +1,473 @@
|
||||
// Board View / Shop (shopView.jade, models/lib/shop.js). The board's own
|
||||
// subscription brings its lists, cards, custom fields and attachments - for a
|
||||
// visitor of a public board too - so the shop is drawn from them as they
|
||||
// change. Which product is open is in the address (?product=), so a product
|
||||
// can be linked to. The cart is this browser's (localStorage); the server
|
||||
// never trusts it for anything but card ids and quantities.
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { Random } from 'meteor/random';
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import { Utils } from '/client/lib/utils';
|
||||
import { METHOD_KEYS, FIELD_KEYS, PLACEHOLDERS, qrSvg, barcodeSvg } from '/client/lib/paymentCodeSvg';
|
||||
|
||||
const shop = require('/models/lib/shop');
|
||||
const { formatMoney } = require('/models/lib/billing');
|
||||
const { PAYMENT_METHODS, formatReference, formatIban } = require('/models/lib/paymentCodes');
|
||||
const { BOARD_VIEWS } = require('/models/lib/boardViewSettings');
|
||||
|
||||
const t = (key, options) => TAPi18n.__(key, options);
|
||||
const language = () => {
|
||||
try { return TAPi18n.getLanguage ? TAPi18n.getLanguage() : undefined; } catch (e) { return undefined; }
|
||||
};
|
||||
const errorText = error => (error ? (error.reason || error.error || error.message || String(error)) : '');
|
||||
|
||||
// ---------------------------------------------------------------- state
|
||||
|
||||
// What the shop shows: the products ('shop'), the cart, the checkout, or the
|
||||
// order just placed. The open product is the address's ?product=.
|
||||
const mode = new ReactiveVar('shop');
|
||||
const category = new ReactiveVar('');
|
||||
const placedOrder = new ReactiveVar(null);
|
||||
const cartLines = new ReactiveVar([]);
|
||||
let cartBoardId = null;
|
||||
|
||||
function storage() {
|
||||
try { return window.localStorage; } catch (e) { return null; }
|
||||
}
|
||||
|
||||
// The cart of the board on screen, read from this browser once per board.
|
||||
function cart() {
|
||||
const boardId = Utils.getCurrentBoardId();
|
||||
if (boardId !== cartBoardId) {
|
||||
cartBoardId = boardId;
|
||||
let lines = [];
|
||||
try {
|
||||
const raw = storage() && storage().getItem(shop.cartStorageKey(boardId));
|
||||
lines = raw ? shop.normalizeCart(JSON.parse(raw)).items : [];
|
||||
} catch (e) { lines = []; }
|
||||
cartLines.set(lines);
|
||||
}
|
||||
return cartLines.get();
|
||||
}
|
||||
|
||||
function saveCart(lines) {
|
||||
const clean = shop.normalizeCart(lines.filter(l => l.quantity > 0)).items;
|
||||
cartLines.set(clean);
|
||||
try { storage() && storage().setItem(shop.cartStorageKey(Utils.getCurrentBoardId()), JSON.stringify(clean)); } catch (e) { /* a private window keeps it on screen only */ }
|
||||
}
|
||||
|
||||
function addToCart(cardId, quantity) {
|
||||
const lines = cart().slice();
|
||||
const line = lines.find(l => l.cardId === cardId);
|
||||
if (line) line.quantity = Math.min(shop.LIMITS.quantity, line.quantity + quantity);
|
||||
else lines.push({ cardId, quantity });
|
||||
saveCart(lines);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- the board's shop
|
||||
|
||||
function board() {
|
||||
return Utils.getCurrentBoard();
|
||||
}
|
||||
|
||||
function settings() {
|
||||
return shop.shopSettingsOf(board());
|
||||
}
|
||||
|
||||
function coverUrlOf(product) {
|
||||
let image = product.coverId ? ReactiveCache.getAttachment(product.coverId) : null;
|
||||
if (!image || !image.isImage) {
|
||||
image = (ReactiveCache.getAttachments({ 'meta.cardId': product._id }) || []).find(a => a && a.isImage);
|
||||
}
|
||||
return image && typeof image.link === 'function' ? image.link() : '';
|
||||
}
|
||||
|
||||
function products() {
|
||||
const boardId = Utils.getCurrentBoardId();
|
||||
if (!boardId) return [];
|
||||
return shop.productsOf({
|
||||
lists: ReactiveCache.getLists({ boardId }) || [],
|
||||
cards: ReactiveCache.getCards({ boardId, archived: false }) || [],
|
||||
}, settings());
|
||||
}
|
||||
|
||||
function money(minor) {
|
||||
return formatMoney(minor, settings().currency, language());
|
||||
}
|
||||
|
||||
// The cart priced from the products on screen - what the buyer sees before
|
||||
// ordering. The server prices it again from the cards.
|
||||
function priced() {
|
||||
const items = cart();
|
||||
if (!items.length) return { lines: [] };
|
||||
const all = products();
|
||||
const known = new Set(all.map(p => p._id));
|
||||
const priceable = items.filter(i => known.has(i.cardId));
|
||||
if (!priceable.length) return { lines: [] };
|
||||
const result = shop.priceCart(priceable, all, settings());
|
||||
return result.error ? { lines: [], error: result.error } : result;
|
||||
}
|
||||
|
||||
function isBoardAdmin() {
|
||||
const user = ReactiveCache.getCurrentUser();
|
||||
return !!(user && typeof user.isBoardAdmin === 'function' && user.isBoardAdmin());
|
||||
}
|
||||
|
||||
function refusal() {
|
||||
const b = board();
|
||||
return shop.checkoutRefusal({ settings: settings(), featureOn: true, canRead: !!b, userId: Meteor.userId() });
|
||||
}
|
||||
|
||||
const ERROR_KEYS = {
|
||||
'shop-closed': 'shop-closed',
|
||||
'shop-guest-not-allowed': 'shop-login-to-order',
|
||||
'shop-price-changed': 'shop-price-changed',
|
||||
'shop-sold-out': 'shop-sold-out',
|
||||
'shop-not-enough-stock': 'shop-sold-out',
|
||||
'shop-no-orders-list': 'shop-closed',
|
||||
'shop-no-payment-method': 'shop-closed',
|
||||
};
|
||||
|
||||
function refusalTextOf(code) {
|
||||
return ERROR_KEYS[code] ? t(ERROR_KEYS[code]) : code;
|
||||
}
|
||||
|
||||
function goHome() {
|
||||
mode.set('shop');
|
||||
FlowRouter.setQueryParams({ product: null });
|
||||
}
|
||||
|
||||
const shared = { money, settings };
|
||||
|
||||
// ---------------------------------------------------------------- the shop
|
||||
|
||||
Template.shopView.helpers({
|
||||
...shared,
|
||||
mode: () => mode.get(),
|
||||
order: () => placedOrder.get(),
|
||||
isBoardAdmin,
|
||||
shopTitle() {
|
||||
const b = board();
|
||||
return settings().title || (b ? b.title : '');
|
||||
},
|
||||
shopIntro: () => settings().intro,
|
||||
// A closed shop shows its products to the board's admins only, so they can
|
||||
// see what it will look like before opening it.
|
||||
showShop: () => settings().enabled || isBoardAdmin(),
|
||||
cartCount: () => cart().reduce((n, l) => n + l.quantity, 0),
|
||||
category: () => category.get(),
|
||||
categories() {
|
||||
const b = board();
|
||||
return shop.categoriesOf(products(), b ? b.labels : [], settings());
|
||||
},
|
||||
products() {
|
||||
return shop.productsInCategory(products(), category.get())
|
||||
.map(p => ({ ...p, coverUrl: coverUrlOf(p), short: shop.shortDescription(p.description) }));
|
||||
},
|
||||
productPage() {
|
||||
const id = FlowRouter.getQueryParam('product');
|
||||
const product = id && products().find(p => p._id === id);
|
||||
if (!product) return null;
|
||||
return {
|
||||
...product,
|
||||
coverUrl: coverUrlOf(product),
|
||||
hasStock: product.stock !== null,
|
||||
maxQuantity: product.stock === null ? shop.LIMITS.quantity : Math.min(product.stock, shop.LIMITS.quantity),
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Template.shopView.events({
|
||||
'click .js-shop-home'(evt) {
|
||||
evt.preventDefault();
|
||||
goHome();
|
||||
},
|
||||
'click .js-shop-product'(evt) {
|
||||
evt.preventDefault();
|
||||
mode.set('shop');
|
||||
FlowRouter.setQueryParams({ product: evt.currentTarget.getAttribute('data-id') });
|
||||
window.scrollTo(0, 0);
|
||||
},
|
||||
'click .js-shop-category'(evt) {
|
||||
evt.preventDefault();
|
||||
category.set(evt.currentTarget.getAttribute('data-id') || '');
|
||||
},
|
||||
'click .js-shop-cart'(evt) {
|
||||
evt.preventDefault();
|
||||
mode.set('cart');
|
||||
},
|
||||
'click .js-shop-add-one'(evt) {
|
||||
evt.preventDefault();
|
||||
addToCart(evt.currentTarget.getAttribute('data-id'), 1);
|
||||
},
|
||||
'submit .js-shop-add'(evt) {
|
||||
evt.preventDefault();
|
||||
const quantity = parseInt(evt.currentTarget.elements.quantity.value, 10);
|
||||
if (!Number.isInteger(quantity) || quantity < 1) return;
|
||||
addToCart(evt.currentTarget.getAttribute('data-id'), Math.min(quantity, shop.LIMITS.quantity));
|
||||
mode.set('cart');
|
||||
},
|
||||
'click .js-open-shop-settings'(evt) {
|
||||
evt.preventDefault();
|
||||
Popup.open('boardShopSettings', { titleKey: 'board-view-shop', dataContext: board() })(evt);
|
||||
},
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------- the cart
|
||||
|
||||
Template.shopCart.helpers({
|
||||
...shared,
|
||||
priced,
|
||||
checkoutRefusal: refusal,
|
||||
refusalText: () => refusalTextOf(refusal()),
|
||||
priceErrorText: () => refusalTextOf(priced().error),
|
||||
});
|
||||
|
||||
Template.shopCart.events({
|
||||
'change .js-shop-quantity'(evt) {
|
||||
const cardId = evt.currentTarget.getAttribute('data-id');
|
||||
const quantity = parseInt(evt.currentTarget.value, 10);
|
||||
saveCart(cart().map(l => (l.cardId === cardId ? { cardId, quantity: Number.isInteger(quantity) ? Math.max(0, Math.min(quantity, shop.LIMITS.quantity)) : l.quantity } : l)));
|
||||
},
|
||||
'click .js-shop-remove'(evt) {
|
||||
evt.preventDefault();
|
||||
const cardId = evt.currentTarget.getAttribute('data-id');
|
||||
saveCart(cart().filter(l => l.cardId !== cardId));
|
||||
},
|
||||
'click .js-shop-checkout'(evt) {
|
||||
evt.preventDefault();
|
||||
if (!refusal()) mode.set('checkout');
|
||||
},
|
||||
});
|
||||
|
||||
Template.shopTotals.helpers(shared);
|
||||
|
||||
// ---------------------------------------------------------------- checkout
|
||||
|
||||
function methodLabel(entry) {
|
||||
const m = entry.method || {};
|
||||
return m.label || t(METHOD_KEYS[m.type] || m.type);
|
||||
}
|
||||
|
||||
Template.shopCheckout.onCreated(function () {
|
||||
this.error = new ReactiveVar('');
|
||||
this.sending = new ReactiveVar(false);
|
||||
});
|
||||
|
||||
Template.shopCheckout.helpers({
|
||||
...shared,
|
||||
priced,
|
||||
error: () => Template.instance().error.get(),
|
||||
sending: () => Template.instance().sending.get(),
|
||||
paymentMethods: () => shop.enabledPaymentMethods(settings()).map(m => ({ id: m.id, label: methodLabel(m) })),
|
||||
});
|
||||
|
||||
Template.shopCheckout.events({
|
||||
'click .js-shop-cart'(evt) {
|
||||
evt.preventDefault();
|
||||
mode.set('cart');
|
||||
},
|
||||
async 'submit .js-shop-place-order'(evt, tpl) {
|
||||
evt.preventDefault();
|
||||
const form = evt.currentTarget;
|
||||
const value = name => (form.elements[name] ? String(form.elements[name].value || '') : '');
|
||||
const method = form.querySelector('input[name="paymentMethodId"]:checked');
|
||||
const totals = priced();
|
||||
tpl.error.set('');
|
||||
tpl.sending.set(true);
|
||||
try {
|
||||
const order = await Meteor.callAsync('shopPlaceOrder', Utils.getCurrentBoardId(), {
|
||||
// Card ids and quantities only: the server prices the order itself.
|
||||
cart: cart().map(l => ({ cardId: l.cardId, quantity: l.quantity })),
|
||||
contact: {
|
||||
name: value('name'), email: value('email'), phone: value('phone'), address: value('address'), note: value('note'),
|
||||
termsAccepted: !!(form.elements.termsAccepted && form.elements.termsAccepted.checked),
|
||||
},
|
||||
paymentMethodId: method ? method.value : '',
|
||||
expectedTotalMinor: totals.totalMinor,
|
||||
// The confirmation e-mail is written in the buyer's language.
|
||||
language: language() || 'en',
|
||||
});
|
||||
saveCart([]);
|
||||
placedOrder.set(order);
|
||||
mode.set('done');
|
||||
window.scrollTo(0, 0);
|
||||
} catch (error) {
|
||||
tpl.error.set(refusalTextOf(error && error.error) !== (error && error.error) ? refusalTextOf(error.error) : errorText(error));
|
||||
} finally {
|
||||
tpl.sending.set(false);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------- the order placed
|
||||
|
||||
Template.shopOrderDone.helpers({
|
||||
...shared,
|
||||
methodLabel() {
|
||||
return methodLabel(this);
|
||||
},
|
||||
qrCode() {
|
||||
return this.qr ? qrSvg(this.qr, this.swissCross) : '';
|
||||
},
|
||||
barcodeCode() {
|
||||
return this.barcode ? barcodeSvg(this.barcode) : '';
|
||||
},
|
||||
// A payment link of the method: https, or a payment app's own scheme -
|
||||
// never anything a browser would run.
|
||||
safeLink() {
|
||||
const link = typeof this.link === 'string' ? this.link : '';
|
||||
return /^(https:\/\/|upi:\/\/|bitcoin:|ethereum:|litecoin:)/i.test(link) ? link : '';
|
||||
},
|
||||
formattedReference() {
|
||||
const order = Template.currentData().order;
|
||||
return order ? formatReference(order.reference) : '';
|
||||
},
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------- Board Settings / Shop
|
||||
|
||||
function fieldsOfBoard() {
|
||||
const boardId = Utils.getCurrentBoardId();
|
||||
return boardId ? (ReactiveCache.getCustomFields({ boardIds: { $in: [boardId] } }) || []) : [];
|
||||
}
|
||||
|
||||
Template.boardShopSettingsPopup.onCreated(function () {
|
||||
const b = board();
|
||||
const current = settings();
|
||||
// A board that never saved its shop gets the fields and the Orders list its
|
||||
// names suggest: a custom field called Price, a list called Orders.
|
||||
const suggested = shop.suggestedMapping({
|
||||
customFields: fieldsOfBoard(),
|
||||
lists: b ? (ReactiveCache.getLists({ boardId: b._id, archived: false }) || []) : [],
|
||||
});
|
||||
const stored = b && b.shopSettings;
|
||||
// A copied board's shop keeps its look but not the source's fields and
|
||||
// Orders list (models/lib/shop.js copiedShopSettings): suggest those too.
|
||||
const fill = {};
|
||||
for (const key of ['priceFieldId', 'skuFieldId', 'stockFieldId']) if (!current[key] && suggested[key]) fill[key] = suggested[key];
|
||||
if (!current.ordersListId && suggested.ordersListId) Object.assign(fill, { ordersListId: suggested.ordersListId, ordersBoardId: b._id });
|
||||
this.draft = new ReactiveVar(stored ? { ...current, ...fill } : { ...current, ...suggested, ordersBoardId: suggested.ordersListId ? b._id : '' });
|
||||
this.methods = new ReactiveVar(current.paymentMethods.slice());
|
||||
this.methodType = new ReactiveVar('sepa');
|
||||
this.targets = new ReactiveVar([]);
|
||||
this.error = new ReactiveVar('');
|
||||
this.saved = new ReactiveVar(false);
|
||||
Meteor.callAsync('shopOrderTargets').then(targets => this.targets.set(targets || [])).catch(error => this.error.set(errorText(error)));
|
||||
});
|
||||
|
||||
Template.boardShopSettingsPopup.helpers({
|
||||
draft: () => Template.instance().draft.get(),
|
||||
boardTitle: () => (board() ? board().title : ''),
|
||||
fieldsFor(key) {
|
||||
const types = shop.FIELD_TYPES[key] || [];
|
||||
return fieldsOfBoard().filter(f => types.includes(f.type)).map(f => ({ _id: f._id, name: f.name }));
|
||||
},
|
||||
referenceTypes: () => shop.REFERENCE_TYPES.map(value => ({ value, label: t(`billing-reference-${value}`) })),
|
||||
boardLists() {
|
||||
const b = board();
|
||||
const ticked = new Set(Template.instance().draft.get().saleListIds);
|
||||
return (b ? ReactiveCache.getLists({ boardId: b._id, archived: false }, { sort: { sort: 1 } }) || [] : [])
|
||||
.map(l => ({ _id: l._id, title: l.title, checked: ticked.has(l._id) }));
|
||||
},
|
||||
boardLabels() {
|
||||
const b = board();
|
||||
const ticked = new Set(Template.instance().draft.get().categoryLabelIds);
|
||||
return ((b && b.labels) || []).map(l => ({ _id: l._id, name: l.name || l.color, color: l.color, checked: ticked.has(l._id) }));
|
||||
},
|
||||
orderTargets: () => Template.instance().targets.get(),
|
||||
isOrdersList(boardId, listId) {
|
||||
const d = Template.instance().draft.get();
|
||||
return d.ordersListId === listId && (d.ordersBoardId || Utils.getCurrentBoardId()) === boardId;
|
||||
},
|
||||
showsOnPublic: () => shop.showsShopOnPublic(board()),
|
||||
// The view a visitor of this public board sees now, by its menu label.
|
||||
publicViewName() {
|
||||
const view = require('/models/lib/boardViewSettings').defaultBoardView(board(), 'public');
|
||||
const entry = BOARD_VIEWS.find(v => v.view === view);
|
||||
return entry ? t(entry.labelKey) : view;
|
||||
},
|
||||
draftMethods() {
|
||||
return Template.instance().methods.get().map(m => ({
|
||||
id: m.id, enabled: m.enabled !== false, label: methodLabel(m),
|
||||
summary: m.method.iban ? formatIban(m.method.iban)
|
||||
: (m.method.payee || m.method.key || m.method.vpa || m.method.address || m.method.user || m.method.url || m.method.details || ''),
|
||||
}));
|
||||
},
|
||||
methodTypes: () => Object.keys(PAYMENT_METHODS).map(value => ({ value, label: t(METHOD_KEYS[value] || value) })),
|
||||
methodType: () => Template.instance().methodType.get(),
|
||||
methodFields() {
|
||||
const spec = PAYMENT_METHODS[Template.instance().methodType.get()];
|
||||
return (spec ? spec.fields : []).map(name => ({ name, label: t(FIELD_KEYS[name] || name), placeholder: PLACEHOLDERS[name] || '' }));
|
||||
},
|
||||
error: () => Template.instance().error.get(),
|
||||
saved: () => Template.instance().saved.get(),
|
||||
});
|
||||
|
||||
Template.boardShopSettingsPopup.events({
|
||||
'change .js-shop-method-type'(evt, tpl) {
|
||||
tpl.methodType.set(evt.currentTarget.value);
|
||||
},
|
||||
'click .js-shop-method-add'(evt, tpl) {
|
||||
evt.preventDefault();
|
||||
const type = tpl.methodType.get();
|
||||
const method = { type };
|
||||
for (const name of PAYMENT_METHODS[type].fields) {
|
||||
const input = tpl.find(`.js-shop-method-field[data-name="${name}"]`);
|
||||
method[name] = input ? input.value : '';
|
||||
}
|
||||
tpl.methods.set([...tpl.methods.get(), { id: Random.id(12).replace(/[^A-Za-z0-9]/g, ''), enabled: true, method }]);
|
||||
tpl.findAll('.js-shop-method-field').forEach(input => { input.value = ''; });
|
||||
},
|
||||
'change .js-shop-method-enabled'(evt, tpl) {
|
||||
const id = evt.currentTarget.getAttribute('data-id');
|
||||
tpl.methods.set(tpl.methods.get().map(m => (m.id === id ? { ...m, enabled: evt.currentTarget.checked } : m)));
|
||||
},
|
||||
'click .js-shop-method-remove'(evt, tpl) {
|
||||
evt.preventDefault();
|
||||
const id = evt.currentTarget.getAttribute('data-id');
|
||||
tpl.methods.set(tpl.methods.get().filter(m => m.id !== id));
|
||||
},
|
||||
async 'submit .js-shop-settings'(evt, tpl) {
|
||||
evt.preventDefault();
|
||||
const form = evt.currentTarget;
|
||||
const el = form.elements;
|
||||
const ticked = name => [...form.querySelectorAll(`input[name="${name}"]:checked`)].map(i => i.value);
|
||||
const [ordersBoardId, ordersListId] = String(el.orders.value || '').split('/');
|
||||
const input = {
|
||||
enabled: el.enabled.checked,
|
||||
title: el.title.value,
|
||||
intro: el.intro.value,
|
||||
currency: el.currency.value,
|
||||
priceFieldId: el.priceFieldId.value,
|
||||
skuFieldId: el.skuFieldId.value,
|
||||
stockFieldId: el.stockFieldId.value,
|
||||
decrementStock: el.decrementStock.checked,
|
||||
confirmationEmail: el.confirmationEmail.checked,
|
||||
vatPercent: el.vatPercent.value === '' ? 0 : Number(el.vatPercent.value),
|
||||
pricesIncludeVat: el.pricesIncludeVat.checked,
|
||||
referenceType: el.referenceType.value,
|
||||
saleListIds: ticked('saleListIds'),
|
||||
categoryLabelIds: ticked('categoryLabelIds'),
|
||||
ordersBoardId: ordersBoardId || '',
|
||||
ordersListId: ordersListId || '',
|
||||
guestCheckout: el.guestCheckout.checked,
|
||||
termsUrl: el.termsUrl.value,
|
||||
paymentMethods: tpl.methods.get(),
|
||||
};
|
||||
tpl.error.set('');
|
||||
tpl.saved.set(false);
|
||||
try {
|
||||
const stored = await Meteor.callAsync('shopSetSettings', Utils.getCurrentBoardId(), input, el.showOnPublic.checked);
|
||||
tpl.draft.set(stored);
|
||||
tpl.methods.set(stored.paymentMethods.slice());
|
||||
tpl.saved.set(true);
|
||||
} catch (error) {
|
||||
tpl.error.set(errorText(error));
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -5,7 +5,7 @@ import CardComments from '/models/cardComments';
|
||||
import { Utils } from '/client/lib/utils';
|
||||
import { liveAttachments } from '/models/lib/attachmentSoftDelete';
|
||||
import { IMPORT_SOURCES } from '/models/lib/importSources';
|
||||
import { attachmentKind } from '/models/lib/attachmentKind';
|
||||
import { attachmentKind, attachmentCanPreview } from '/models/lib/attachmentKind';
|
||||
import { openAttachmentSlideshow } from '/client/components/cards/attachments';
|
||||
|
||||
const vcs = require('/models/lib/versionControlView');
|
||||
@@ -257,9 +257,8 @@ Template.versionControlView.helpers({
|
||||
_id: file._id,
|
||||
attachment: file,
|
||||
isImage: !!kind.isImage,
|
||||
// What the attachment viewer opens (cards/attachments.js attachmentCanBeOpened).
|
||||
canPreview: !!(kind.isImage || kind.isPDF || kind.isText || kind.isJSON
|
||||
|| kind.isOffice || kind.isZIP || kind.isVideo || kind.isAudio),
|
||||
// What the attachment viewer opens (models/lib/attachmentKind.js attachmentCanPreview).
|
||||
canPreview: attachmentCanPreview(file),
|
||||
name: file.name,
|
||||
link: typeof file.link === 'function' ? file.link() : '',
|
||||
size: humanSize(file.size),
|
||||
|
||||
@@ -399,31 +399,140 @@ button.attachment-thumbnail-container.attachment-thumbnail-compact:active {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#txt-viewer {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#office-viewer {
|
||||
background-color: #e5e7eb;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
/* Text, Markdown, CSV, code, iCalendar, Outlook .msg, tar and OpenDocument
|
||||
(client/lib/attachmentRichViewer.js), read windowed (attachmentWindow.js):
|
||||
the .attachment-window scrolls, its viewport stays in view and holds only
|
||||
the visible rows, and the spacer gives the scrollbar the file's length. */
|
||||
#rich-viewer,
|
||||
#zip-viewer {
|
||||
background: white;
|
||||
color: #222;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
padding: 1em;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
text-align: start;
|
||||
overflow-wrap: anywhere;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.attachment-window {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.attachment-window-viewport {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
padding: 0 1em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.attachment-window-row {
|
||||
height: 1.5em;
|
||||
line-height: 1.5em;
|
||||
white-space: pre;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-family: monospace;
|
||||
}
|
||||
.attachment-window-list {
|
||||
margin: 0;
|
||||
padding-inline-start: 1.2em;
|
||||
will-change: transform;
|
||||
}
|
||||
#rich-viewer li,
|
||||
#zip-viewer li {
|
||||
padding: 0.3em;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.attachment-csv-row {
|
||||
display: flex;
|
||||
font-family: inherit;
|
||||
}
|
||||
.attachment-csv-cell {
|
||||
flex: 0 0 14em;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
border-inline-end: 1px solid #c1c7d0;
|
||||
border-block-end: 1px solid #ebecf0;
|
||||
padding: 0 0.5em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.attachment-csv-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: #f4f5f7;
|
||||
font-weight: bold;
|
||||
z-index: 1;
|
||||
}
|
||||
.attachment-preview-code .attachment-window-viewport {
|
||||
background: #f6f8fa;
|
||||
}
|
||||
.attachment-preview-odf .attachment-window-list {
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
.attachment-preview-odf p,
|
||||
.attachment-preview-odf h3 {
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
margin: 0 0 0.5em;
|
||||
}
|
||||
.attachment-preview-page {
|
||||
border-block-start: 1px solid #c1c7d0;
|
||||
padding-block-start: 0.5em;
|
||||
}
|
||||
.attachment-preview-field .attachment-preview-label {
|
||||
display: inline-block;
|
||||
min-width: 8em;
|
||||
font-weight: bold;
|
||||
font-family: inherit;
|
||||
}
|
||||
.attachment-preview-records .attachment-window-row {
|
||||
font-family: inherit;
|
||||
}
|
||||
.attachment-preview-heading {
|
||||
font-weight: bold;
|
||||
}
|
||||
.attachment-preview-records .attachment-preview-page {
|
||||
font-weight: bold;
|
||||
border-block-start: 1px solid #c1c7d0;
|
||||
}
|
||||
.attachment-preview-markdown {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
padding: 1em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.attachment-preview-fields {
|
||||
display: grid;
|
||||
grid-template-columns: max-content 1fr;
|
||||
gap: 0.25em 1em;
|
||||
margin: 1em;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.attachment-preview-fields dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
.attachment-preview-fields dd {
|
||||
margin: 0;
|
||||
}
|
||||
.attachment-preview-mail-body {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
border-block-start: 1px solid #c1c7d0;
|
||||
}
|
||||
.pdf-preview-error {
|
||||
margin-top: 180px;
|
||||
@@ -465,7 +574,7 @@ button.attachment-thumbnail-container.attachment-thumbnail-compact:active {
|
||||
); /* Full height - height of top and bottom bars */
|
||||
}
|
||||
#zip-viewer,
|
||||
#txt-viewer,
|
||||
#rich-viewer,
|
||||
#office-viewer {
|
||||
width: 100%;
|
||||
height: calc(
|
||||
|
||||
@@ -77,11 +77,17 @@ template(name="attachmentViewer")
|
||||
audio#audio-viewer.hidden(controls="true")
|
||||
object#pdf-viewer.hidden(type="application/pdf")
|
||||
span.pdf-preview-error {{_ 'preview-pdf-not-supported' }}
|
||||
object#txt-viewer.hidden(type="text/plain")
|
||||
#zip-viewer.hidden(aria-live="polite")
|
||||
#office-viewer.hidden
|
||||
#rich-viewer.hidden(aria-live="polite")
|
||||
button.fa.fa-caret-right#next-attachment(type="button" aria-label="{{_ 'next'}}")
|
||||
|
||||
//- An attached Markdown file in the slideshow (client/lib/attachmentRichViewer.js):
|
||||
the same +viewer as a card description, with all of its settings.
|
||||
template(name="attachmentMarkdownPreview")
|
||||
+viewer
|
||||
= text
|
||||
|
||||
template(name="attachmentGallery")
|
||||
|
||||
.attachment-gallery
|
||||
|
||||
@@ -3,7 +3,7 @@ import { trapTabKey } from '/client/lib/accessibility';
|
||||
import { formatDateForDisplay } from '/client/lib/dateDisplay';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import '/client/components/cards/attachments.jade';
|
||||
import { attachmentKind } from '/models/lib/attachmentKind';
|
||||
import { attachmentKind, attachmentRichKind, attachmentCodeLanguage, attachmentCanPreview } from '/models/lib/attachmentKind';
|
||||
import { generateUniversalAttachmentUrl } from '/models/lib/universalUrlGenerator';
|
||||
import { canThumbnail, thumbnailUrl } from '/models/lib/attachmentThumbnail';
|
||||
import { liveAttachments } from '/models/lib/attachmentSoftDelete';
|
||||
@@ -24,6 +24,7 @@ import { EscapeActions } from '/client/lib/escapeActions';
|
||||
import { openNewDrawing } from '/client/lib/newDrawing';
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { Blaze } from 'meteor/blaze';
|
||||
|
||||
const { filesize } = require('filesize');
|
||||
import prettyMilliseconds from 'pretty-ms';
|
||||
@@ -41,9 +42,15 @@ let touchStartCoords = null;
|
||||
let touchEndCoords = null;
|
||||
|
||||
let zipPreviewAbortController = null;
|
||||
let zipPreview = null;
|
||||
let officePreview = null;
|
||||
let officePreviewAbortController = null;
|
||||
let officePreviewGeneration = 0;
|
||||
// Markdown, CSV, code, iCalendar, Outlook .msg, tar and OpenDocument
|
||||
// (client/lib/attachmentRichViewer.js, loaded the first time one is opened).
|
||||
let richPreview = null;
|
||||
let richPreviewAbortController = null;
|
||||
let richPreviewGeneration = 0;
|
||||
|
||||
Template.attachmentGallery.events({
|
||||
'click .open-preview'(event) {
|
||||
@@ -127,17 +134,25 @@ function attachmentCanBeOpened(attachment) {
|
||||
// shared helper - which derives them from the mime type or the file name -
|
||||
// rather than the raw document. Otherwise an image that renders as a
|
||||
// thumbnail still refuses to open in the viewer.
|
||||
const kind = attachmentKind(attachment);
|
||||
return (
|
||||
kind.isImage ||
|
||||
kind.isPDF ||
|
||||
kind.isText ||
|
||||
kind.isJSON ||
|
||||
kind.isOffice ||
|
||||
kind.isZIP ||
|
||||
kind.isVideo ||
|
||||
kind.isAudio
|
||||
);
|
||||
return attachmentCanPreview(attachment);
|
||||
}
|
||||
|
||||
// The rich viewer's Markdown: WeKan's own +viewer, so an attached .md follows
|
||||
// every setting a card description does (code shown as text, hidden links,
|
||||
// link schemes, sanitizing).
|
||||
function renderAttachmentMarkdown(holder, text) {
|
||||
const view = Blaze.renderWithData(Template.attachmentMarkdownPreview, { text }, holder);
|
||||
return { destroy() { Blaze.remove(view); } };
|
||||
}
|
||||
|
||||
function richPreviewLabels() {
|
||||
return {
|
||||
title: TAPi18n.__('title'), start: TAPi18n.__('card-start'), end: TAPi18n.__('card-end'),
|
||||
due: TAPi18n.__('card-due'), description: TAPi18n.__('description'),
|
||||
from: TAPi18n.__('email-view-from'), to: TAPi18n.__('email-view-to'), cc: TAPi18n.__('email-view-cc'),
|
||||
subject: TAPi18n.__('email-view-subject'), date: TAPi18n.__('email-view-date'),
|
||||
attachments: TAPi18n.__('attachments'), empty: TAPi18n.__('no-results'),
|
||||
};
|
||||
}
|
||||
|
||||
function getAttachmentUrl(attachment) {
|
||||
@@ -156,10 +171,37 @@ function openAttachmentViewer(attachmentId) {
|
||||
Instructions for adding a new viewer:
|
||||
- add a new case to the switch statement below
|
||||
- implement cleanup in the closeAttachmentViewer() function, if necessary
|
||||
- mark attachment type as openable by adding a new condition to the attachmentCanBeOpened function
|
||||
- mark attachment type as openable in attachmentCanPreview (models/lib/attachmentKind.js),
|
||||
which the card, the version control view, the history table and Admin Panel / Files share
|
||||
- a file that needs a library of its own goes in client/lib/attachmentRichViewer.js,
|
||||
loaded only when such a file is opened
|
||||
*/
|
||||
const kind = attachmentKind(attachment);
|
||||
// Any other text (a .txt, a .log) is read windowed as well, only what is on
|
||||
// the screen (client/lib/attachmentWindow.js).
|
||||
const rich = attachmentRichKind(attachment) || ((kind.isText || kind.isJSON) ? 'text' : null);
|
||||
switch(true){
|
||||
case (!!rich && !kind.isImage && !kind.isVideo && !kind.isAudio && !kind.isPDF): {
|
||||
const generation = ++richPreviewGeneration;
|
||||
const container = document.getElementById('rich-viewer');
|
||||
richPreviewAbortController = new AbortController();
|
||||
const { signal } = richPreviewAbortController;
|
||||
container.classList.remove('hidden');
|
||||
container.textContent = TAPi18n.__('loading');
|
||||
import('/client/lib/attachmentRichViewer').then(({ openRichAttachment }) => openRichAttachment({
|
||||
container, rich, signal, extension: kind.extension, language: attachmentCodeLanguage(attachment),
|
||||
size: attachment.size, url: getAttachmentUrl(attachment), labels: richPreviewLabels(),
|
||||
renderMarkdown: renderAttachmentMarkdown,
|
||||
})).then(preview => {
|
||||
if (generation !== richPreviewGeneration) { preview.destroy(); return; }
|
||||
richPreview = preview;
|
||||
}).catch(error => {
|
||||
if (generation !== richPreviewGeneration || signal.aborted) return;
|
||||
container.textContent = TAPi18n.__('error');
|
||||
console.error('Could not preview attachment:', error);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case (kind.isImage):
|
||||
$("#image-viewer").attr("src", getAttachmentUrl(attachment));
|
||||
// #337: the picture is named by its file for a screen reader.
|
||||
@@ -188,11 +230,6 @@ function openAttachmentViewer(attachmentId) {
|
||||
|
||||
$("#audio-viewer").removeClass("hidden");
|
||||
break;
|
||||
case (kind.isText):
|
||||
case (kind.isJSON):
|
||||
$("#txt-viewer").attr("data", getAttachmentUrl(attachment));
|
||||
$("#txt-viewer").removeClass("hidden");
|
||||
break;
|
||||
case (kind.isZIP): {
|
||||
const container = document.getElementById('zip-viewer');
|
||||
zipPreviewAbortController = new AbortController();
|
||||
@@ -201,6 +238,10 @@ function openAttachmentViewer(attachmentId) {
|
||||
container.textContent = TAPi18n.__('loading');
|
||||
openZipAttachment({ container, signal, size: attachment.size,
|
||||
url: getAttachmentUrl(attachment), emptyMessage: TAPi18n.__('no-results') })
|
||||
.then(preview => {
|
||||
if (signal.aborted) { preview.destroy(); return; }
|
||||
zipPreview = preview;
|
||||
})
|
||||
.catch(error => {
|
||||
if (signal.aborted) return;
|
||||
container.textContent = TAPi18n.__('error');
|
||||
@@ -258,8 +299,20 @@ export function openAttachmentSlideshow(attachmentId, attachmentIds = []) {
|
||||
}
|
||||
|
||||
function closeAttachmentViewer(restoreFocus = true) {
|
||||
richPreviewGeneration++;
|
||||
richPreviewAbortController?.abort();
|
||||
richPreviewAbortController = null;
|
||||
if (richPreview) {
|
||||
richPreview.destroy();
|
||||
richPreview = null;
|
||||
}
|
||||
const richViewer = document.getElementById('rich-viewer');
|
||||
richViewer?.replaceChildren();
|
||||
richViewer?.classList.add('hidden');
|
||||
zipPreviewAbortController?.abort();
|
||||
zipPreviewAbortController = null;
|
||||
zipPreview?.destroy();
|
||||
zipPreview = null;
|
||||
const zipViewer = document.getElementById('zip-viewer');
|
||||
zipViewer?.replaceChildren();
|
||||
zipViewer?.classList.add('hidden');
|
||||
@@ -285,8 +338,6 @@ function closeAttachmentViewer(restoreFocus = true) {
|
||||
$("#pdf-viewer").attr("data", "");
|
||||
$("#pdf-viewer").addClass("hidden");
|
||||
|
||||
$("#txt-viewer").attr("data", "");
|
||||
$("#txt-viewer").addClass("hidden");
|
||||
|
||||
$("#video-viewer").get(0)?.pause(); // Stop playback
|
||||
if ($("#video-viewer").get(0)) $("#video-viewer").get(0).currentTime = 0;
|
||||
|
||||
@@ -135,7 +135,9 @@ body.desktop-mode .card-details:not(.card-details-popup):not([style*="left"]):no
|
||||
top: 8px;
|
||||
inset-inline-start: auto;
|
||||
inset-inline-end: 8px;
|
||||
width: min(520px, 90vw);
|
||||
/* #6939: the dragged width, else the Admin Panel's percentage, else 520px
|
||||
(client/lib/cardDetailsWidthMemory.js sets the property). */
|
||||
width: var(--wekan-card-details-width, min(520px, 90vw));
|
||||
bottom: 8px;
|
||||
}
|
||||
|
||||
@@ -564,8 +566,12 @@ body.card-window-dragging {
|
||||
@media screen and (min-width: 801px) {
|
||||
.card-details {
|
||||
top: 97px;
|
||||
inset-inline-start: calc(50% - (520px / 2)); /* #6465: narrower card (was 600px) */
|
||||
width: 520px;
|
||||
/* #6465: narrower card (was 600px). #6939: the remembered width, which the
|
||||
card opened as a popup (Board Table view, search results, Roadmap bar)
|
||||
takes too, centred and within the viewport. */
|
||||
inset-inline-start: max(8px, calc(50% - (var(--wekan-card-details-width, 520px) / 2)));
|
||||
width: var(--wekan-card-details-width, 520px);
|
||||
max-width: calc(100vw - 16px);
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
resize: both;
|
||||
|
||||
@@ -1101,6 +1101,10 @@ template(name="cardSectionHeader")
|
||||
else
|
||||
span.grid-icon
|
||||
i.fa.fa-th-large
|
||||
//- The section's ? (featureHelp.jade), at the far end of the heading and
|
||||
before the hamburger, which then follows it instead of being pushed
|
||||
to the end itself (cardDetails.css).
|
||||
+featureHelp(id=sectionHelp)
|
||||
//- A section whose settings live somewhere gets a hamburger at the far end
|
||||
of its heading, like the card's own and the minicard's. `menuClass` is the
|
||||
handler that opens them; the click must not reach the heading, or opening
|
||||
@@ -1233,6 +1237,15 @@ template(name="cardDetailsActionsPopup")
|
||||
a.js-description-action-items
|
||||
i.fa.fa-tasks
|
||||
| {{_ 'action-items-create'}}
|
||||
//- #6939: every card opens at the width it was last dragged to; this goes
|
||||
back to the default (Admin Panel / Settings / Appearance, else 520px).
|
||||
Only shown when there is a dragged width to forget.
|
||||
if hasCardDetailsWidth
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-reset-card-details-width
|
||||
i.fa.fa-arrows-h
|
||||
| {{_ 'card-details-reset-width'}}
|
||||
hr
|
||||
ul.pop-over-list
|
||||
li.menu-group-heading {{_ 'menu-group-share'}}
|
||||
|
||||
@@ -22,11 +22,13 @@ import {
|
||||
import { canArchiveCard } from '/client/lib/archivePermission';
|
||||
import { isTextSelectionInsideCard } from '/client/lib/cardCloseGuard';
|
||||
import { placeCardDetailsX, MARGIN } from '/client/lib/cardDetailsPlacement';
|
||||
import { rememberCardDetailsWidth, hasCardDetailsWidth, resetCardDetailsWidth } from '/client/lib/cardDetailsWidthMemory';
|
||||
import { dueFromTitle } from '/client/components/forms/titleDueHint';
|
||||
import { riskOf } from '/client/lib/cardRiskOf';
|
||||
import Rules from '/models/rules';
|
||||
import { suggestedMembersFor } from '/client/lib/suggestedMembers';
|
||||
import '/client/components/cards/similarCards';
|
||||
import { webhooksOff } from '/client/lib/webhooksSwitch';
|
||||
|
||||
// Which dependency the icon picker should apply its choice to. The icon popup's
|
||||
// own data context is the dependency row (not the source card), so we capture
|
||||
@@ -51,6 +53,7 @@ import { CARD_RECURRENCE_INTERVALS } from '/models/lib/cardRecurrenceSchedule';
|
||||
import { isHexColor, isAllowedCardColor, toHex, contrastText, customColorsInUse } from '/models/lib/contrastColor';
|
||||
import { uniqBy } from '/imports/lib/collectionHelpers';
|
||||
import { memberTargetBoardId } from '/models/lib/linkedCardMembers';
|
||||
import { cardSectionHelpId } from '/models/lib/featureHelp';
|
||||
import { isSubmitKey } from '/models/lib/editorSubmitKey';
|
||||
import { Filter } from '/client/lib/filter';
|
||||
import { BoardSwimlaneListCardDialog } from '/client/lib/dialogWithBoardSwimlaneListCard';
|
||||
@@ -528,6 +531,8 @@ Template.cardDetails.onRendered(function () {
|
||||
if ($cardDetails.length) {
|
||||
Tracker.afterFlush(() => {
|
||||
const element = $cardDetails.get(0);
|
||||
// #6939: a drag of the resize handle is remembered for the next card.
|
||||
rememberCardDetailsWidth(element);
|
||||
try {
|
||||
anchorCardDetailsX(element);
|
||||
} finally {
|
||||
@@ -556,7 +561,8 @@ Template.cardDetails.onRendered(function () {
|
||||
url: '',
|
||||
};
|
||||
|
||||
const integrations = ReactiveCache.getIntegrations({
|
||||
// None while all webhooks are turned off (the server sends nothing anyway).
|
||||
const integrations = webhooksOff() ? [] : ReactiveCache.getIntegrations({
|
||||
boardId: { $in: [card.boardId, Integrations.Const.GLOBAL_WEBHOOK_ID] },
|
||||
enabled: true,
|
||||
activities: { $in: ['CardDetailsRendered', 'all'] },
|
||||
@@ -1154,6 +1160,14 @@ Template.registerHelper('attachmentCount', function attachmentCount() {
|
||||
Template.registerHelper('sectionCaret', section =>
|
||||
caretClassFor(isCardSectionOpen(section)));
|
||||
|
||||
// The section's ? (docs/Features/General/Help-Button.md): which help it shows
|
||||
// is models/lib/featureHelp.js CARD_SECTION_HELP.
|
||||
Template.cardSectionHeader.helpers({
|
||||
sectionHelp() {
|
||||
return cardSectionHelpId(this.section);
|
||||
},
|
||||
});
|
||||
|
||||
Template.cardSectionHeader.events({
|
||||
// A hamburger at the end of a heading opens that section's settings. Neither
|
||||
// may reach the heading itself: a click there folds the section, so opening
|
||||
@@ -1918,6 +1932,10 @@ Template.inlinedCardDescription.events({
|
||||
});
|
||||
|
||||
Template.cardDetailsActionsPopup.helpers({
|
||||
// #6939: "Reset width" is offered when there is a dragged width to forget.
|
||||
hasCardDetailsWidth() {
|
||||
return hasCardDetailsWidth();
|
||||
},
|
||||
// The moving and copying items: for who may change the card, and - as they
|
||||
// always were - for a member who is not read-only.
|
||||
cardMenuWrites() {
|
||||
@@ -1969,6 +1987,11 @@ Template.cardSpentTimeMenu.events({
|
||||
});
|
||||
|
||||
Template.cardDetailsActionsPopup.events({
|
||||
'click .js-reset-card-details-width'(event) {
|
||||
event.preventDefault();
|
||||
resetCardDetailsWidth();
|
||||
Popup.back();
|
||||
},
|
||||
// docs/Features/Cards/Action-Items.md: the description's action items.
|
||||
'click .js-description-action-items': Popup.open('actionItems', { titleKey: 'action-items' }),
|
||||
// History.md §7a: adding History to a menu is a menu item and this handler,
|
||||
@@ -3365,7 +3388,9 @@ EscapeActions.register(
|
||||
: null,
|
||||
getCardDetailsElement(getCurrentCardFromContext()?._id),
|
||||
);
|
||||
if (Session.get('cardDetailsIsDragging') || selectingInsideCard) {
|
||||
// #6939: a resize of the window by its corner handle ends outside the card
|
||||
// whenever it made it wider (client/lib/cardDetailsWidthMemory.js).
|
||||
if (Session.get('cardDetailsIsDragging') || Session.get('cardDetailsIsResizing') || selectingInsideCard) {
|
||||
// Reset dragging status as the mouse landed outside the cardDetails template area and this will prevent a mousedown event from firing
|
||||
Session.set('cardDetailsIsDragging', false);
|
||||
Session.set('cardDetailsIsMouseDown', false);
|
||||
|
||||
@@ -63,8 +63,7 @@
|
||||
(client/components/forms/forms.css) hides native checkboxes three ways -
|
||||
display, visibility, an offset - which left these with a label and no box
|
||||
to tick or see ticked. All three are undone, as in cardFlow.css. */
|
||||
.cloud-panel input[type="checkbox"],
|
||||
.js-cloud-panel-settings input[type="checkbox"] {
|
||||
.cloud-panel input[type="checkbox"] {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
@@ -76,3 +75,44 @@
|
||||
margin-inline-end: 4px;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
/* Support tickets: the support board's Open / In progress / Done lists, side
|
||||
by side as Board View / Lists draws a board, wrapping on a narrow screen. */
|
||||
.cloud-ticket-columns {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.8em;
|
||||
align-items: flex-start;
|
||||
margin-block: 0.8em;
|
||||
}
|
||||
.cloud-ticket-column {
|
||||
flex: 1 1 14em;
|
||||
min-width: 0;
|
||||
max-width: 24em;
|
||||
background: #e8e8e8;
|
||||
border-radius: 4px;
|
||||
padding: 0.5em;
|
||||
}
|
||||
.cloud-ticket-column-title {
|
||||
font-size: 1em;
|
||||
margin: 0 0 0.5em;
|
||||
}
|
||||
.cloud-ticket {
|
||||
background: #fff;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
||||
padding: 0.5em;
|
||||
margin-block-end: 0.5em;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.cloud-ticket-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.cloud-ticket-description {
|
||||
white-space: pre-wrap;
|
||||
margin-block: 0.3em;
|
||||
}
|
||||
.cloud-info th {
|
||||
text-align: start;
|
||||
padding-inline-end: 1em;
|
||||
}
|
||||
@@ -1,14 +1,16 @@
|
||||
//- Cloud Panel (docs/Features/Admin-Panel/Cloud-Panel.md): on the panel's own
|
||||
domain, the Cloud Admins' Cloudflare, Caddy, Domains, Invoices and Chat, and a
|
||||
customer's own Invoices and Chat. The server decides who sees what
|
||||
(server/cloudPanel.js); this page draws what it is given.
|
||||
//- Cloud Panel (docs/Features/Admin-Panel/Cloud-Panel.md): only where the server
|
||||
has the CLOUD environment variable, at that address. Admin Panel / Cloud is the
|
||||
Cloud Admins' Domains, Invoices, Tickets, Chat, Cloudflare, Caddy and Allowed
|
||||
addresses; /cloud is a customer's own domain, Invoices, Tickets and Chat. The
|
||||
server decides who sees what (server/cloudPanel.js); this page draws what it
|
||||
is given.
|
||||
|
||||
template(name="cloudPanel")
|
||||
.setting-content.cloud-panel
|
||||
if loading
|
||||
+spinner
|
||||
else if notAllowed
|
||||
p.quiet {{_ 'cloud-panel-not-allowed'}}
|
||||
p.quiet {{_ 'cloud-admin-not-allowed'}}
|
||||
else
|
||||
.content-body
|
||||
+leftMenu(menuItems)
|
||||
@@ -20,10 +22,16 @@ template(name="cloudPanel")
|
||||
+cloudPanelCloudflare(config=config reload=reload)
|
||||
else if $eq pane 'caddy'
|
||||
+cloudPanelCaddy(config=config reload=reload)
|
||||
else if $eq pane 'allowed-addresses'
|
||||
+cloudPanelAllowedAddresses(config=config reload=reload)
|
||||
else if $eq pane 'domains'
|
||||
+cloudPanelDomains
|
||||
else if $eq pane 'info'
|
||||
+cloudPanelInfo(domains=info.domains)
|
||||
else if $eq pane 'invoices'
|
||||
+cloudPanelInvoices(domains=info.domains isCloudAdmin=info.isCloudAdmin)
|
||||
else if $eq pane 'tickets'
|
||||
+cloudPanelTickets(domains=info.domains isCloudAdmin=info.isCloudAdmin)
|
||||
else if $eq pane 'chat'
|
||||
+cloudPanelChat(domains=info.domains isCloudAdmin=info.isCloudAdmin)
|
||||
|
||||
@@ -259,6 +267,9 @@ template(name="cloudPanelChat")
|
||||
form.js-cloud-chat-send
|
||||
textarea(name="text" maxlength="20000" rows="2" aria-label="{{_ 'cloud-panel-chat-message'}}" required)
|
||||
button.primary(type="submit") {{_ 'cloud-panel-chat-send'}}
|
||||
if boardPath
|
||||
p
|
||||
a.js-cloud-support-board(href=boardPath) {{_ 'cloud-support-board-open'}}
|
||||
if isCloudAdmin
|
||||
form.js-cloud-chat-import.cloud-form
|
||||
label(for="cloud-chat-source") {{_ 'cloud-panel-chat-import'}}
|
||||
@@ -270,18 +281,74 @@ template(name="cloudPanelChat")
|
||||
if imported
|
||||
span.quiet {{_ 'cloud-panel-chat-imported' count=imported}}
|
||||
|
||||
template(name="cloudPanelSettings")
|
||||
form.js-cloud-panel-settings.cloud-form
|
||||
p.quiet {{_ 'cloud-panel-settings-intro'}}
|
||||
label(for="cloud-settings-domain") {{_ 'cloud-panel-domain'}}
|
||||
input#cloud-settings-domain(type="text" name="domain" maxlength="253" value=settings.domain placeholder="cloud.example.com")
|
||||
label(for="cloud-settings-admin") {{_ 'cloud-superadmin-username'}}
|
||||
input#cloud-settings-admin(type="text" name="superAdminUsername" maxlength="254" value=settings.superAdminUsername)
|
||||
//- Admin Panel / Cloud / Allowed addresses (models/lib/cloudAddresses.js): the
|
||||
server refuses a list without the Cloud Admin's own address, and the page
|
||||
says so before it is sent.
|
||||
template(name="cloudPanelAllowedAddresses")
|
||||
form.js-cloud-addresses.cloud-form
|
||||
p.quiet {{_ 'cloud-allowed-addresses-desc'}}
|
||||
label(for="cloud-addresses") {{_ 'cloud-allowed-addresses'}}
|
||||
textarea#cloud-addresses.js-cloud-addresses-text(name="addresses" rows="6" maxlength="12000" placeholder="203.0.113.0/24, 2001:db8::/32") {{addressesText}}
|
||||
p.quiet.js-cloud-your-address {{_ 'cloud-allowed-addresses-yours' address=config.yourAddress}}
|
||||
if lockout
|
||||
.warning.js-cloud-addresses-lockout {{_ 'cloud-allowed-addresses-lockout' address=config.yourAddress}}
|
||||
button.primary(type="submit") {{_ 'save'}}
|
||||
if saved
|
||||
span.quiet {{_ 'cloud-saved'}}
|
||||
if error
|
||||
.warning {{error}}
|
||||
if settings.domain
|
||||
|
||||
//- A customer's own domain: what the hosting is.
|
||||
template(name="cloudPanelInfo")
|
||||
each domain in domains
|
||||
table.cloud-info
|
||||
tbody
|
||||
tr
|
||||
th {{_ 'domain'}}
|
||||
td {{domain.domain}}
|
||||
tr
|
||||
th {{_ 'cloud-customer-name'}}
|
||||
td {{domain.customerName}}
|
||||
tr
|
||||
th {{_ 'cloud-start-date'}}
|
||||
td {{domain.startDate}}
|
||||
tr
|
||||
th {{_ 'cloud-end-date'}}
|
||||
td {{domain.endDate}}
|
||||
tr
|
||||
th {{_ 'cloud-panel-mode'}}
|
||||
td
|
||||
if $eq domain.mode 'shared'
|
||||
| {{_ 'cloud-panel-mode-shared'}}
|
||||
else
|
||||
| {{_ 'cloud-panel-mode-own'}}
|
||||
|
||||
//- Support tickets: the cards of the domain's support board, in its Open, In
|
||||
progress and Done lists, drawn the way Board View / Lists draws a board.
|
||||
template(name="cloudPanelTickets")
|
||||
.cloud-tickets
|
||||
label(for="cloud-tickets-domain") {{_ 'domain'}}
|
||||
select#cloud-tickets-domain.js-cloud-tickets-domain
|
||||
each domain in ticketDomains
|
||||
option(value=domain._id selected="{{#if $eq domain._id domainId}}selected{{/if}}") {{domain.domain}}
|
||||
if board
|
||||
.cloud-ticket-columns
|
||||
each column in board.columns
|
||||
.cloud-ticket-column(class="cloud-ticket-{{column.key}}" data-state=column.key)
|
||||
h3.cloud-ticket-column-title {{columnTitle column.key}}
|
||||
each card in column.cards
|
||||
.cloud-ticket
|
||||
.cloud-ticket-title {{card.title}}
|
||||
if card.description
|
||||
.cloud-ticket-description {{card.description}}
|
||||
.quiet {{card.author}} · {{when card.createdAt}}
|
||||
if isCloudAdmin
|
||||
select.js-cloud-ticket-move(data-id=card._id aria-label="{{_ 'tickets'}}")
|
||||
each state in states
|
||||
option(value=state selected="{{#if $eq state column.key}}selected{{/if}}") {{columnTitle state}}
|
||||
form.js-cloud-ticket-add.cloud-form
|
||||
label(for="cloud-ticket-title") {{_ 'title'}}
|
||||
input#cloud-ticket-title(type="text" name="title" maxlength="500" required)
|
||||
label(for="cloud-ticket-description") {{_ 'description'}}
|
||||
textarea#cloud-ticket-description(name="description" maxlength="20000" rows="3")
|
||||
button.primary(type="submit") {{_ 'cloud-ticket-add'}}
|
||||
p
|
||||
a(href="https://{{settings.domain}}/cloud" target="_blank" rel="noopener noreferrer") https://{{settings.domain}}/cloud
|
||||
a.js-cloud-support-board(href=boardPath) {{_ 'cloud-support-board-open'}}
|
||||
@@ -4,10 +4,14 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { Session } from 'meteor/session';
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import { leftMenuData, paneTitle } from '/models/lib/leftMenu';
|
||||
import { buildHeader, pageInfo, TABLE_PAGE_ROWS_PER_PAGE } from '/models/lib/tablePage';
|
||||
const { formatMoney } = require('/models/lib/billing');
|
||||
const { TICKET_STATES, SUPPORT_LISTS } = require('/models/lib/cloudPanel');
|
||||
const { normalizeAllowedAddresses, addressAllowed } = require('/models/lib/cloudAddresses');
|
||||
|
||||
function errorText(error) {
|
||||
return error ? (error.reason || error.message || String(error)) : '';
|
||||
@@ -38,18 +42,48 @@ function report(promise) {
|
||||
|
||||
// ---------------------------------------------------------------- the page
|
||||
|
||||
// Admin Panel / Cloud, for a Cloud Admin; /cloud shows a customer their own.
|
||||
const ADMIN_MENU = [
|
||||
{ id: 'domains', icon: 'fa-globe', labelKey: 'domains' },
|
||||
{ id: 'invoices', icon: 'fa-file-text-o', labelKey: 'billing-invoices' },
|
||||
{ id: 'tickets', icon: 'fa-ticket', labelKey: 'tickets' },
|
||||
{ id: 'chat', icon: 'fa-comments', labelKey: 'board-view-chat' },
|
||||
{ id: 'cloudflare', icon: 'fa-cloud', label: 'Cloudflare' },
|
||||
{ id: 'caddy', icon: 'fa-server', label: 'Caddy' },
|
||||
{ id: 'allowed-addresses', icon: 'fa-shield', labelKey: 'cloud-allowed-addresses' },
|
||||
];
|
||||
const CUSTOMER_MENU = ADMIN_MENU.filter(item => ['invoices', 'chat'].includes(item.id));
|
||||
const CUSTOMER_MENU = [
|
||||
{ id: 'info', icon: 'fa-info-circle', labelKey: 'info' },
|
||||
...ADMIN_MENU.filter(item => ['invoices', 'tickets', 'chat'].includes(item.id)),
|
||||
];
|
||||
|
||||
function menu(info) {
|
||||
return info.isCloudAdmin ? ADMIN_MENU : CUSTOMER_MENU;
|
||||
}
|
||||
|
||||
// The pane to show: on Admin Panel / Cloud the one its address names, on
|
||||
// /cloud the one last clicked; one the menu does not have opens the first.
|
||||
function currentPane(tpl) {
|
||||
const items = menu(tpl.info.get());
|
||||
const wanted = FlowRouter.getRouteName() === 'cloud-admin' ? Session.get('cloudOpenPane') : tpl.pane.get();
|
||||
return items.some(item => item.id === wanted) ? wanted : items[0].id;
|
||||
}
|
||||
|
||||
// Every domain, for a Cloud Admin's pickers: the table's pages, one by one.
|
||||
function allDomains() {
|
||||
return Meteor.callAsync('cloudPanelDomainsCount', '')
|
||||
.then(total => Promise.all(Array.from({ length: Math.ceil(total / TABLE_PAGE_ROWS_PER_PAGE) }, (_, i) =>
|
||||
Meteor.callAsync('cloudPanelDomainsPage', { page: i + 1 }))))
|
||||
.then(pages => pages.flat());
|
||||
}
|
||||
|
||||
function boardPathOf(board) {
|
||||
return board && board.boardId ? `/b/${board.boardId}/${board.boardSlug || 'board'}` : '';
|
||||
}
|
||||
|
||||
Template.cloudPanel.onCreated(function () {
|
||||
this.loading = new ReactiveVar(true);
|
||||
this.info = new ReactiveVar({ onCloudHost: false, isCloudAdmin: false, domains: [] });
|
||||
this.info = new ReactiveVar({ enabled: false, onCloudHost: false, isCloudAdmin: false, domains: [] });
|
||||
this.config = new ReactiveVar(null);
|
||||
this.pane = new ReactiveVar('');
|
||||
panelError.set('');
|
||||
@@ -57,35 +91,31 @@ Template.cloudPanel.onCreated(function () {
|
||||
Meteor.callAsync('cloudPanelWhoAmI')
|
||||
.then(info => {
|
||||
this.info.set(info);
|
||||
this.pane.set(info.isCloudAdmin ? 'domains' : 'invoices');
|
||||
return info.isCloudAdmin ? this.loadConfig() : null;
|
||||
})
|
||||
.catch(error => panelError.set(errorText(error)))
|
||||
.finally(() => this.loading.set(false));
|
||||
});
|
||||
|
||||
function menu(info) {
|
||||
return info.isCloudAdmin ? ADMIN_MENU : CUSTOMER_MENU;
|
||||
}
|
||||
|
||||
Template.cloudPanel.helpers({
|
||||
loading: () => Template.instance().loading.get(),
|
||||
info: () => Template.instance().info.get(),
|
||||
config: () => Template.instance().config.get(),
|
||||
pane: () => Template.instance().pane.get(),
|
||||
pane: () => currentPane(Template.instance()),
|
||||
actionError: () => panelError.get(),
|
||||
// Not at the Cloud Panel Domain, or neither the SuperAdmin nor a customer.
|
||||
// No CLOUD on this server, not at its address, or neither a Cloud Admin
|
||||
// nor a customer here.
|
||||
notAllowed() {
|
||||
const info = Template.instance().info.get();
|
||||
return !info.onCloudHost || !(info.isCloudAdmin || info.domains.length > 0);
|
||||
return !info.enabled || !info.onCloudHost || !(info.isCloudAdmin || info.domains.length > 0);
|
||||
},
|
||||
menuItems() {
|
||||
const tpl = Template.instance();
|
||||
return leftMenuData(menu(tpl.info.get()), tpl.pane.get(), 'js-cloud-menu');
|
||||
return leftMenuData(menu(tpl.info.get()), currentPane(tpl), 'js-cloud-menu');
|
||||
},
|
||||
paneTitleData() {
|
||||
const tpl = Template.instance();
|
||||
return paneTitle(menu(tpl.info.get()), tpl.pane.get());
|
||||
return paneTitle(menu(tpl.info.get()), currentPane(tpl));
|
||||
},
|
||||
reload() {
|
||||
const tpl = Template.instance();
|
||||
@@ -97,7 +127,9 @@ Template.cloudPanel.events({
|
||||
'click a.js-cloud-menu'(event, tpl) {
|
||||
event.preventDefault();
|
||||
panelError.set('');
|
||||
tpl.pane.set(event.currentTarget.getAttribute('data-id'));
|
||||
const id = event.currentTarget.getAttribute('data-id');
|
||||
if (FlowRouter.getRouteName() === 'cloud-admin') FlowRouter.go(`/admin/cloud/${id}`);
|
||||
else tpl.pane.set(id);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -350,12 +382,7 @@ Template.cloudPanelInvoices.onCreated(function () {
|
||||
this.allDomains = new ReactiveVar([]);
|
||||
this.load = () => Meteor.callAsync('cloudPanelInvoices').then(invoices => this.invoices.set(invoices));
|
||||
this.load();
|
||||
if (Template.currentData().isCloudAdmin) {
|
||||
Meteor.callAsync('cloudPanelDomainsCount', '')
|
||||
.then(total => Promise.all(Array.from({ length: Math.ceil(total / TABLE_PAGE_ROWS_PER_PAGE) }, (_, i) =>
|
||||
Meteor.callAsync('cloudPanelDomainsPage', { page: i + 1 }))))
|
||||
.then(pages => this.allDomains.set(pages.flat()));
|
||||
}
|
||||
if (Template.currentData().isCloudAdmin) allDomains().then(domains => this.allDomains.set(domains));
|
||||
});
|
||||
|
||||
Template.cloudPanelInvoices.helpers({
|
||||
@@ -387,20 +414,24 @@ Template.cloudPanelChat.onCreated(function () {
|
||||
this.domainId = new ReactiveVar((this.domains.get()[0] || {})._id || '');
|
||||
this.messages = new ReactiveVar([]);
|
||||
this.imported = new ReactiveVar(0);
|
||||
this.boardPath = new ReactiveVar('');
|
||||
this.load = () => {
|
||||
const id = this.domainId.get();
|
||||
if (!id) return Promise.resolve();
|
||||
return Meteor.callAsync('cloudPanelChat', id).then(messages => this.messages.set(messages));
|
||||
};
|
||||
// The support board itself, to open in Board View / Chat.
|
||||
this.autorun(() => {
|
||||
const id = this.domainId.get();
|
||||
if (!id) return;
|
||||
Meteor.callAsync('cloudPanelTickets', id).then(board => this.boardPath.set(boardPathOf(board))).catch(() => this.boardPath.set(''));
|
||||
});
|
||||
if (Template.currentData().isCloudAdmin) {
|
||||
Meteor.callAsync('cloudPanelDomainsCount', '')
|
||||
.then(total => Promise.all(Array.from({ length: Math.ceil(total / TABLE_PAGE_ROWS_PER_PAGE) }, (_, i) =>
|
||||
Meteor.callAsync('cloudPanelDomainsPage', { page: i + 1 }))))
|
||||
.then(pages => {
|
||||
this.domains.set(pages.flat());
|
||||
if (!this.domainId.get() && pages.flat()[0]) this.domainId.set(pages.flat()[0]._id);
|
||||
return this.load();
|
||||
});
|
||||
allDomains().then(domains => {
|
||||
this.domains.set(domains);
|
||||
if (!this.domainId.get() && domains[0]) this.domainId.set(domains[0]._id);
|
||||
return this.load();
|
||||
});
|
||||
} else {
|
||||
this.load();
|
||||
}
|
||||
@@ -417,6 +448,7 @@ Template.cloudPanelChat.helpers({
|
||||
domainId: () => Template.instance().domainId.get(),
|
||||
messages: () => Template.instance().messages.get(),
|
||||
imported: () => Template.instance().imported.get(),
|
||||
boardPath: () => Template.instance().boardPath.get(),
|
||||
when: at => (at ? new Date(at).toLocaleString(language()) : ''),
|
||||
});
|
||||
|
||||
@@ -446,29 +478,103 @@ Template.cloudPanelChat.events({
|
||||
},
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------- Admin Panel
|
||||
// ---------------------------------------------------------------- Tickets
|
||||
|
||||
// Admin Panel / People / Cloud: the Cloud Panel Domain and its SuperAdmin.
|
||||
Template.cloudPanelSettings.onCreated(function () {
|
||||
this.settings = new ReactiveVar({ domain: '', superAdminUsername: '' });
|
||||
this.saved = new ReactiveVar(false);
|
||||
this.error = new ReactiveVar('');
|
||||
Meteor.callAsync('cloudPanelGetSettings').then(s => this.settings.set(s)).catch(e => this.error.set(errorText(e)));
|
||||
Template.cloudPanelTickets.onCreated(function () {
|
||||
this.domains = new ReactiveVar(Template.currentData().domains || []);
|
||||
this.domainId = new ReactiveVar((this.domains.get()[0] || {})._id || '');
|
||||
this.board = new ReactiveVar(null);
|
||||
this.load = () => {
|
||||
const id = this.domainId.get();
|
||||
if (!id) return Promise.resolve();
|
||||
return report(Meteor.callAsync('cloudPanelTickets', id).then(board => this.board.set(board)));
|
||||
};
|
||||
if (Template.currentData().isCloudAdmin) {
|
||||
allDomains().then(domains => {
|
||||
this.domains.set(domains);
|
||||
if (!this.domainId.get() && domains[0]) this.domainId.set(domains[0]._id);
|
||||
return this.load();
|
||||
});
|
||||
} else {
|
||||
this.load();
|
||||
}
|
||||
this.poll = Meteor.setInterval(() => this.load(), 30000);
|
||||
});
|
||||
|
||||
Template.cloudPanelSettings.helpers({
|
||||
settings: () => Template.instance().settings.get(),
|
||||
saved: () => Template.instance().saved.get(),
|
||||
error: () => Template.instance().error.get(),
|
||||
Template.cloudPanelTickets.onDestroyed(function () {
|
||||
Meteor.clearInterval(this.poll);
|
||||
});
|
||||
|
||||
Template.cloudPanelSettings.events({
|
||||
'submit .js-cloud-panel-settings'(event, tpl) {
|
||||
const COLUMN_KEYS = Object.fromEntries(SUPPORT_LISTS.map(list => [list.key, list.titleKey]));
|
||||
|
||||
Template.cloudPanelTickets.helpers({
|
||||
ticketDomains: () => Template.instance().domains.get(),
|
||||
domainId: () => Template.instance().domainId.get(),
|
||||
board: () => Template.instance().board.get(),
|
||||
states: () => TICKET_STATES,
|
||||
columnTitle: key => TAPi18n.__(COLUMN_KEYS[key] || key),
|
||||
boardPath: () => boardPathOf(Template.instance().board.get()),
|
||||
when: at => (at ? new Date(at).toLocaleString(language()) : ''),
|
||||
});
|
||||
|
||||
Template.cloudPanelTickets.events({
|
||||
'change .js-cloud-tickets-domain'(event, tpl) {
|
||||
tpl.domainId.set(event.currentTarget.value);
|
||||
tpl.board.set(null);
|
||||
tpl.load();
|
||||
},
|
||||
'submit .js-cloud-ticket-add'(event, tpl) {
|
||||
event.preventDefault();
|
||||
const form = event.currentTarget;
|
||||
tpl.saved.set(false);
|
||||
Meteor.callAsync('cloudPanelSetSettings', { domain: field(form, 'domain'), superAdminUsername: field(form, 'superAdminUsername') })
|
||||
.then(s => { tpl.settings.set(s); tpl.saved.set(true); tpl.error.set(''); })
|
||||
.catch(e => tpl.error.set(errorText(e)));
|
||||
report(Meteor.callAsync('cloudPanelAddTicket', tpl.domainId.get(), { title: field(form, 'title'), description: field(form, 'description') })
|
||||
.then(() => { form.reset(); return tpl.load(); }));
|
||||
},
|
||||
'change .js-cloud-ticket-move'(event, tpl) {
|
||||
report(Meteor.callAsync('cloudPanelMoveTicket', tpl.domainId.get(), event.currentTarget.getAttribute('data-id'), event.currentTarget.value)
|
||||
.then(() => tpl.load()));
|
||||
},
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------- Allowed addresses
|
||||
|
||||
Template.cloudPanelAllowedAddresses.onCreated(function () {
|
||||
this.text = new ReactiveVar(null);
|
||||
this.saved = new ReactiveVar(false);
|
||||
});
|
||||
|
||||
// Would this list lock the Cloud Admin out? The same rule the server applies
|
||||
// when it refuses to save it.
|
||||
function locksOut(text, yourAddress) {
|
||||
let list;
|
||||
try { list = normalizeAllowedAddresses(text); } catch (e) { return false; }
|
||||
return list.length > 0 && !addressAllowed(yourAddress, list);
|
||||
}
|
||||
|
||||
Template.cloudPanelAllowedAddresses.helpers({
|
||||
addressesText() {
|
||||
const config = Template.currentData().config;
|
||||
return ((config && config.allowedAddresses) || []).join('\n');
|
||||
},
|
||||
lockout() {
|
||||
const tpl = Template.instance();
|
||||
const config = Template.currentData().config || {};
|
||||
const text = tpl.text.get();
|
||||
return text !== null && locksOut(text, config.yourAddress);
|
||||
},
|
||||
saved: () => Template.instance().saved.get(),
|
||||
});
|
||||
|
||||
Template.cloudPanelAllowedAddresses.events({
|
||||
'input .js-cloud-addresses-text'(event, tpl) {
|
||||
tpl.saved.set(false);
|
||||
tpl.text.set(event.currentTarget.value);
|
||||
},
|
||||
'submit .js-cloud-addresses'(event, tpl) {
|
||||
event.preventDefault();
|
||||
const form = event.currentTarget;
|
||||
const { reload } = Template.currentData();
|
||||
tpl.saved.set(false);
|
||||
report(Meteor.callAsync('cloudPanelSetAllowedAddresses', form.elements.addresses.value)
|
||||
.then(() => { tpl.saved.set(true); tpl.text.set(null); return reload(); }));
|
||||
},
|
||||
});
|
||||
@@ -9,7 +9,7 @@ import { Meteor } from 'meteor/meteor';
|
||||
// caught that; the build did, first time.
|
||||
import { formatDateTime } from '/imports/lib/dateUtils';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { attachmentKind } from '/models/lib/attachmentKind';
|
||||
import { attachmentCanPreview } from '/models/lib/attachmentKind';
|
||||
import { historyRowOffersRestore } from '/models/lib/attachmentSoftDelete';
|
||||
import { openAttachmentSlideshow } from '/client/components/cards/attachments';
|
||||
|
||||
@@ -157,13 +157,11 @@ function attachmentForRow(row) {
|
||||
if (!row || row.entityType !== 'attachment') return null;
|
||||
const attachment = ReactiveCache.getAttachment(row.entityId);
|
||||
if (!attachment) return null;
|
||||
const kind = attachmentKind(attachment);
|
||||
return {
|
||||
_id: attachment._id,
|
||||
name: attachment.name,
|
||||
link: typeof attachment.link === 'function' ? attachment.link() : '',
|
||||
canPreview: !!(kind.isImage || kind.isPDF || kind.isText || kind.isJSON
|
||||
|| kind.isOffice || kind.isVideo || kind.isAudio),
|
||||
canPreview: attachmentCanPreview(attachment),
|
||||
isDeleted: historyRowOffersRestore(row, attachment),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -226,7 +226,9 @@ Template.listHeader.helpers({
|
||||
showCardsCountForList(count) {
|
||||
const currentUser = ReactiveCache.getCurrentUser();
|
||||
const limit = currentUser ? currentUser.getLimitToShowCardsCount() : false;
|
||||
return limit >= 0 && count >= limit;
|
||||
// "Show cards count if list contains more than N": more than, as it says
|
||||
// (it showed at N as well).
|
||||
return limit >= 0 && count > limit;
|
||||
},
|
||||
|
||||
cardsCountForListIsOne(count) {
|
||||
|
||||
@@ -154,7 +154,8 @@
|
||||
color: #555;
|
||||
}
|
||||
.billing-draft-lines li.billing-line-fee,
|
||||
.billing-draft-lines li.billing-line-expense {
|
||||
.billing-draft-lines li.billing-line-expense,
|
||||
.billing-draft-lines li.billing-line-product {
|
||||
font-style: italic;
|
||||
}
|
||||
.billing-quote-accepted td:first-child {
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
template(name="billing")
|
||||
if currentUser
|
||||
.billing-page
|
||||
h1 {{_ 'billing-title'}}
|
||||
h1.feature-help-title
|
||||
| {{_ 'billing-title'}}
|
||||
+featureHelp(id='billing')
|
||||
p.billing-intro {{_ 'billing-intro'}}
|
||||
if loading
|
||||
+spinner
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import qrcode from 'qrcode-generator';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
const { formatMoney, EXPENSE_CATEGORIES } = require('/models/lib/billing');
|
||||
// The payment methods' labels and placeholders, and their QR codes and
|
||||
// barcode as SVG, are shared with Board View / Shop (client/lib/paymentCodeSvg.js).
|
||||
import { METHOD_KEYS, FIELD_KEYS, PLACEHOLDERS, qrSvg, barcodeSvg } from '/client/lib/paymentCodeSvg';
|
||||
const { formatMoney, EXPENSE_CATEGORIES, LINE_KIND_LABEL_KEYS } = require('/models/lib/billing');
|
||||
const { minorToText } = require('/models/lib/currencies');
|
||||
const { PAYMENT_METHODS, code128CModules, formatReference, formatIban } = require('/models/lib/paymentCodes');
|
||||
const { PAYMENT_METHODS, formatReference, formatIban } = require('/models/lib/paymentCodes');
|
||||
|
||||
function t(key, options) {
|
||||
return TAPi18n.__(key, options);
|
||||
@@ -36,63 +38,6 @@ const ACTION_KEYS = { sent: 'billing-mark-sent', paid: 'billing-mark-paid', void
|
||||
const QUOTE_STATE_KEYS = { draft: 'billing-status-draft', sent: 'billing-status-sent', accepted: 'billing-quote-accepted', declined: 'billing-quote-declined' };
|
||||
const QUOTE_NEXT = { draft: ['sent', 'declined'], sent: ['accepted', 'declined', 'draft'], accepted: [], declined: [] };
|
||||
const QUOTE_ACTION_KEYS = { sent: 'billing-mark-sent', accepted: 'accept', declined: 'decline', draft: 'billing-back-to-draft' };
|
||||
const METHOD_KEYS = {
|
||||
sepa: 'billing-method-sepa', 'fi-bank': 'billing-method-fi-bank', 'swiss-qr': 'billing-method-swiss-qr',
|
||||
'bank-transfer': 'billing-method-bank-transfer', swish: 'billing-method-swish', pix: 'billing-method-pix',
|
||||
upi: 'billing-method-upi', bitcoin: 'billing-method-bitcoin', paypal: 'billing-method-paypal', link: 'billing-method-link',
|
||||
cash: 'billing-method-cash', cheque: 'billing-method-cheque', other: 'billing-method-other',
|
||||
promptpay: 'billing-method-promptpay', paynow: 'billing-method-paynow', vietqr: 'billing-method-vietqr', fps: 'billing-method-fps',
|
||||
spayd: 'billing-method-spayd', zbp: 'billing-method-zbp', mnb: 'billing-method-mnb', ips: 'billing-method-ips',
|
||||
'dk-fik': 'billing-method-dk-fik', ethereum: 'billing-method-ethereum', litecoin: 'billing-method-litecoin',
|
||||
};
|
||||
const FIELD_KEYS = {
|
||||
name: 'billing-field-name', iban: 'billing-field-iban', bic: 'billing-field-bic', street: 'billing-field-street',
|
||||
building: 'billing-field-building', postcode: 'billing-field-postcode', town: 'billing-field-town', country: 'billing-country',
|
||||
details: 'billing-field-details', payee: 'billing-field-payee', key: 'billing-field-pix-key', city: 'billing-field-town',
|
||||
vpa: 'billing-field-vpa', address: 'billing-field-crypto-address', user: 'billing-field-paypal-user', label: 'billing-field-label',
|
||||
url: 'billing-field-url', target: 'billing-field-promptpay-target', proxy: 'billing-field-proxy', bin: 'billing-field-bank-bin',
|
||||
account: 'billing-field-account', nip: 'billing-field-nip', creditor: 'billing-field-creditor',
|
||||
};
|
||||
const PLACEHOLDERS = {
|
||||
iban: 'FI21 1234 5600 0007 85', bic: 'NDEAFIHH', country: 'CH', url: '…?amount={amount}&reference={reference}', vpa: 'shop@bank',
|
||||
target: '081 234 5678', proxy: '+65 9123 4567', bin: '970436', creditor: '12345678', nip: '5260250274',
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------- codes as SVG
|
||||
|
||||
// The QR code of a payment, drawn from its matrix: the SVG carries modules
|
||||
// only, never the payload's text.
|
||||
function qrSvg(payload, swissCross) {
|
||||
qrcode.stringToBytes = qrcode.stringToBytesFuncs['UTF-8'];
|
||||
const qr = qrcode(0, 'M');
|
||||
qr.addData(payload, 'Byte');
|
||||
qr.make();
|
||||
const n = qr.getModuleCount();
|
||||
const m = 4;
|
||||
let path = '';
|
||||
for (let r = 0; r < n; r += 1) for (let c = 0; c < n; c += 1) if (qr.isDark(r, c)) path += `M${c + m} ${r + m}h1v1h-1z`;
|
||||
const size = n + 2 * m;
|
||||
let cross = '';
|
||||
if (swissCross) {
|
||||
const s = n * 7 / 46;
|
||||
const x = m + n / 2 - s / 2;
|
||||
cross = `<rect x="${x}" y="${x}" width="${s}" height="${s}" fill="#fff"/><rect x="${x + s * 0.06}" y="${x + s * 0.06}" width="${s * 0.88}" height="${s * 0.88}" fill="#000"/>`
|
||||
+ `<rect x="${x + s * 0.4}" y="${x + s * 0.2}" width="${s * 0.2}" height="${s * 0.6}" fill="#fff"/><rect x="${x + s * 0.2}" y="${x + s * 0.4}" width="${s * 0.6}" height="${s * 0.2}" fill="#fff"/>`;
|
||||
}
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${size} ${size}" width="160" height="160" shape-rendering="crispEdges" role="img">`
|
||||
+ `<rect width="${size}" height="${size}" fill="#fff"/><path d="${path}" fill="#000"/>${cross}</svg>`;
|
||||
}
|
||||
|
||||
// The Finnish bank barcode: digits only, as bars.
|
||||
function barcodeSvg(digits) {
|
||||
if (!/^\d{54}$/.test(String(digits))) return '';
|
||||
const modules = code128CModules(digits, 10);
|
||||
let path = '';
|
||||
for (let i = 0; i < modules.length; i += 1) if (modules[i] === '1') path += `M${i} 0h1v40h-1z`;
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${modules.length} 40" width="100%" height="60" preserveAspectRatio="none" shape-rendering="crispEdges" role="img">`
|
||||
+ `<rect width="${modules.length}" height="40" fill="#fff"/><path d="${path}" fill="#000"/></svg>`;
|
||||
}
|
||||
|
||||
function download(name, mime, { text, base64 }) {
|
||||
let blob;
|
||||
if (base64) {
|
||||
@@ -302,7 +247,7 @@ Template.billingBoard.helpers({
|
||||
expenseCategories: () => EXPENSE_CATEGORIES.map(value => ({ value, label: t(`billing-expense-${value}`) })),
|
||||
expenseCategory: value => t(`billing-expense-${value}`),
|
||||
lineKind: line => line.kind || 'time',
|
||||
lineKindLabel: line => t(line.kind === 'fee' ? 'billing-line-fee' : 'billing-line-expense'),
|
||||
lineKindLabel: line => t(LINE_KIND_LABEL_KEYS[line.kind] || 'billing-line-fee'),
|
||||
quoteStatusLabel: status => stateLabel(status, 'quote'),
|
||||
nextQuoteStatuses: quote => (QUOTE_NEXT[quote.status] || []).map(value => ({ value, label: t(QUOTE_ACTION_KEYS[value]) })),
|
||||
quoteFormats: () => [
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/* The ? of a feature place and its popup (featureHelp.jade,
|
||||
docs/Features/General/Help-Button.md).
|
||||
|
||||
Every rule here uses the LOGICAL side - inline-end, inline-start - so the ?
|
||||
that is at the right of a heading in English is at its left in Arabic or
|
||||
Hebrew, from the same rule and with nothing written twice. */
|
||||
|
||||
.feature-help-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 0 0 auto;
|
||||
/* WCAG 2.2 target size: at least 24 by 24 CSS pixels. */
|
||||
min-width: 28px;
|
||||
min-height: 28px;
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
font-size: calc(18px * var(--wekan-ui-font-scale, 1));
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
opacity: 0.75;
|
||||
box-shadow: none;
|
||||
}
|
||||
.feature-help-btn:hover {
|
||||
opacity: 1;
|
||||
background: rgba(127, 127, 127, 0.18);
|
||||
}
|
||||
/* Keyboard focus is always visible. */
|
||||
.feature-help-btn:focus-visible {
|
||||
opacity: 1;
|
||||
outline: 2px solid currentColor;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.feature-help-btn i.fa {
|
||||
margin: 0;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
/* A heading with a ? at its end: a flex row, the ? pushed to the inline end. */
|
||||
.feature-help-title:has(> .feature-help-btn),
|
||||
.admin-pane-title:has(> .feature-help-btn),
|
||||
.sidebar-view-title:has(> .feature-help-btn) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.feature-help-title > .feature-help-btn,
|
||||
.admin-pane-title > .feature-help-btn,
|
||||
.sidebar-view-title > .feature-help-btn {
|
||||
margin-inline-start: auto;
|
||||
}
|
||||
|
||||
/* A card section's heading: the ? takes the far end, and the section's
|
||||
hamburger, which had it, follows the ? instead of splitting the space. */
|
||||
.card-details h3.card-details-item-title > .feature-help-btn {
|
||||
margin-inline-start: auto;
|
||||
font-size: calc(16px * var(--wekan-ui-font-scale, 1));
|
||||
}
|
||||
.card-details h3.card-details-item-title > .feature-help-btn ~ .card-details-section-menu {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
/* The Board View menu in the header bar: beside the view's button. */
|
||||
.board-header-btn + .feature-help-btn {
|
||||
margin-inline-start: 2px;
|
||||
}
|
||||
|
||||
/* A popup's title bar places its maximize and close buttons absolutely at its
|
||||
inline end (popup.css). The ? goes just before them - never over them -
|
||||
and the title gives up the room it takes. */
|
||||
.pop-over .header .feature-help-btn {
|
||||
position: absolute;
|
||||
top: calc(6px * var(--wekan-ui-font-scale, 1));
|
||||
inset-inline-end: 44px;
|
||||
}
|
||||
.pop-over .header:has(.popup-maximize-btn) .feature-help-btn {
|
||||
inset-inline-end: 76px;
|
||||
}
|
||||
.pop-over .header:has(.feature-help-btn) .header-title {
|
||||
margin-inline-end: 80px;
|
||||
}
|
||||
.pop-over .header:has(.feature-help-btn):has(.popup-maximize-btn) .header-title {
|
||||
margin-inline-end: 112px;
|
||||
}
|
||||
@media screen and (max-width: 800px) {
|
||||
/* The phone's popup header is the theme's colour with a larger close button. */
|
||||
.pop-over .header .feature-help-btn {
|
||||
top: calc(10px * var(--wekan-ui-font-scale, 1));
|
||||
inset-inline-end: 54px;
|
||||
color: #fff;
|
||||
}
|
||||
.pop-over .header:has(.popup-maximize-btn) .feature-help-btn {
|
||||
inset-inline-end: 86px;
|
||||
}
|
||||
.pop-over .header:has(.feature-help-btn) .header-title {
|
||||
margin-inline-end: 90px;
|
||||
}
|
||||
.pop-over .header:has(.feature-help-btn):has(.popup-maximize-btn) .header-title {
|
||||
margin-inline-end: 122px;
|
||||
}
|
||||
}
|
||||
|
||||
/* The popup itself is 720px wide on a desktop - popup.css, with the other
|
||||
wide popups, mirrored in client/lib/popupOffset.js WIDE_POPUP_WIDTHS; below
|
||||
801px every popup is a full-screen sheet. */
|
||||
.feature-help-content {
|
||||
padding-block-end: 8px;
|
||||
line-height: 1.5;
|
||||
text-align: start;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.feature-help-content .feature-help-heading {
|
||||
margin: 18px 0 6px;
|
||||
font-size: calc(22px * var(--wekan-ui-font-scale, 1));
|
||||
font-weight: bold;
|
||||
color: inherit;
|
||||
}
|
||||
.feature-help-content .feature-help-heading:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.feature-help-content .feature-help-text {
|
||||
margin: 0;
|
||||
font-size: calc(16px * var(--wekan-ui-font-scale, 1));
|
||||
color: inherit;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
//- The ? of a feature place (docs/Features/General/Help-Button.md).
|
||||
//-
|
||||
//- `+featureHelp(id='workload')` with an id of models/lib/featureHelp.js. An id
|
||||
//- that is not there draws nothing, so a place whose help is chosen at run time
|
||||
//- (the open view, popup, pane or card section) passes whatever it has and gets
|
||||
//- a ? only when there is a help for it.
|
||||
//-
|
||||
//- A real button in the header's own row, after its title and before its other
|
||||
//- controls end the row; featureHelp.css puts it at the inline END, which is
|
||||
//- the right in a left-to-right page and the left in Arabic, from the same rule.
|
||||
template(name="featureHelp")
|
||||
if hasHelp
|
||||
button.feature-help-btn.js-open-feature-help(
|
||||
type="button"
|
||||
data-feature-help=id
|
||||
title="{{_ 'how-it-works'}}"
|
||||
aria-label="{{_ 'how-it-works'}}"
|
||||
aria-haspopup="dialog")
|
||||
i.fa.fa-question-circle(aria-hidden="true")
|
||||
|
||||
//- The texts as TEXT: double braces, never triple, so nothing in a translation
|
||||
//- can become markup. Title "How it works" comes from Popup's titleKey.
|
||||
template(name="featureHelpPopup")
|
||||
.feature-help-content(dir="auto" data-feature-help=id)
|
||||
h2.feature-help-heading {{_ 'what-it-is'}}
|
||||
p.feature-help-text {{_ whatKey}}
|
||||
h2.feature-help-heading {{_ 'how-it-works'}}
|
||||
p.feature-help-text {{_ howKey}}
|
||||
@@ -0,0 +1,45 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
|
||||
// The ? of a feature place and its popup (docs/Features/General/Help-Button.md).
|
||||
// Which help a place shows is data: models/lib/featureHelp.js.
|
||||
const {
|
||||
featureHelp,
|
||||
hasFeature,
|
||||
boardViewHelpId,
|
||||
sidebarViewHelpId,
|
||||
popupHelpId,
|
||||
cardSectionHelpId,
|
||||
paneHelpId,
|
||||
} = require('/models/lib/featureHelp');
|
||||
|
||||
Template.featureHelp.helpers({
|
||||
hasHelp() {
|
||||
return hasFeature(this.id);
|
||||
},
|
||||
});
|
||||
|
||||
Template.featureHelp.events({
|
||||
'click .js-open-feature-help'(event) {
|
||||
// The ? sits inside headings that do something on a click of their own -
|
||||
// a card section folds - and the click is for the ? alone.
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
const help = featureHelp(event.currentTarget.dataset.featureHelp);
|
||||
if (!help) return;
|
||||
// Titled "How it works" by the popup convention, featureHelpPopup-title.
|
||||
Popup.open('featureHelp', {
|
||||
dataContext: help,
|
||||
// A ? inside a popup opens its help as a sub-popup; Escape goes BACK to
|
||||
// that popup, where the button that opened the help gets the focus.
|
||||
returnFocusSelector: `.js-pop-over .js-open-feature-help[data-feature-help="${help.id}"]`,
|
||||
}).call(this, event);
|
||||
},
|
||||
});
|
||||
|
||||
// The places that show the help of whatever is open in them.
|
||||
Template.registerHelper('boardViewHelpId', view => boardViewHelpId(view));
|
||||
Template.registerHelper('sidebarViewHelpId', view => sidebarViewHelpId(view));
|
||||
Template.registerHelper('popupHelpId', popupName => popupHelpId(popupName));
|
||||
Template.registerHelper('cardSectionHelpId', section => cardSectionHelpId(section));
|
||||
Template.registerHelper('paneHelpId', paneId => paneHelpId(FlowRouter.getRouteName(), paneId));
|
||||
@@ -177,9 +177,11 @@ Template.header.helpers({
|
||||
return boardCreationAllowed();
|
||||
},
|
||||
|
||||
// The Admin Panel is four routes; its tabs show on all of them.
|
||||
// The Admin Panel is four routes; its tabs show on all of them - and on
|
||||
// Admin Panel / Cloud, which exists only where the server has CLOUD.
|
||||
isAdminPanel() {
|
||||
return ADMIN_PANEL_ROUTES.includes(FlowRouter.getRouteName());
|
||||
const route = FlowRouter.getRouteName();
|
||||
return ADMIN_PANEL_ROUTES.includes(route) || route === 'cloud-admin';
|
||||
},
|
||||
|
||||
// Whether to draw the hamburger at all. A page with no sidebar and nothing to
|
||||
|
||||
@@ -362,6 +362,9 @@
|
||||
@media screen and (min-width: 801px) {
|
||||
.pop-over[data-popup='changeColorPopup'],
|
||||
.pop-over[data-popup='boardChangeColorPopup'],
|
||||
/* The ? of a feature (featureHelp.css): two headings and their texts, read
|
||||
like a page rather than a menu. */
|
||||
.pop-over[data-popup='featureHelpPopup'],
|
||||
/* Stickers, for the same reason as the colours: the picker is a GRID, and
|
||||
width buys columns. At the default 380px it was eight icons per row and a
|
||||
hundred and fifty stickers made a column taller than the screen, so
|
||||
|
||||
@@ -4,6 +4,7 @@ import { CSSEvents } from '/client/lib/cssEvents';
|
||||
import { isMobileViewportNow } from '/client/lib/responsiveUtils';
|
||||
import { trapTabKey } from '/client/lib/accessibility';
|
||||
import { keptInside } from '/client/lib/popupBounds';
|
||||
import { popupHelpId } from '/models/lib/featureHelp';
|
||||
|
||||
// Anchor the opposite edge while dragging the bottom inline-end corner.
|
||||
function resizeDatePopup(element, width, height) {
|
||||
@@ -74,6 +75,11 @@ Popup.template.helpers({
|
||||
popupMaximizable() {
|
||||
return MAXIMIZABLE_POPUPS.has(this.popupName);
|
||||
},
|
||||
// The ? of this popup's feature, in its title bar
|
||||
// (docs/Features/General/Help-Button.md): models/lib/featureHelp.js POPUP_HELP.
|
||||
popupHelp() {
|
||||
return popupHelpId(this.popupName);
|
||||
},
|
||||
popupMaximized() {
|
||||
return Template.instance().popupMaximized.get();
|
||||
},
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
span.popup-drag-handle.js-popup-drag-handle(title="{{_ 'drag-to-move'}}")
|
||||
i.fa.fa-arrows(aria-hidden="true")
|
||||
span.header-title= title
|
||||
//- The popup's ? (featureHelp.jade): after the title, before the maximize
|
||||
and close buttons, never on top of them.
|
||||
+featureHelp(id=popupHelp)
|
||||
if popupMaximizable
|
||||
if popupMaximized
|
||||
a.popup-maximize-btn.js-popup-minimize(href="#" role="button" title="{{_ 'minimize-window'}}" aria-label="{{_ 'minimize-window'}}")
|
||||
|
||||
@@ -26,7 +26,9 @@ template(name="workloadControls")
|
||||
template(name="workload")
|
||||
if currentUser
|
||||
.workload-page
|
||||
h1 {{_ 'workload-title'}}
|
||||
h1.feature-help-title
|
||||
| {{_ 'workload-title'}}
|
||||
+featureHelp(id='workload')
|
||||
p.workload-intro {{_ 'workload-intro'}}
|
||||
if loading
|
||||
+spinner
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Utils } from '/client/lib/utils';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { saveRuleTriggerAction } from '/client/components/rules/rulesSaveHelper';
|
||||
import { RULE_ACTING_USER_SENTINEL } from '/models/lib/ruleActingUser';
|
||||
import { webhooksOff } from '/client/lib/webhooksSwitch';
|
||||
|
||||
let cardColors;
|
||||
Meteor.startup(() => {
|
||||
@@ -21,7 +22,9 @@ Template.cardActions.onCreated(function () {
|
||||
|
||||
Template.cardActions.helpers({
|
||||
// This board's bots (Board Settings / Bots), for "Dispatch to bot".
|
||||
// None while all webhooks are turned off (client/lib/webhooksSwitch.js).
|
||||
boardBots() {
|
||||
if (webhooksOff()) return [];
|
||||
return ReactiveCache.getIntegrations({ boardId: Session.get('currentBoard'), bot: true }) || [];
|
||||
},
|
||||
cardColorButton() {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
template(name="rulesList")
|
||||
.rules(class=currentBoard.colorClass)
|
||||
h2
|
||||
h2.feature-help-title
|
||||
i.fa.fa-magic
|
||||
| {{_ 'r-board-rules' }}
|
||||
+featureHelp(id='rules')
|
||||
|
||||
//- #2217: a board admin shows this board's Rules to its members, read-only,
|
||||
when Admin Panel / Settings / Visibility allows it.
|
||||
|
||||
@@ -2,6 +2,7 @@ import { currentRulesAccess } from '/client/lib/rulesAccess';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { Utils } from '/client/lib/utils';
|
||||
import { triggerValueHasVars } from '/models/lib/ruleTriggerVars';
|
||||
import { webhooksOff } from '/client/lib/webhooksSwitch';
|
||||
|
||||
Template.rulesMain.onCreated(function () {
|
||||
this.rulesCurrentTab = new ReactiveVar('rulesList');
|
||||
@@ -72,7 +73,10 @@ Template.rulesMain.helpers({
|
||||
return Session.get('rulesViewMode') === 'workflow';
|
||||
},
|
||||
// Board Settings / Bots: the alternative workflow view for bots.
|
||||
isBotsView() { return Session.get('rulesViewMode') === 'bots'; },
|
||||
// Not while all webhooks are turned off: a bot is a webhook.
|
||||
isBotsView() {
|
||||
return Session.get('rulesViewMode') === 'bots' && !webhooksOff();
|
||||
},
|
||||
});
|
||||
|
||||
function sanitizeObject(obj) {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/* Admin Panel / Settings / Privacy and security / Allowed addresses. */
|
||||
.admin-panel-addresses textarea {
|
||||
width: 100%;
|
||||
max-width: 40em;
|
||||
font-family: monospace;
|
||||
}
|
||||
.admin-panel-addresses .warning,
|
||||
.admin-panel-address-refused {
|
||||
color: #b00020;
|
||||
}
|
||||
.admin-panel-address-refused {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4em;
|
||||
padding: 0 0.6em;
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//- Admin Panel / Settings / Privacy and security / Allowed addresses
|
||||
(models/lib/adminPanelAddresses.js, server/adminPanelAddresses.js): from
|
||||
any other address the Admin Panel and the admin REST API refuse, and a site
|
||||
administrator there is a member like any other. The server refuses a list
|
||||
without the saver's own address, and the page says so before it is sent.
|
||||
template(name="adminPanelAllowedAddresses")
|
||||
form.js-admin-panel-addresses.admin-panel-addresses
|
||||
h2.admin-pane-group-title {{_ 'cloud-allowed-addresses'}}
|
||||
p.description {{_ 'admin-panel-allowed-addresses-desc'}}
|
||||
if fromEnvironment
|
||||
p.warning.js-admin-panel-addresses-env {{_ 'admin-panel-allowed-addresses-env'}}
|
||||
textarea.wekan-form-control.js-admin-panel-addresses-text(name="addresses" rows="5" maxlength="12000" placeholder="203.0.113.0/24 2001:db8::/32" aria-label="{{_ 'cloud-allowed-addresses'}}")= addressesText
|
||||
p.quiet.js-admin-panel-your-address {{_ 'cloud-allowed-addresses-yours' address=yourAddress}}
|
||||
if lockout
|
||||
p.warning.js-admin-panel-addresses-lockout {{_ 'cloud-allowed-addresses-lockout' address=yourAddress}}
|
||||
button.primary(type="submit") {{_ 'save'}}
|
||||
span.js-admin-panel-addresses-status= status
|
||||
|
||||
//- Shown in the Admin Panel's tabs to a site administrator at an address the
|
||||
list does not have: the panes are empty there, and this says why.
|
||||
template(name="adminPanelAddressRefused")
|
||||
if refused
|
||||
span.admin-panel-address-refused.js-admin-panel-address-refused
|
||||
i.fa.fa-shield
|
||||
| {{_ 'admin-panel-address-refused' address=yourAddress}}
|
||||
@@ -0,0 +1,72 @@
|
||||
// Admin Panel / Settings / Privacy and security / Allowed addresses
|
||||
// (models/lib/adminPanelAddresses.js). The list is read and saved through
|
||||
// site-admin methods, never published: it describes the admins' network.
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
|
||||
const { normalizeAllowedAddresses, addressAllowed } = require('/models/lib/adminPanelAddresses');
|
||||
|
||||
// Would this list lock the saver out? The rule the server applies when it
|
||||
// refuses to save it.
|
||||
function locksOut(text, yourAddress) {
|
||||
let list;
|
||||
try { list = normalizeAllowedAddresses(text); } catch (e) { return false; }
|
||||
return list.length > 0 && !addressAllowed(yourAddress, list);
|
||||
}
|
||||
|
||||
Template.adminPanelAllowedAddresses.onCreated(function () {
|
||||
this.config = new ReactiveVar({ addresses: [], source: 'settings', yourAddress: '' });
|
||||
this.text = new ReactiveVar(null);
|
||||
this.status = new ReactiveVar('');
|
||||
Meteor.call('getAdminPanelAllowedAddresses', (error, config) => {
|
||||
if (!error && config) this.config.set(config);
|
||||
});
|
||||
});
|
||||
|
||||
Template.adminPanelAllowedAddresses.helpers({
|
||||
addressesText() { return (Template.instance().config.get().addresses || []).join('\n'); },
|
||||
yourAddress() { return Template.instance().config.get().yourAddress || ''; },
|
||||
fromEnvironment() { return Template.instance().config.get().source !== 'settings'; },
|
||||
lockout() {
|
||||
const tpl = Template.instance();
|
||||
const text = tpl.text.get();
|
||||
return text !== null && locksOut(text, tpl.config.get().yourAddress);
|
||||
},
|
||||
status() { return Template.instance().status.get(); },
|
||||
});
|
||||
|
||||
Template.adminPanelAllowedAddresses.events({
|
||||
'input .js-admin-panel-addresses-text'(event, tpl) {
|
||||
tpl.status.set('');
|
||||
tpl.text.set(event.currentTarget.value);
|
||||
},
|
||||
'submit .js-admin-panel-addresses'(event, tpl) {
|
||||
event.preventDefault();
|
||||
const value = String(event.currentTarget.elements.addresses.value || '');
|
||||
Meteor.call('saveAdminPanelAllowedAddresses', value, (error, result) => {
|
||||
if (error) {
|
||||
tpl.status.set(error.error === 'admin-panel-address-lockout'
|
||||
? TAPi18n.__('cloud-allowed-addresses-lockout', { address: tpl.config.get().yourAddress })
|
||||
: (error.reason || error.message));
|
||||
return;
|
||||
}
|
||||
tpl.config.set({ ...tpl.config.get(), addresses: result.addresses });
|
||||
tpl.text.set(null);
|
||||
tpl.status.set(TAPi18n.__('feature-saved'));
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Template.adminPanelAddressRefused.onCreated(function () {
|
||||
this.state = new ReactiveVar({ refused: false });
|
||||
Meteor.call('adminPanelAddressStatus', (error, state) => {
|
||||
if (!error && state) this.state.set(state);
|
||||
});
|
||||
});
|
||||
|
||||
Template.adminPanelAddressRefused.helpers({
|
||||
refused() { return Template.instance().state.get().refused === true; },
|
||||
yourAddress() { return Template.instance().state.get().yourAddress || ''; },
|
||||
});
|
||||
@@ -54,6 +54,8 @@ template(name="adminProblems")
|
||||
+officeReport
|
||||
else if isPane 'report-password-length'
|
||||
+passwordLengthReport
|
||||
else if isPane 'report-webhooks'
|
||||
+webhooksReport
|
||||
else if tablePageData
|
||||
+tablePage(tablePageData)
|
||||
|
||||
@@ -145,6 +147,8 @@ template(name="featuresPerformance")
|
||||
//- Admin Panel / Settings / Security (moved from Problems on 2026-11-19).
|
||||
template(name="featuresSecurity")
|
||||
ul.setting-detail
|
||||
li
|
||||
+adminPanelAllowedAddresses
|
||||
li
|
||||
a.flex.js-toggle-render-links-as-plain-text
|
||||
.materialCheckBox(class="{{#if renderLinksAsPlainText}}is-checked{{/if}}")
|
||||
|
||||
@@ -326,6 +326,9 @@ const PROBLEMS_MENU = [
|
||||
{ id: 'report-broken', icon: 'fa-chain-broken', labelKey: 'broken-cards' },
|
||||
{ id: 'report-files', icon: 'fa-paperclip', labelKey: 'filesReportTitle' },
|
||||
{ id: 'report-rules', icon: 'fa-magic', labelKey: 'rulesReportTitle' },
|
||||
// Every webhook, its board or Global, who added it and what it sends
|
||||
// (webhooksReport.js). Tokens are never shown.
|
||||
{ id: 'report-webhooks', icon: 'fa-globe', labelKey: 'webhooks-report-title' },
|
||||
{ id: 'report-boards', icon: 'fa-columns', labelKey: 'boardsReportTitle' },
|
||||
{ id: 'report-cards', icon: 'fa-id-card-o', labelKey: 'cardsReportTitle' },
|
||||
{ id: 'report-recovery', icon: 'fa-medkit', labelKey: 'recoveryReportTitle' },
|
||||
@@ -534,6 +537,8 @@ const SELF_LOADING_PANES = [
|
||||
'report-database', 'report-integrity', 'report-office', 'report-api', 'report-mail',
|
||||
// passwordLengthReport.js loads its own rows and settings through methods.
|
||||
'report-password-length',
|
||||
// webhooksReport.js loads its rows through the webhooksReportPage method.
|
||||
'report-webhooks',
|
||||
];
|
||||
|
||||
function openReportPane(tmpl, targetID) {
|
||||
|
||||
@@ -90,14 +90,21 @@ template(name="leftMenuResize")
|
||||
//- nothing left to unfold it.
|
||||
//-
|
||||
//- Data context: { titleKey } or { label } from paneTitle().
|
||||
//- The ? of the open pane is at the inline end of the title (featureHelp.css),
|
||||
//- chosen from the page and the pane: models/lib/featureHelp.js paneHelpId.
|
||||
template(name="paneTitle")
|
||||
if isLeftMenuCollapsed
|
||||
h1.admin-pane-title.admin-pane-title-folded
|
||||
+leftMenuCollapse(paneTitleKey=titleKey paneLabel=label)
|
||||
+featureHelp(id=paneHelp)
|
||||
else if titleKey
|
||||
h1.admin-pane-title {{_ titleKey}}
|
||||
h1.admin-pane-title
|
||||
| {{_ titleKey}}
|
||||
+featureHelp(id=paneHelp)
|
||||
else if label
|
||||
h1.admin-pane-title {{label}}
|
||||
h1.admin-pane-title
|
||||
| {{label}}
|
||||
+featureHelp(id=paneHelp)
|
||||
|
||||
//- The caret that folds the menu away.
|
||||
//-
|
||||
|
||||
@@ -3,6 +3,9 @@ import { Template } from 'meteor/templating';
|
||||
import { Tracker } from 'meteor/tracker';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import { Utils } from '/client/lib/utils';
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
|
||||
const { paneHelpId } = require('/models/lib/featureHelp');
|
||||
|
||||
// Collapsing the left menu, for both pages that have one.
|
||||
//
|
||||
@@ -28,6 +31,15 @@ import { Utils } from '/client/lib/utils';
|
||||
|
||||
Template.registerHelper('isLeftMenuCollapsed', () => Utils.getLeftMenuCollapseState());
|
||||
|
||||
// The ? of the open pane (docs/Features/General/Help-Button.md): its help
|
||||
// depends on the page and on the open menu entry, which paneTitle() passes as
|
||||
// `paneId`.
|
||||
Template.paneTitle.helpers({
|
||||
paneHelp() {
|
||||
return paneHelpId(FlowRouter.getRouteName(), this && this.paneId);
|
||||
},
|
||||
});
|
||||
|
||||
Template.leftMenuCollapse.helpers({
|
||||
// What the control DOES, for the tooltip and for a screen reader - the same
|
||||
// two words a list's caret uses.
|
||||
|
||||
@@ -48,9 +48,10 @@ template(name="notificationSettingsPopup")
|
||||
a.flex.js-due-reminder-off(role="checkbox" aria-checked="{{#if dueRemindersOff}}true{{else}}false{{/if}}")
|
||||
.materialCheckBox(class="{{#if dueRemindersOff}}is-checked{{/if}}")
|
||||
span {{_ 'due-reminder-off'}}
|
||||
a.flex.js-due-reminder-webhook(role="checkbox" aria-checked="{{#if dueReminderWebhook}}true{{else}}false{{/if}}")
|
||||
.materialCheckBox(class="{{#if dueReminderWebhook}}is-checked{{/if}}")
|
||||
span {{_ 'due-reminder-webhook'}}
|
||||
unless webhooksOff
|
||||
a.flex.js-due-reminder-webhook(role="checkbox" aria-checked="{{#if dueReminderWebhook}}true{{else}}false{{/if}}")
|
||||
.materialCheckBox(class="{{#if dueReminderWebhook}}is-checked{{/if}}")
|
||||
span {{_ 'due-reminder-webhook'}}
|
||||
if dueReminderMessage
|
||||
p.quiet.js-due-reminder-message {{dueReminderMessage}}
|
||||
button.primary.js-due-reminder-save(type="submit") {{_ 'save'}}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import { parseDueReminderInput } from '/models/lib/dueNotificationConfig';
|
||||
import { GROUP_KEYS, cleanMutedGroups } from '/models/lib/notificationActivityGroups';
|
||||
import { webhooksOff } from '/client/lib/webhooksSwitch';
|
||||
|
||||
// The 3-tier Notification Settings popup (see notificationSettingsPopup.jade
|
||||
// and models/lib/notificationSettings.js). `this.data().scope` is one of
|
||||
@@ -95,8 +96,10 @@ Template.notificationSettingsPopup.helpers({
|
||||
deliveryTargetId() {
|
||||
return Template.instance().data.scope === 'board' ? Utils.getCurrentBoardId() : null;
|
||||
},
|
||||
// The webhook channel is hidden while all webhooks are turned off.
|
||||
deliveryChannels() {
|
||||
return ['email', 'tray', 'webhook'].map(channel => ({ channel }));
|
||||
const off = webhooksOff();
|
||||
return ['email', 'tray', 'webhook'].filter(channel => !off || channel !== 'webhook').map(channel => ({ channel }));
|
||||
},
|
||||
// #572: every kind of card activity, ticked unless this member muted it.
|
||||
isMemberScope() {
|
||||
|
||||
@@ -66,8 +66,6 @@ template(name="people")
|
||||
+templatesGeneral
|
||||
else if domainSetting.get
|
||||
+domainGeneral
|
||||
else if cloudSetting.get
|
||||
+cloudPanelSettings
|
||||
|
||||
|
||||
template(name="orgGeneral")
|
||||
|
||||
@@ -148,7 +148,6 @@ Template.people.onCreated(function () {
|
||||
// #5850: Admin Panel > People > Domains tab. The domains table itself
|
||||
// (domainGeneral) now owns its data via getDomainsWithUserCountsPage.
|
||||
this.domainSetting = new ReactiveVar(false);
|
||||
this.cloudSetting = new ReactiveVar(false);
|
||||
this.subscribe('inviteToBoardRolesSettings');
|
||||
this.findOrgsOptions = new ReactiveVar({});
|
||||
this.findTeamsOptions = new ReactiveVar({});
|
||||
@@ -440,7 +439,6 @@ Template.people.onCreated(function () {
|
||||
this.rolesSetting.set('roles-setting' === targetID);
|
||||
this.templatesSetting.set('templates-setting' === targetID);
|
||||
this.domainSetting.set('domains-setting' === targetID);
|
||||
this.cloudSetting.set('cloud-setting' === targetID);
|
||||
|
||||
// The Domains table (domainGeneral) now fetches its own single page from
|
||||
// getDomainsWithUserCountsPage (server-side search / sort / pagination), so
|
||||
@@ -551,9 +549,9 @@ function peopleMenu(user) {
|
||||
// with, so it belongs beside the e-mail settings rather than at the end of
|
||||
// the menu, after the roles and template checkbox lists.
|
||||
{ id: 'domains-setting', icon: 'fa-at', labelKey: 'domains' },
|
||||
// The Cloud Panel's domain and SuperAdmin, as Weddy has them at the same
|
||||
// place (docs/Features/Admin-Panel/Cloud-Panel.md). Site admins only.
|
||||
{ id: 'cloud-setting', icon: 'fa-cloud', labelKey: 'cloud' },
|
||||
// No Cloud entry: the Cloud Panel's domain is the server's CLOUD
|
||||
// environment variable, never a setting here, and the panel itself is
|
||||
// Admin Panel / Cloud (docs/Features/Admin-Panel/Cloud-Panel.md).
|
||||
{ id: 'org-setting', icon: 'fa-globe', labelKey: 'organizations' },
|
||||
{ id: 'team-setting', icon: 'fa-users', labelKey: 'teams' },
|
||||
{ id: 'people-setting', icon: 'fa-user', labelKey: 'people' },
|
||||
@@ -971,9 +969,6 @@ Template.people.helpers({
|
||||
domainSetting() {
|
||||
return Template.instance().domainSetting;
|
||||
},
|
||||
cloudSetting() {
|
||||
return Template.instance().cloudSetting;
|
||||
},
|
||||
orgList() {
|
||||
const tpl = Template.instance();
|
||||
// The 'org' publication already returns only the current page (server-side
|
||||
|
||||
@@ -49,7 +49,12 @@ template(name="setting")
|
||||
else if isLayoutSetting
|
||||
+pwaSettings
|
||||
else if isWebhookSetting
|
||||
+webhookSettings
|
||||
//- Its menu entry is hidden while all webhooks are turned off; an
|
||||
old link to it says why instead of showing the forms.
|
||||
if webhooksOff
|
||||
p.quiet.js-webhooks-off-notice {{_ 'webhooks-disabled'}}
|
||||
else
|
||||
+webhookSettings
|
||||
else if isSharedLabelsSetting
|
||||
+sharedLabelsSettings
|
||||
|
||||
@@ -402,6 +407,14 @@ template(name='tableVisibilityModeSettings')
|
||||
.materialCheckBox#activity-pub-enabled(class="{{#if currentSetting.activityPubEnabled}}is-checked{{/if}}")
|
||||
span {{_ 'activity-pub-enabled'}}
|
||||
.feature-desc {{_ 'activity-pub-desc'}}
|
||||
//- Turn off all webhooks (models/lib/webhooksSwitch.js): hides every
|
||||
webhook screen, and the server sends no webhook and refuses to add
|
||||
or change one. Saved as soon as it is switched; nothing is deleted.
|
||||
li.tableVisibilityMode-form
|
||||
a.flex.js-toggle-webhooks-off
|
||||
.materialCheckBox#webhooks-off(class="{{#if webhooksOff}}is-checked{{/if}}")
|
||||
span {{_ 'webhooks-off'}}
|
||||
.feature-desc {{_ 'webhooks-off-desc'}}
|
||||
|
||||
li.admin-pane-group-separator
|
||||
hr
|
||||
@@ -556,6 +569,19 @@ template(name='tableVisibilityModeSettings')
|
||||
button.js-visibility-date-save.primary {{_ 'save'}}
|
||||
li.admin-pane-group-separator
|
||||
hr
|
||||
//- #6939: the width every card details window opens at, in percent of the
|
||||
browser window, until a user drags their own (models/lib/cardDetailsWidth.js).
|
||||
li
|
||||
h2.admin-pane-group-title {{_ 'card-details-default-width'}}
|
||||
li.tableVisibilityMode-form
|
||||
.feature-desc {{_ 'card-details-default-width-desc'}}
|
||||
.form-group
|
||||
input.wekan-form-control#card-details-default-width-percent(type="number" min="30" max="95" step="1" placeholder="520px" value="{{currentSetting.cardDetailsDefaultWidthPercent}}" aria-label="{{_ 'card-details-default-width'}}")
|
||||
li
|
||||
button.js-visibility-card-width-save.primary {{_ 'save'}}
|
||||
span.js-visibility-card-width-status(role="status" aria-live="polite")
|
||||
li.admin-pane-group-separator
|
||||
hr
|
||||
li
|
||||
h2.admin-pane-group-title {{_ 'settings-group-url'}}
|
||||
li
|
||||
|
||||
@@ -17,6 +17,8 @@ import { adminPath } from '/models/lib/adminUrls';
|
||||
import TableVisibilityModeSettings from '/models/tableVisibilityModeSettings';
|
||||
import { format } from '/imports/lib/dateUtils';
|
||||
import { errorMessage } from '/client/lib/errorMessage';
|
||||
// Registers {{webhooksOff}}: Features / Turn off all webhooks, Global Webhooks.
|
||||
import { webhooksOff } from '/client/lib/webhooksSwitch';
|
||||
const { ALL_MAIL_SERVICES, mailServiceStorageKey } = require('/models/lib/mailServices');
|
||||
const instanceFeatures = require('/models/lib/instanceFeatures');
|
||||
const { cardFieldRows } = require('/models/lib/cardFieldVisibility');
|
||||
@@ -251,6 +253,11 @@ function settingsMenu(user) {
|
||||
// #2761, #4698: shared label catalogs.
|
||||
{ id: 'shared-labels-setting', icon: 'fa-tags', labelKey: 'shared-labels', emoji: true },
|
||||
];
|
||||
// Global Webhooks is not offered while all webhooks are turned off
|
||||
// (Features / Turn off all webhooks, models/lib/webhooksSwitch.js).
|
||||
if (webhooksOff()) {
|
||||
items.splice(items.findIndex(item => item.id === 'webhook-setting'), 1);
|
||||
}
|
||||
// Multitenancy option D (docs/Design/Multitenancy/Multitenancy.md, D.7/D.9): an
|
||||
// Organization's own admin has ONE pane here - Visibility, for its "Change color"
|
||||
// section, which is that Organization's site theme. Every other pane, and every
|
||||
@@ -743,6 +750,15 @@ Template.tableVisibilityModeSettings.events({
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
// Turn off all webhooks (models/lib/webhooksSwitch.js), saved at once.
|
||||
async 'click .js-toggle-webhooks-off'(event, instance) {
|
||||
event.preventDefault();
|
||||
try {
|
||||
await Meteor.callAsync('saveWebhooksDisabled', !instance.$('#webhooks-off').hasClass('is-checked'));
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
// #4198
|
||||
async 'click .js-toggle-activity-pub'(event, instance) {
|
||||
event.preventDefault();
|
||||
@@ -832,6 +848,23 @@ Template.tableVisibilityModeSettings.events({
|
||||
}
|
||||
},
|
||||
|
||||
// #6939: empty = 520px; otherwise a whole percentage, 30 to 95.
|
||||
'click button.js-visibility-card-width-save'(event, instance) {
|
||||
const { clampDefaultPercent } = require('/models/lib/cardDetailsWidth');
|
||||
const raw = String(instance.$('#card-details-default-width-percent').val() || '').trim();
|
||||
const percent = clampDefaultPercent(raw);
|
||||
const status = instance.$('.js-visibility-card-width-status');
|
||||
if (raw && percent === null) {
|
||||
status.text(TAPi18n.__('card-details-default-width-desc'));
|
||||
return;
|
||||
}
|
||||
const id = ReactiveCache.getCurrentSetting()._id;
|
||||
if (percent === null) Settings.update(id, { $unset: { cardDetailsDefaultWidthPercent: '' } });
|
||||
else Settings.update(id, { $set: { cardDetailsDefaultWidthPercent: percent } });
|
||||
instance.$('#card-details-default-width-percent').val(percent === null ? '' : percent);
|
||||
status.text(TAPi18n.__('card-details-default-width-saved'));
|
||||
},
|
||||
|
||||
'click button.js-visibility-date-save'(event, instance) {
|
||||
saveVisibilitySettings({
|
||||
hideDateFormat: instance.$('#global-date-format-enabled').hasClass('is-checked'),
|
||||
|
||||
@@ -19,3 +19,13 @@ template(name="adminPanelTabs")
|
||||
a.board-header-btn.problems(class="{{isProblemsActive}} {{problemsClass}}" href="{{pathFor 'problems'}}" title="{{_ 'problems'}}")
|
||||
i.fa.fa-exclamation-triangle
|
||||
span.board-header-btn-label {{_ 'problems'}}
|
||||
//- Admin Panel / Cloud: only where the server has the CLOUD environment
|
||||
variable, at that address, for its Cloud Admins - the server says so
|
||||
(cloudPanelWhoAmI); nothing in the browser can turn it on.
|
||||
if isCloudAdmin
|
||||
a.board-header-btn.cloud(class=isCloudActive href="{{pathFor 'cloud-admin-home'}}" title="{{_ 'cloud'}}")
|
||||
i.fa.fa-cloud
|
||||
span.board-header-btn-label {{_ 'cloud'}}
|
||||
//- Admin Panel / Settings / Privacy and security / Allowed addresses: a
|
||||
site administrator at another address sees why the panes are empty.
|
||||
+adminPanelAddressRefused
|
||||
@@ -11,8 +11,21 @@ function refreshProblems() {
|
||||
});
|
||||
}
|
||||
|
||||
// Is the signed-in user a Cloud Admin here? Asked once per page load: false
|
||||
// on every WeKan without the CLOUD environment variable, which is nearly all.
|
||||
const cloudAdminVar = new ReactiveVar(false);
|
||||
let cloudAsked = false;
|
||||
function askCloud() {
|
||||
if (cloudAsked) return;
|
||||
cloudAsked = true;
|
||||
Meteor.callAsync('cloudPanelWhoAmI')
|
||||
.then(info => cloudAdminVar.set(!!(info && info.enabled && info.onCloudHost && info.isCloudAdmin)))
|
||||
.catch(() => cloudAdminVar.set(false));
|
||||
}
|
||||
|
||||
Template.adminPanelTabs.onCreated(function () {
|
||||
refreshProblems();
|
||||
askCloud();
|
||||
problemsTimer = Meteor.setInterval(refreshProblems, 30000);
|
||||
});
|
||||
Template.adminPanelTabs.onDestroyed(function () {
|
||||
@@ -33,6 +46,12 @@ Template.adminPanelTabs.helpers({
|
||||
isPeopleActive() {
|
||||
return FlowRouter.getRouteName() === 'people' ? 'active' : '';
|
||||
},
|
||||
isCloudAdmin() {
|
||||
return cloudAdminVar.get();
|
||||
},
|
||||
isCloudActive() {
|
||||
return FlowRouter.getRouteName() === 'cloud-admin' ? 'active' : '';
|
||||
},
|
||||
isAttachmentsActive() {
|
||||
return FlowRouter.getRouteName() === 'attachments' ? 'active' : '';
|
||||
},
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
//- Admin Panel / Problems / Webhooks (docs/Features/Admin-Panel/Problems/Webhooks.md):
|
||||
//- every board webhook and every global webhook, who added it and what it
|
||||
//- sends, through the shared table page (docs/Features/General/Table.md). The
|
||||
//- rows come from the site-admin method webhooksReportPage
|
||||
//- (server/webhooksSwitch.js); a token is never sent here, only whether one is
|
||||
//- set. Every value is text interpolation, so a title or URL is never markup.
|
||||
template(name="webhooksReport")
|
||||
if reportOff
|
||||
p.quiet.js-webhooks-report-off {{_ 'webhooks-disabled'}}
|
||||
+tablePage(tablePageData)
|
||||
|
||||
template(name="webhooksReportRow")
|
||||
tr.js-webhooks-report-row(data-integration-id="{{_id}}")
|
||||
td
|
||||
if isGlobal
|
||||
| {{_ 'webhooks-report-global'}}
|
||||
else if boardMissing
|
||||
| {{boardId}}
|
||||
else
|
||||
a.js-webhooks-report-board(href="{{boardPath}}") {{boardTitle}}
|
||||
td
|
||||
if ownerUsername
|
||||
| {{ownerUsername}}
|
||||
if ownerFullname
|
||||
br
|
||||
span.quiet {{ownerFullname}}
|
||||
else
|
||||
| {{ownerId}}
|
||||
td {{title}}
|
||||
td {{url}}
|
||||
td
|
||||
| {{_ typeKey}}
|
||||
if mattermostDirectMessages
|
||||
br
|
||||
span.quiet Mattermost
|
||||
td
|
||||
if enabled
|
||||
| {{_ 'webhooks-report-on'}}
|
||||
else
|
||||
| {{_ 'webhooks-report-off'}}
|
||||
td
|
||||
if allActivities
|
||||
| {{_ 'webhook-activities-all'}}
|
||||
else
|
||||
| {{activitiesText}}
|
||||
td
|
||||
if tokenSet
|
||||
| {{_ 'webhooks-report-token-set'}}
|
||||
td.table-page-nowrap {{createdText}}
|
||||
@@ -0,0 +1,111 @@
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
import { formatDateForDisplay } from '/client/lib/dateDisplay';
|
||||
import { buildFilters, buildHeader, pageInfo } from '/models/lib/tablePage';
|
||||
import { webhooksOff } from '/client/lib/webhooksSwitch';
|
||||
|
||||
// Admin Panel / Problems / Webhooks: every integration, its board or Global,
|
||||
// who added it and what it sends (models/lib/webhooksSwitch.js
|
||||
// webhookReportRow, server/webhooksSwitch.js webhooksReportPage).
|
||||
const { DEFAULT_REPORT_FILTER } = require('/models/lib/webhooksSwitch');
|
||||
|
||||
const PER_PAGE = 25;
|
||||
|
||||
// The header of webhooksReportRow, in the same order as its cells.
|
||||
const COLUMNS = [
|
||||
{ labelKey: 'board' },
|
||||
{ labelKey: 'owner' },
|
||||
{ labelKey: 'webhook-title' },
|
||||
{ labelKey: 'settings-group-url' },
|
||||
{ labelKey: 'type' },
|
||||
{ labelKey: 'status' },
|
||||
{ labelKey: 'activities' },
|
||||
{ labelKey: 'webhooks-report-token' },
|
||||
{ labelKey: 'createdAt' },
|
||||
];
|
||||
|
||||
const FILTER_OPTIONS = [
|
||||
{ value: 'all', labelKey: 'webhooks-report-title' },
|
||||
{ value: 'on', labelKey: 'webhooks-report-on' },
|
||||
{ value: 'off', labelKey: 'webhooks-report-off' },
|
||||
];
|
||||
|
||||
Template.webhooksReport.onCreated(function () {
|
||||
this.rows = new ReactiveVar([]);
|
||||
this.total = new ReactiveVar(0);
|
||||
this.page = new ReactiveVar(1);
|
||||
this.search = new ReactiveVar('');
|
||||
this.filter = new ReactiveVar(DEFAULT_REPORT_FILTER);
|
||||
this.load = () => {
|
||||
Meteor.call('webhooksReportPage', {
|
||||
filter: this.filter.get(),
|
||||
search: this.search.get() || '',
|
||||
limit: PER_PAGE,
|
||||
skip: (this.page.get() - 1) * PER_PAGE,
|
||||
}, (error, result) => {
|
||||
if (error) return;
|
||||
this.rows.set((result && result.rows) || []);
|
||||
this.total.set((result && result.total) || 0);
|
||||
});
|
||||
};
|
||||
this.load();
|
||||
});
|
||||
|
||||
Template.webhooksReport.helpers({
|
||||
// The report still lists them while they are turned off: they are kept.
|
||||
reportOff() { return webhooksOff(); },
|
||||
tablePageData() {
|
||||
const t = Template.instance();
|
||||
const info = pageInfo(t.total.get(), t.page.get(), PER_PAGE);
|
||||
const docs = (t.rows.get() || []).map(row => ({
|
||||
...row,
|
||||
boardPath: row.boardId ? FlowRouter.path('board', { id: row.boardId, slug: row.boardSlug || 'board' }) : '',
|
||||
activitiesText: (row.activities || []).join(', '),
|
||||
createdText: row.createdAt ? formatDateForDisplay(row.createdAt) : '',
|
||||
}));
|
||||
return {
|
||||
descKey: 'webhooks-report-desc',
|
||||
emptyKey: 'webhooks-report-no-results',
|
||||
searchTerm: t.search.get(),
|
||||
filters: buildFilters([{
|
||||
id: 'webhooks-report-status', labelKey: 'status', current: t.filter.get(), options: FILTER_OPTIONS,
|
||||
}]),
|
||||
header: buildHeader(COLUMNS),
|
||||
rowTemplate: 'webhooksReportRow',
|
||||
docs,
|
||||
rowCount: docs.length,
|
||||
total: t.total.get(),
|
||||
page: info.page,
|
||||
totalPages: info.totalPages,
|
||||
hasPrev: info.hasPrev,
|
||||
hasNext: info.hasNext,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Template.webhooksReport.events({
|
||||
'change .js-table-page-filter'(event, tmpl) {
|
||||
tmpl.filter.set(event.currentTarget.value || DEFAULT_REPORT_FILTER);
|
||||
tmpl.page.set(1);
|
||||
tmpl.load();
|
||||
},
|
||||
'click .js-table-page-prev'(event, tmpl) {
|
||||
event.preventDefault();
|
||||
if (tmpl.page.get() > 1) { tmpl.page.set(tmpl.page.get() - 1); tmpl.load(); }
|
||||
},
|
||||
'click .js-table-page-next'(event, tmpl) {
|
||||
event.preventDefault();
|
||||
const info = pageInfo(tmpl.total.get(), tmpl.page.get(), PER_PAGE);
|
||||
if (info.hasNext) { tmpl.page.set(tmpl.page.get() + 1); tmpl.load(); }
|
||||
},
|
||||
'keydown .js-table-page-search'(event, tmpl) {
|
||||
if (event.keyCode === 13 && !event.shiftKey) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
tmpl.search.set(event.currentTarget.value || '');
|
||||
tmpl.page.set(1);
|
||||
tmpl.load();
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -29,9 +29,11 @@ template(name="sidebar")
|
||||
//
|
||||
i.fa.fa-navicon
|
||||
unless isDefaultView
|
||||
h2
|
||||
h2.sidebar-view-title
|
||||
a.fa.fa-arrow-left.js-back-home(aria-label="{{_ 'go-back'}}")
|
||||
= getViewTitle
|
||||
//- The open view's ? (featureHelp.jade), at the end of its heading.
|
||||
+featureHelp(id=sidebarHelp)
|
||||
if isOpen
|
||||
+Template.dynamic(template=getViewTemplate)
|
||||
|
||||
@@ -706,11 +708,13 @@ template(name="boardMenuPopup")
|
||||
| {{_ 'r-workflow-view'}}
|
||||
//- Bots: the alternative workflow view - external runners this board
|
||||
hands cards to (client/components/rules/rulesBots.*). Board admins
|
||||
only, as every entry of this group.
|
||||
li
|
||||
a.js-open-rules-bots-view(title="{{_ 'bots'}}")
|
||||
i.fa.fa-android
|
||||
| {{_ 'bots'}}
|
||||
only, as every entry of this group. A bot is a webhook, so it is
|
||||
hidden while all webhooks are turned off.
|
||||
unless webhooksOff
|
||||
li
|
||||
a.js-open-rules-bots-view(title="{{_ 'bots'}}")
|
||||
i.fa.fa-android
|
||||
| {{_ 'bots'}}
|
||||
li
|
||||
a.js-open-rules-blocks-view(title="{{_ 'r-blocks-view'}}")
|
||||
i.fa.fa-puzzle-piece
|
||||
@@ -726,13 +730,16 @@ template(name="boardMenuPopup")
|
||||
//- Rules and its views are one group; the board's look starts below it.
|
||||
hr
|
||||
//- Scrum settings: how this board plans its work, above the group that
|
||||
decides how the board looks, with a rule of its own between them.
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-open-board-scrum-settings
|
||||
i.fa.fa-repeat
|
||||
| {{_ 'scrum-settings'}}
|
||||
hr
|
||||
decides how the board looks, with a rule of its own between them. They
|
||||
open in the Sprints view, so only while Admin Panel / Settings / Features
|
||||
offers the Scrum views (the server refuses that view otherwise).
|
||||
if allowFeature 'views-scrum'
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-open-board-scrum-settings
|
||||
i.fa.fa-repeat
|
||||
| {{_ 'scrum-settings'}}
|
||||
hr
|
||||
ul.pop-over-list
|
||||
//- "Custom Fields" was here. The board's list of them is in the card's own
|
||||
menu now - Card menu / Custom Fields, whose Settings cog opens it - which
|
||||
@@ -810,6 +817,15 @@ template(name="boardMenuPopup")
|
||||
a.js-open-board-list-settings(title="{{_ 'list'}}")
|
||||
i.fa.fa-trello
|
||||
| {{_ 'list'}}
|
||||
//- Board Settings / Shop: the board's cards as a web shop - which custom
|
||||
fields are the price, product code and stock, the lists on sale, the
|
||||
Orders list and the payment methods (client/components/boards/shopView.*,
|
||||
docs/Features/Board-Sidebar/Board-Settings/Shop.md).
|
||||
if allowFeature 'views-shop'
|
||||
li
|
||||
a.js-open-board-shop-settings(title="{{_ 'board-view-shop'}}")
|
||||
i.fa.fa-shopping-cart
|
||||
| {{_ 'board-view-shop'}}
|
||||
//- "Scrum settings" was here. It is above Change color now, in a group
|
||||
of its own.
|
||||
//- "WIP Limit Groups" was here. It is a row of Board Settings /
|
||||
@@ -838,10 +854,13 @@ template(name="boardMenuPopup")
|
||||
a.js-open-notification-settings
|
||||
i.fa.fa-bell
|
||||
| {{_ 'notifications'}}
|
||||
li
|
||||
a.js-outgoing-webhooks
|
||||
i.fa.fa-globe
|
||||
| {{_ 'outgoing-webhooks'}}
|
||||
//- Hidden while Admin Panel / Settings / Features / Turn off all webhooks
|
||||
is on (client/lib/webhooksSwitch.js).
|
||||
unless webhooksOff
|
||||
li
|
||||
a.js-outgoing-webhooks
|
||||
i.fa.fa-globe
|
||||
| {{_ 'outgoing-webhooks'}}
|
||||
//- "Subtasks Settings" was here. What subtasks do on this board is behind
|
||||
the hamburger at the end of the Subtasks heading on an opened card,
|
||||
which is where somebody looking at subtasks already is.
|
||||
|
||||
@@ -8,6 +8,7 @@ import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { isSelectedSubtaskBoard, isSelectedSubtaskList } from '/models/lib/subtaskSettings';
|
||||
import { liveAttachments } from '/models/lib/attachmentSoftDelete';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import { sidebarViewHelpId } from '/models/lib/featureHelp';
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
const { allBoardsPath, SECTION_ARCHIVE } = require('/models/lib/allBoardsUrls');
|
||||
const {
|
||||
@@ -28,6 +29,8 @@ const cardSettingsCustomFields = require('/models/lib/cardSettingsCustomFields')
|
||||
const cardSettingsSplit = require('/models/lib/cardSettingsSplit');
|
||||
import { invalidateScrumNames } from '/client/components/boards/scrum/scrumFields';
|
||||
import { InfiniteScrolling } from '/client/lib/infiniteScrolling';
|
||||
// Registers {{webhooksOff}}: the board menu's Outgoing Webhooks and Bots.
|
||||
import '/client/lib/webhooksSwitch';
|
||||
import '/client/components/boards/exportScope';
|
||||
import AccessibilitySettings from '/models/accessibilitySettings';
|
||||
import Boards from '/models/boards';
|
||||
@@ -347,6 +350,10 @@ Template.sidebar.helpers({
|
||||
getViewTitle() {
|
||||
return Sidebar && Sidebar.getViewTitle();
|
||||
},
|
||||
// The open view's ? (docs/Features/General/Help-Button.md).
|
||||
sidebarHelp() {
|
||||
return Sidebar && sidebarViewHelpId(Sidebar.getView());
|
||||
},
|
||||
showTongueTitle() {
|
||||
return Sidebar && Sidebar.showTongueTitle();
|
||||
},
|
||||
@@ -706,6 +713,8 @@ Template.boardMenuPopup.events({
|
||||
'click .js-open-board-swimlane-settings': Popup.open('boardSwimlaneSettings', { titleKey: 'swimlane' }),
|
||||
'click .js-open-board-date-settings': Popup.open('boardDateSettings', { titleKey: 'date' }),
|
||||
'click .js-open-board-list-settings': Popup.open('boardListSettings', { titleKey: 'list' }),
|
||||
// Board Settings / Shop (client/components/boards/shopView.js).
|
||||
'click .js-open-board-shop-settings': Popup.open('boardShopSettings', { titleKey: 'board-view-shop' }),
|
||||
// #2489: WIP Limit Groups is reached from Board Settings / Swimlane now -
|
||||
// its click handler sits with the Swimlane popup's events below.
|
||||
// Board Settings / Card: Card Settings with no card. Overriding
|
||||
|
||||
@@ -3,6 +3,13 @@ import { revealOnBoard } from '/client/lib/revealOnBoard';
|
||||
|
||||
Template.searchSidebar.onCreated(function () {
|
||||
this.term = new ReactiveVar('');
|
||||
// The server's matches for the term, attachment text included
|
||||
// (server/publications/boardTextMatches.js): the search below ORs them in.
|
||||
this.autorun(() => {
|
||||
const boardId = Session.get('currentBoard');
|
||||
const term = this.term.get().trim();
|
||||
if (boardId && term) this.subscribe('boardTextMatches', boardId, term);
|
||||
});
|
||||
// #2171: which card found is shown on the board (0 = none yet).
|
||||
this.step = new ReactiveVar(0);
|
||||
});
|
||||
|
||||
@@ -24,6 +24,7 @@ import '/client/components/boards/mapView.jade';
|
||||
import '/client/components/boards/emailView.jade';
|
||||
import '/client/components/boards/chatView.jade';
|
||||
import '/client/components/boards/websiteView.jade';
|
||||
import '/client/components/boards/shopView.jade';
|
||||
import '/client/components/boards/versionControlView.jade';
|
||||
import '/client/components/boards/columnSetsView.jade';
|
||||
import '/client/components/boards/calendarModeView.jade';
|
||||
@@ -53,6 +54,7 @@ import '/client/components/boards/mapView.js';
|
||||
import '/client/components/boards/emailView.js';
|
||||
import '/client/components/boards/chatView.js';
|
||||
import '/client/components/boards/websiteView.js';
|
||||
import '/client/components/boards/shopView.js';
|
||||
import '/client/components/boards/versionControlView.js';
|
||||
import '/client/components/boards/columnSetsView.js';
|
||||
import '/client/components/boards/calendarModeView.js';
|
||||
@@ -75,6 +77,7 @@ import '/client/components/boards/mapView.css';
|
||||
import '/client/components/boards/emailView.css';
|
||||
import '/client/components/boards/chatView.css';
|
||||
import '/client/components/boards/websiteView.css';
|
||||
import '/client/components/boards/shopView.css';
|
||||
import '/client/components/boards/versionControlView.css';
|
||||
import '/client/components/boards/columnSetsView.css';
|
||||
import '/client/components/boards/calendarModeView.css';
|
||||
|
||||
@@ -19,6 +19,8 @@ import '/client/components/main/starredItems.jade';
|
||||
// / Problems / Offices. A .jade file is not picked up by being on disk.
|
||||
import '/client/components/main/mapProvider.jade';
|
||||
import '/client/components/main/popup.tpl.jade';
|
||||
// The ? of every feature place (docs/Features/General/Help-Button.md).
|
||||
import '/client/components/main/featureHelp.jade';
|
||||
import '/client/components/main/spinner.jade';
|
||||
import '/client/components/main/spinner_bounce.jade';
|
||||
import '/client/components/main/spinner_cube.jade';
|
||||
@@ -46,6 +48,7 @@ import '/client/components/cloud/cloudPanel.css';
|
||||
|
||||
import '/client/lib/keyboard';
|
||||
import '/client/lib/popup';
|
||||
import '/client/components/main/featureHelp.js';
|
||||
import '/client/lib/pageSidebar';
|
||||
import '/client/components/main/pageSidebar.js';
|
||||
import '/client/components/main/accessibility.js';
|
||||
|
||||
@@ -52,6 +52,13 @@ import '/client/components/settings/problemsSummary.jade';
|
||||
import '/client/components/settings/problemsSummary.js';
|
||||
import '/client/components/settings/passwordLengthReport.jade';
|
||||
import '/client/components/settings/passwordLengthReport.js';
|
||||
// Admin Panel / Problems / Webhooks: every webhook and who added it.
|
||||
import '/client/components/settings/webhooksReport.jade';
|
||||
import '/client/components/settings/webhooksReport.js';
|
||||
// Admin Panel / Settings / Privacy and security / Allowed addresses.
|
||||
import '/client/components/settings/adminPanelAddresses.jade';
|
||||
import '/client/components/settings/adminPanelAddresses.js';
|
||||
import '/client/components/settings/adminPanelAddresses.css';
|
||||
import '/client/components/settings/translationBody.js';
|
||||
|
||||
// adminProblems.css was missing here, so NONE of the Admin Panel report styling
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// Keep server diagnostics in the console; show existing localized UI messages.
|
||||
// The last-admin case must precede the general authorization failure.
|
||||
export function accountOperationErrorKey(error) {
|
||||
if (error?.error === 'not-authorized' && error.reason === 'Cannot delete the last administrator') return 'last-admin-desc';
|
||||
if (error?.error === 'not-authorized' && (error.reason === 'Cannot delete the last administrator'
|
||||
|| error.reason === 'Cannot anonymize the last administrator')) return 'last-admin-desc';
|
||||
if (error?.error === 'not-authorized') return 'error-notAllowed';
|
||||
if (error?.error === 'user-not-found') return 'error-user-doesNotExist';
|
||||
return 'server-error';
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
// The slideshow's reader of a converted preview (server/lib/
|
||||
// attachmentPreviewStore.js): an attachment whose content is scattered
|
||||
// through it - an Outlook .msg, an OpenDocument - is converted once on the
|
||||
// server into rows, and read here a screenful at a time through HTTP Range
|
||||
// requests: the index entries of the visible rows, then those rows.
|
||||
//
|
||||
// <link>/preview-meta { kind, count, truncated }
|
||||
// <link>/preview-index (count + 1) little-endian uint64 offsets
|
||||
// <link>/preview-rows one JSON object a line
|
||||
//
|
||||
// (Two path segments: Meteor-Files takes every longer path under /cdn/storage.)
|
||||
|
||||
export const MAX_CACHED_ROWS = 5000;
|
||||
|
||||
async function ranged(fetchImpl, url, start, end, signal) {
|
||||
const response = await fetchImpl(url, { credentials: 'same-origin', signal, headers: { Range: `bytes=${start}-${end - 1}` } });
|
||||
if (!response.ok) throw new Error(`Attachment preview fetch failed: ${response.status}`);
|
||||
let bytes = new Uint8Array(await response.arrayBuffer());
|
||||
// A whole answer to a range request: take the range from it.
|
||||
if (response.status === 200) bytes = bytes.subarray(start, end);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
export class PreviewRecords {
|
||||
constructor(url, { signal, fetchImpl } = {}) {
|
||||
this.base = String(url).split(/[?#]/)[0].replace(/\/$/, '');
|
||||
this.signal = signal;
|
||||
this.fetch = fetchImpl || ((...a) => fetch(...a));
|
||||
this.cache = new Map();
|
||||
this.requests = 0;
|
||||
}
|
||||
|
||||
async open() {
|
||||
this.requests += 1;
|
||||
const response = await this.fetch(`${this.base}/preview-meta`, { credentials: 'same-origin', signal: this.signal });
|
||||
if (!response.ok) throw new Error(`Attachment preview failed: ${response.status}`);
|
||||
this.meta = await response.json();
|
||||
this.count = Number(this.meta.count) || 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
// Rows [first, first + count), from the cache or in two requests.
|
||||
async rowsAt(first, count) {
|
||||
const end = Math.min(this.count, first + count);
|
||||
if (end <= first) return [];
|
||||
const missing = [];
|
||||
for (let i = first; i < end; i += 1) if (!this.cache.has(i)) missing.push(i);
|
||||
if (missing.length) {
|
||||
const a = missing[0];
|
||||
const b = missing[missing.length - 1] + 1;
|
||||
this.requests += 2;
|
||||
const index = await ranged(this.fetch, `${this.base}/preview-index`, a * 8, (b + 1) * 8, this.signal);
|
||||
const view = new DataView(index.buffer, index.byteOffset, index.byteLength);
|
||||
const offsets = [];
|
||||
for (let i = 0; i + 8 <= index.length; i += 8) offsets.push(Number(view.getBigUint64(i, true)));
|
||||
if (offsets.length < b - a + 1) throw new Error('The attachment preview is damaged: its index is short');
|
||||
const body = await ranged(this.fetch, `${this.base}/preview-rows`, offsets[0], offsets[offsets.length - 1], this.signal);
|
||||
const decoder = new TextDecoder('utf-8');
|
||||
for (let i = a; i < b; i += 1) {
|
||||
const line = decoder.decode(body.subarray(offsets[i - a] - offsets[0], offsets[i - a + 1] - offsets[0])).trim();
|
||||
let row;
|
||||
try { row = JSON.parse(line); } catch (e) { row = { k: 'text', v: line }; }
|
||||
this.cache.set(i, row);
|
||||
}
|
||||
while (this.cache.size > MAX_CACHED_ROWS) this.cache.delete(this.cache.keys().next().value);
|
||||
}
|
||||
const rows = [];
|
||||
for (let i = first; i < end; i += 1) rows.push(this.cache.get(i));
|
||||
return rows;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,465 @@
|
||||
// The attachment slideshow's viewers for files a browser does not show by
|
||||
// itself: plain text, Markdown, CSV and TSV, source code and JSON, iCalendar,
|
||||
// Outlook .msg, tar archives and OpenDocument text, spreadsheets and
|
||||
// presentations.
|
||||
//
|
||||
// Nothing is read whole that does not have to be (attachmentWindow.js):
|
||||
//
|
||||
// text, code, CSV, JSON, Markdown HTTP Range requests for what is on the
|
||||
// screen; the scrollbar is the whole file, so dragging it to the middle
|
||||
// shows the middle. A file of one chunk (256 KB) is read in that one
|
||||
// request and indexed exactly; Markdown and JSON of that size are
|
||||
// formatted (a larger one is shown as its text, as formatting needs the
|
||||
// whole document).
|
||||
// tar and tar.gz, iCalendar read in order, as far as they are scrolled:
|
||||
// infinite scroll downwards. Compressed data cannot be read from its
|
||||
// middle.
|
||||
// Outlook .msg, OpenDocument their content is scattered through the file
|
||||
// (a Compound File's sectors, a ZIP's compressed content.xml), so the
|
||||
// server converts each once, a piece at a time, into rows with an index
|
||||
// (server/lib/attachmentPreviewStore.js); the scrollbar is exactly those
|
||||
// rows, and only the visible ones are fetched (attachmentRecords.js).
|
||||
//
|
||||
// Only the visible rows are in the page. Everything a file contains reaches it
|
||||
// as text (textContent) - except highlight.js's output, escaped text in
|
||||
// <span class="hljs-..."> sanitized down to exactly that, and Markdown, which
|
||||
// the caller renders through WeKan's own markdown helper with every setting
|
||||
// the card description has.
|
||||
|
||||
import { RangeReader, ByteRows, WindowView, GrowingView, IndexedView, splitRows, CHUNK_BYTES, MAX_ROW_BYTES }
|
||||
from './attachmentWindow.js';
|
||||
import { PreviewRecords } from './attachmentRecords.js';
|
||||
|
||||
export const MAX_COLUMNS = 1024;
|
||||
export const MAX_COMPONENT_BYTES = 1024 * 1024;
|
||||
export const ROWS_PER_READ = 200;
|
||||
const FEED_BYTES = 4096;
|
||||
|
||||
export function decodeText(bytes) {
|
||||
return new TextDecoder('utf-8').decode(bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes));
|
||||
}
|
||||
|
||||
// A NUL in the first 8000 bytes is how git decides a file is binary; such a
|
||||
// file is not shown as text.
|
||||
export function looksBinary(bytes) {
|
||||
const view = bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes);
|
||||
return view.subarray(0, 8000).includes(0);
|
||||
}
|
||||
|
||||
function element(doc, tag, text, className) {
|
||||
const node = doc.createElement(tag);
|
||||
if (text !== undefined) node.textContent = text;
|
||||
if (className) node.className = className;
|
||||
return node;
|
||||
}
|
||||
|
||||
// Rows of text already in memory, cut at MAX_ROW_BYTES characters as ByteRows
|
||||
// cuts a file.
|
||||
function rowsOfText(text) {
|
||||
const rows = [];
|
||||
for (const line of text.split('\n')) {
|
||||
if (line.length <= MAX_ROW_BYTES) rows.push({ start: rows.length, end: rows.length + 1, text: line });
|
||||
else {
|
||||
for (let at = 0; at < line.length; at += MAX_ROW_BYTES) {
|
||||
rows.push({ start: rows.length, end: rows.length + 1, text: line.slice(at, at + MAX_ROW_BYTES) });
|
||||
}
|
||||
}
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
// --- text, code, CSV, JSON, Markdown ----------------------------------------------
|
||||
|
||||
async function highlighter(language) {
|
||||
if (!language || language === 'plaintext') return null;
|
||||
const [{ default: hljs }, { default: DOMPurify }] = await Promise.all([
|
||||
import('highlight.js/lib/common'), import('dompurify')]);
|
||||
if (!hljs.getLanguage(language)) return null;
|
||||
// highlight.js escapes the source; this keeps that guarantee even if it ever
|
||||
// did not: only <span class="hljs-..."> survives. Each row is coloured on
|
||||
// its own, as only the rows on the screen are read.
|
||||
return text => DOMPurify.sanitize(hljs.highlight(text, { language, ignoreIllegals: true }).value,
|
||||
{ ALLOWED_TAGS: ['span'], ALLOWED_ATTR: ['class'], ALLOWED_URI_REGEXP: /^$/ });
|
||||
}
|
||||
|
||||
function textRenderer(doc, highlight) {
|
||||
return (rows, viewport) => {
|
||||
const items = rows.map(row => {
|
||||
const el = element(doc, 'div', undefined, 'attachment-window-row');
|
||||
if (highlight) {
|
||||
el.innerHTML = highlight(row.text);
|
||||
for (const span of Array.from(el.querySelectorAll('span'))) {
|
||||
span.className = String(span.className).split(/\s+/).filter(c => /^hljs-[\w-]+$/.test(c)).join(' ');
|
||||
}
|
||||
} else el.textContent = row.text;
|
||||
return el;
|
||||
});
|
||||
viewport.replaceChildren(...items);
|
||||
};
|
||||
}
|
||||
|
||||
function cellsRow(doc, cells, className) {
|
||||
const el = element(doc, 'div', undefined, `attachment-window-row attachment-csv-row ${className || ''}`.trim());
|
||||
for (const text of cells) {
|
||||
const cell = element(doc, 'span', text, 'attachment-csv-cell');
|
||||
cell.title = text;
|
||||
el.appendChild(cell);
|
||||
}
|
||||
return el;
|
||||
}
|
||||
|
||||
function csvRenderer(doc, Papa, delimiter, header) {
|
||||
// Each row is parsed on its own, as only the rows on the screen are read; a
|
||||
// quoted value with a newline in it shows as two rows.
|
||||
const parse = text => {
|
||||
const data = Papa.parse(text, { delimiter }).data[0];
|
||||
return (Array.isArray(data) ? data : [text]).slice(0, MAX_COLUMNS).map(c => String(c ?? ''));
|
||||
};
|
||||
const columns = header ? parse(header.text) : [];
|
||||
return (rows, viewport) => {
|
||||
const items = [];
|
||||
if (header) items.push(cellsRow(doc, columns, 'attachment-csv-header'));
|
||||
// The header row is drawn once, pinned; not again as data.
|
||||
for (const r of rows) if (!header || r.start !== header.start) items.push(cellsRow(doc, parse(r.text)));
|
||||
viewport.replaceChildren(...items);
|
||||
};
|
||||
}
|
||||
|
||||
async function openTextWindow({ container, reader, rich, language, extension, renderMarkdown, viewportHeight }) {
|
||||
const doc = container.ownerDocument;
|
||||
const size = reader.size;
|
||||
const first = await reader.bytes(0, Math.min(size, CHUNK_BYTES));
|
||||
if (looksBinary(first)) throw new Error('Binary file');
|
||||
const whole = size <= CHUNK_BYTES;
|
||||
container.replaceChildren();
|
||||
if (whole && rich === 'markdown') {
|
||||
const holder = element(doc, 'div', undefined, 'attachment-preview-markdown');
|
||||
container.appendChild(holder);
|
||||
return renderMarkdown(holder, decodeText(first));
|
||||
}
|
||||
let all = null;
|
||||
if (whole) {
|
||||
let text = null;
|
||||
if (language === 'json') {
|
||||
try { text = JSON.stringify(JSON.parse(decodeText(first)), null, 2); } catch (e) { /* shown as it is */ }
|
||||
}
|
||||
all = text === null ? await splitRows(first) : rowsOfText(text);
|
||||
}
|
||||
const rows = new ByteRows(reader, size);
|
||||
let renderRows;
|
||||
let className = 'attachment-preview-text';
|
||||
if (rich === 'csv') {
|
||||
const { default: Papa } = await import('papaparse');
|
||||
const header = all ? all[0] : await rows.rowAt(0);
|
||||
renderRows = csvRenderer(doc, Papa, extension === 'tsv' ? '\t' : ',', header);
|
||||
className = 'attachment-preview-csv';
|
||||
} else {
|
||||
const highlight = rich === 'code' ? await highlighter(language) : null;
|
||||
renderRows = textRenderer(doc, highlight);
|
||||
if (rich === 'code') className = 'viewer attachment-preview-code';
|
||||
}
|
||||
const view = new WindowView(container, { rows, all, size, renderRows, className, viewportHeight });
|
||||
await view.start();
|
||||
return { view, destroy() { view.destroy(); } };
|
||||
}
|
||||
|
||||
// --- tar --------------------------------------------------------------------
|
||||
|
||||
function field(bytes, start, length) {
|
||||
const slice = bytes.subarray(start, start + length);
|
||||
const end = slice.indexOf(0);
|
||||
return decodeText(end < 0 ? slice : slice.subarray(0, end));
|
||||
}
|
||||
|
||||
function octal(bytes, start, length) {
|
||||
const text = field(bytes, start, length).trim();
|
||||
return /^[0-7]+$/.test(text) ? parseInt(text, 8) : 0;
|
||||
}
|
||||
|
||||
// A tar header's checksum: the sum of its bytes with the checksum field
|
||||
// itself counted as spaces, as tar(5) defines it.
|
||||
function tarChecksumOk(header) {
|
||||
let sum = 0;
|
||||
for (let i = 0; i < 512; i += 1) sum += i >= 148 && i < 156 ? 32 : header[i];
|
||||
return sum === octal(header, 148, 8);
|
||||
}
|
||||
|
||||
// The names of a tar archive, fed in pieces as it streams in: ustar, GNU long
|
||||
// names and pax paths. Member data is counted past, never kept.
|
||||
export class TarNames {
|
||||
constructor() {
|
||||
this.buffer = new Uint8Array(0);
|
||||
this.skip = 0;
|
||||
this.collect = null;
|
||||
this.longName = null;
|
||||
this.headers = 0;
|
||||
this.ended = false;
|
||||
}
|
||||
|
||||
push(bytes) {
|
||||
const names = [];
|
||||
let data = bytes;
|
||||
while (data.length && !this.ended) {
|
||||
if (this.skip > 0) {
|
||||
const n = Math.min(this.skip, data.length);
|
||||
this.skip -= n;
|
||||
data = data.subarray(n);
|
||||
continue;
|
||||
}
|
||||
if (this.collect) {
|
||||
const n = Math.min(this.collect.left, data.length);
|
||||
this.collect.parts.push(data.slice(0, n));
|
||||
this.collect.left -= n;
|
||||
data = data.subarray(n);
|
||||
if (this.collect.left === 0) {
|
||||
const joined = new Uint8Array(this.collect.parts.reduce((t, p) => t + p.length, 0));
|
||||
let at = 0;
|
||||
for (const p of this.collect.parts) { joined.set(p, at); at += p.length; }
|
||||
const body = decodeText(joined);
|
||||
if (this.collect.type === 'L') this.longName = body.replace(/\0[\s\S]*$/, '');
|
||||
else {
|
||||
const path = /(?:^|\n)\d+ path=([^\n]*)\n/.exec(body);
|
||||
if (path) this.longName = path[1];
|
||||
}
|
||||
this.skip = this.collect.padding;
|
||||
this.collect = null;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
const take = Math.min(512 - this.buffer.length, data.length);
|
||||
const header = new Uint8Array(this.buffer.length + take);
|
||||
header.set(this.buffer);
|
||||
header.set(data.subarray(0, take), this.buffer.length);
|
||||
data = data.subarray(take);
|
||||
if (header.length < 512) { this.buffer = header; continue; }
|
||||
this.buffer = new Uint8Array(0);
|
||||
if (header.every(b => b === 0)) { this.ended = true; break; }
|
||||
if (!tarChecksumOk(header)) {
|
||||
if (!this.headers) throw new Error('Not a tar archive');
|
||||
this.ended = true; // the rest of one that was cut off or damaged
|
||||
break;
|
||||
}
|
||||
this.headers += 1;
|
||||
const size = octal(header, 124, 12);
|
||||
const padded = Math.ceil(size / 512) * 512;
|
||||
const type = String.fromCharCode(header[156] || 48);
|
||||
if ((type === 'L' || type === 'x') && size > 0 && size <= 65536) {
|
||||
this.collect = { type, left: size, parts: [], padding: padded - size };
|
||||
continue;
|
||||
}
|
||||
if (type === 'L' || type === 'x' || type === 'g' || type === 'K') { this.skip = padded; continue; }
|
||||
const prefix = field(header, 0x159, 155);
|
||||
names.push(this.longName || (prefix ? `${prefix}/${field(header, 0, 100)}` : field(header, 0, 100)));
|
||||
this.longName = null;
|
||||
this.skip = padded;
|
||||
}
|
||||
return names;
|
||||
}
|
||||
}
|
||||
|
||||
async function* tarNameStream(reader) {
|
||||
const tar = new TarNames();
|
||||
let gunzip = null;
|
||||
let pending = [];
|
||||
for await (const chunk of reader.stream()) {
|
||||
if (gunzip === null) {
|
||||
if (chunk.length > 2 && chunk[0] === 0x1f && chunk[1] === 0x8b) {
|
||||
const { Gunzip } = await import('fflate');
|
||||
gunzip = new Gunzip();
|
||||
gunzip.ondata = data => { if (!tar.ended) pending.push(...tar.push(data)); };
|
||||
} else gunzip = false;
|
||||
}
|
||||
// Small pieces, so a gzip bomb inflates a little at a time and stops as
|
||||
// soon as the view has enough names.
|
||||
for (let at = 0; at < chunk.length; at += FEED_BYTES) {
|
||||
const piece = chunk.subarray(at, at + FEED_BYTES);
|
||||
if (gunzip) gunzip.push(piece, false);
|
||||
else pending.push(...tar.push(piece));
|
||||
if (pending.length) { yield* pending; pending = []; }
|
||||
if (tar.ended) return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- iCalendar ----------------------------------------------------------------
|
||||
|
||||
// The VEVENTs and VTODOs of a calendar, fed as text as it streams in; each is
|
||||
// read by WeKan's own parseICalendar on its own.
|
||||
export class IcsComponents {
|
||||
constructor(parseICalendar) {
|
||||
this.parse = parseICalendar;
|
||||
this.rest = '';
|
||||
this.line = null;
|
||||
this.lines = null;
|
||||
this.depth = 0;
|
||||
this.bytes = 0;
|
||||
this.started = false;
|
||||
}
|
||||
|
||||
logical(line, out) {
|
||||
if (!this.started) {
|
||||
if (!line.trim()) return;
|
||||
if (!/^BEGIN:VCALENDAR$/i.test(line.trim())) throw new Error('Not an iCalendar file: no BEGIN:VCALENDAR');
|
||||
this.started = true;
|
||||
return;
|
||||
}
|
||||
const upper = line.toUpperCase();
|
||||
if (!this.lines) {
|
||||
if (upper === 'BEGIN:VEVENT' || upper === 'BEGIN:VTODO') { this.lines = [line]; this.depth = 1; this.bytes = line.length; }
|
||||
return;
|
||||
}
|
||||
this.lines.push(line);
|
||||
this.bytes += line.length;
|
||||
if (upper.startsWith('BEGIN:')) this.depth += 1;
|
||||
else if (upper.startsWith('END:')) this.depth -= 1;
|
||||
if (this.depth === 0) {
|
||||
const text = `BEGIN:VCALENDAR\r\n${this.lines.join('\r\n')}\r\nEND:VCALENDAR\r\n`;
|
||||
this.lines = null;
|
||||
try { out.push(...this.parse(text).tasks); } catch (e) { /* one broken item: the others still show */ }
|
||||
} else if (this.bytes > MAX_COMPONENT_BYTES) {
|
||||
this.lines = null; // an item this large is not shown
|
||||
}
|
||||
}
|
||||
|
||||
push(text, final = false) {
|
||||
const out = [];
|
||||
const parts = (this.rest + text).split(/\r?\n/);
|
||||
this.rest = final ? '' : parts.pop();
|
||||
for (const raw of parts) {
|
||||
if (/^[ \t]/.test(raw) && this.line !== null) { this.line += raw.slice(1); continue; }
|
||||
if (this.line !== null) this.logical(this.line, out);
|
||||
this.line = raw;
|
||||
}
|
||||
if (final && this.line !== null) { this.logical(this.line, out); this.line = null; }
|
||||
if (final && !this.started) throw new Error('Not an iCalendar file: no BEGIN:VCALENDAR');
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
async function* calendarStream(reader) {
|
||||
const { parseICalendar } = await import('../../models/lib/icalendarFormat.js');
|
||||
const ics = new IcsComponents(parseICalendar);
|
||||
const decoder = new TextDecoder('utf-8');
|
||||
for await (const chunk of reader.stream()) {
|
||||
for (let at = 0; at < chunk.length; at += FEED_BYTES * 16) {
|
||||
const tasks = ics.push(decoder.decode(chunk.subarray(at, at + FEED_BYTES * 16), { stream: true }));
|
||||
if (tasks.length) yield* tasks;
|
||||
}
|
||||
}
|
||||
yield* ics.push(decoder.decode(), true);
|
||||
}
|
||||
|
||||
// --- converted previews: Outlook .msg, OpenDocument -----------------------------
|
||||
|
||||
function recordRenderer(doc, labels) {
|
||||
const field = { subject: labels.subject, from: labels.from, to: labels.to, cc: labels.cc, date: labels.date };
|
||||
return (rows, viewport) => {
|
||||
viewport.replaceChildren(...rows.map(row => {
|
||||
if (!row) return element(doc, 'div', '', 'attachment-window-row');
|
||||
if (row.k === 'row') return cellsRow(doc, (row.c || []).map(String));
|
||||
if (row.k === 'field' || row.k === 'file') {
|
||||
const el = element(doc, 'div', undefined, 'attachment-window-row attachment-preview-field');
|
||||
el.appendChild(element(doc, 'span', row.k === 'file' ? labels.attachments : (field[row.l] || row.l), 'attachment-preview-label'));
|
||||
el.appendChild(element(doc, 'span', row.k === 'field' && row.l === 'date' ? localDate(row.v) : String(row.v ?? '')));
|
||||
return el;
|
||||
}
|
||||
const cls = { h: 'attachment-preview-heading', page: 'attachment-preview-page', more: 'attachment-preview-more' }[row.k] || '';
|
||||
return element(doc, 'div', String(row.v ?? ''), `attachment-window-row ${cls}`.trim());
|
||||
}));
|
||||
};
|
||||
}
|
||||
|
||||
async function openRecords({ container, url, signal, fetchImpl, labels, viewportHeight }) {
|
||||
const records = await new PreviewRecords(url, { signal, fetchImpl }).open();
|
||||
if (signal && signal.aborted) return { destroy() {} };
|
||||
container.replaceChildren();
|
||||
if (!records.count) {
|
||||
container.textContent = labels.empty;
|
||||
return { records, destroy() { container.replaceChildren(); } };
|
||||
}
|
||||
// A preview the server's disk guard ended (attachmentPreviewStore.js
|
||||
// MAX_PREVIEW_BYTES) ends with a row that says so, without words.
|
||||
const extra = records.meta.truncated ? 1 : 0;
|
||||
const view = new IndexedView(container, {
|
||||
count: records.count + extra, viewportHeight, className: 'attachment-preview-records',
|
||||
rowsAt: async (first, n) => {
|
||||
const rows = await records.rowsAt(first, Math.min(n, records.count - first));
|
||||
if (extra && first + n > records.count) rows.push({ k: 'more', v: '\u22ef' });
|
||||
return rows;
|
||||
},
|
||||
renderRows: recordRenderer(container.ownerDocument, labels),
|
||||
});
|
||||
await view.start();
|
||||
return { view, records, destroy() { view.destroy(); container.replaceChildren(); } };
|
||||
}
|
||||
|
||||
// --- opening ------------------------------------------------------------------
|
||||
|
||||
function batches(iterator) {
|
||||
return async () => {
|
||||
const rows = [];
|
||||
while (rows.length < ROWS_PER_READ) {
|
||||
const { value, done } = await iterator.next();
|
||||
if (done) break;
|
||||
rows.push(value);
|
||||
}
|
||||
return rows.length ? rows : null;
|
||||
};
|
||||
}
|
||||
|
||||
function localDate(value) {
|
||||
if (!value) return '';
|
||||
const date = new Date(value);
|
||||
return Number.isNaN(date.getTime()) ? String(value) : date.toLocaleString();
|
||||
}
|
||||
|
||||
async function openGrowing({ container, next, renderRow, header, className, listTag, viewportHeight, emptyText }) {
|
||||
const view = new GrowingView(container, { next, renderRow, className, listTag, viewportHeight });
|
||||
if (header) view.viewport.insertBefore(header, view.list);
|
||||
await view.start();
|
||||
if (!view.rows.length && view.done) {
|
||||
view.destroy();
|
||||
container.textContent = emptyText;
|
||||
return { destroy() { container.replaceChildren(); } };
|
||||
}
|
||||
return { view, destroy() { view.destroy(); } };
|
||||
}
|
||||
|
||||
// Open one file into `container`. Resolves to { destroy() }, which the
|
||||
// slideshow calls when it moves on or closes. A file whose first read arrives
|
||||
// after the slideshow moved on (signal aborted) is not rendered.
|
||||
export async function openRichAttachment({ container, rich, extension, language, signal, size, url,
|
||||
labels = {}, renderMarkdown, fetchImpl, viewportHeight }) {
|
||||
const reader = new RangeReader(url, size, { signal, fetchImpl });
|
||||
await reader.probeSize();
|
||||
if (signal && signal.aborted) return { destroy() {} };
|
||||
const doc = container.ownerDocument;
|
||||
switch (rich) {
|
||||
case 'text': case 'markdown': case 'csv': case 'code':
|
||||
return openTextWindow({ container, reader, rich, language, extension, renderMarkdown, viewportHeight });
|
||||
case 'tar':
|
||||
container.replaceChildren();
|
||||
return openGrowing({ container, listTag: 'ul', viewportHeight, emptyText: labels.empty,
|
||||
next: batches(tarNameStream(reader)), renderRow: name => element(doc, 'li', name) });
|
||||
case 'calendar': {
|
||||
container.replaceChildren();
|
||||
const head = cellsRow(doc, [labels.title, labels.start, labels.end, labels.due, labels.description], 'attachment-csv-header');
|
||||
return openGrowing({ container, viewportHeight, emptyText: labels.empty, header: head, className: 'attachment-preview-csv',
|
||||
next: batches(calendarStream(reader)),
|
||||
// parseICalendar puts a VEVENT in the list "Events" and gives it its
|
||||
// DTEND as date_due; a VTODO's date_due is its DUE and date_end its
|
||||
// completion.
|
||||
renderRow: task => {
|
||||
const isEvent = task.column_name === 'Events';
|
||||
return cellsRow(doc, [task.title, localDate(task.date_started),
|
||||
isEvent ? localDate(task.date_due) : localDate(task.date_end),
|
||||
isEvent ? '' : localDate(task.date_due), task.description || '']);
|
||||
} });
|
||||
}
|
||||
case 'opendocument':
|
||||
case 'outlook':
|
||||
return openRecords({ container, url, signal, fetchImpl, labels, viewportHeight });
|
||||
default:
|
||||
throw new TypeError(`No viewer for ${rich}`);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,495 @@
|
||||
// The attachment slideshow's windowed reading: only what is on the screen is
|
||||
// fetched, and only what is on the screen is in the page.
|
||||
//
|
||||
// RangeReader the file through HTTP Range requests (server/routes/
|
||||
// universalFileServer.js answers them, #6745), in CHUNK_BYTES
|
||||
// pieces, of which at most CACHE_CHUNKS are kept: a file of any
|
||||
// size costs a few megabytes. A server that answers a range with
|
||||
// the whole file (a legacy CollectionFS attachment) is read as a
|
||||
// stream up to the bytes wanted, and the rest is not downloaded.
|
||||
// ByteRows the display rows of a text file, from ANY byte: a row ends at
|
||||
// a newline, or at the next multiple of MAX_ROW_BYTES of the
|
||||
// file, so a row is found the same way forwards, backwards and
|
||||
// from a byte in its middle, and a 50 MB line of minified JSON
|
||||
// is many rows rather than one. No row splits a UTF-8 character.
|
||||
// WindowView a scroll area whose scrollbar is the whole file: dragged to
|
||||
// the middle it shows the middle (the byte at that fraction of
|
||||
// the file), scrolled a little it moves row by row. A file that
|
||||
// fits in one chunk is indexed exactly. Only the visible rows are
|
||||
// in the DOM.
|
||||
// GrowingView for what can only be read from the start (a compressed tar, a
|
||||
// calendar, an OpenDocument's text): rows are read as they are
|
||||
// scrolled to - infinite scroll downwards - and only the visible
|
||||
// ones are in the DOM.
|
||||
//
|
||||
// Pure except for the DOM the views draw into: tests/attachmentWindow.test.cjs
|
||||
// drives all of it in jsdom with a fake fetch.
|
||||
|
||||
export const CHUNK_BYTES = 256 * 1024;
|
||||
export const CACHE_CHUNKS = 16;
|
||||
export const MAX_ROW_BYTES = 4096;
|
||||
// Browsers stop scrolling an element somewhere above ten million pixels.
|
||||
const MAX_SCROLL_PX = 8000000;
|
||||
const DEFAULT_ROW_PX = 20;
|
||||
|
||||
const NEWLINE = 10;
|
||||
const isContinuation = b => (b & 0xc0) === 0x80;
|
||||
|
||||
// --- reading ----------------------------------------------------------------
|
||||
|
||||
async function readUntil(response, from, to, signal) {
|
||||
// A 200 answer to a Range request: the whole file follows. Read it only up
|
||||
// to `to`, skipping `from` bytes, and cancel the rest.
|
||||
const reader = response.body.getReader();
|
||||
const out = new Uint8Array(to - from);
|
||||
let at = 0;
|
||||
let filled = 0;
|
||||
try {
|
||||
while (filled < out.length) {
|
||||
if (signal && signal.aborted) throw new DOMException('Aborted', 'AbortError');
|
||||
const { done, value } = await reader.read();
|
||||
if (done) break;
|
||||
const lo = Math.max(from - at, 0);
|
||||
const hi = Math.min(value.length, to - at);
|
||||
if (hi > lo) { out.set(value.subarray(lo, hi), filled); filled += hi - lo; }
|
||||
at += value.length;
|
||||
}
|
||||
} finally {
|
||||
await reader.cancel().catch(() => {});
|
||||
}
|
||||
return out.subarray(0, filled);
|
||||
}
|
||||
|
||||
export class RangeReader {
|
||||
constructor(url, size, { signal, fetchImpl } = {}) {
|
||||
this.url = url;
|
||||
this.size = Number(size) || 0;
|
||||
this.signal = signal;
|
||||
this.fetch = fetchImpl || ((...a) => fetch(...a));
|
||||
this.cache = new Map();
|
||||
this.requests = 0;
|
||||
}
|
||||
|
||||
// The size from the server when the document did not say: a one-byte range
|
||||
// answers it in Content-Range.
|
||||
async probeSize() {
|
||||
if (this.size > 0) return this.size;
|
||||
const response = await this.fetch(this.url, { credentials: 'same-origin', signal: this.signal,
|
||||
headers: { Range: 'bytes=0-0' } });
|
||||
if (!response.ok) throw new Error(`Attachment fetch failed: ${response.status}`);
|
||||
const total = /\/(\d+)$/.exec(response.headers.get('content-range') || '');
|
||||
this.size = total ? Number(total[1]) : Number(response.headers.get('content-length')) || 0;
|
||||
if (response.body) await response.body.cancel().catch(() => {});
|
||||
return this.size;
|
||||
}
|
||||
|
||||
async chunk(index) {
|
||||
if (this.cache.has(index)) {
|
||||
const bytes = this.cache.get(index);
|
||||
this.cache.delete(index);
|
||||
this.cache.set(index, bytes); // most recently used last
|
||||
return bytes;
|
||||
}
|
||||
const start = index * CHUNK_BYTES;
|
||||
const end = Math.min(this.size, start + CHUNK_BYTES);
|
||||
this.requests += 1;
|
||||
const response = await this.fetch(this.url, { credentials: 'same-origin', signal: this.signal,
|
||||
headers: { Range: `bytes=${start}-${end - 1}` } });
|
||||
if (!response.ok) throw new Error(`Attachment fetch failed: ${response.status}`);
|
||||
let bytes;
|
||||
if (response.status === 206) {
|
||||
bytes = new Uint8Array(await response.arrayBuffer());
|
||||
if (bytes.length > end - start) bytes = bytes.subarray(0, end - start);
|
||||
} else {
|
||||
bytes = await readUntil(response, start, end, this.signal);
|
||||
}
|
||||
this.cache.set(index, bytes);
|
||||
while (this.cache.size > CACHE_CHUNKS) this.cache.delete(this.cache.keys().next().value);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
// Bytes [start, end) of the file, clamped to it.
|
||||
async bytes(start, end) {
|
||||
start = Math.max(0, start);
|
||||
end = Math.min(this.size, end);
|
||||
if (end <= start) return new Uint8Array(0);
|
||||
const first = Math.floor(start / CHUNK_BYTES);
|
||||
const last = Math.floor((end - 1) / CHUNK_BYTES);
|
||||
if (first === last) {
|
||||
const c = await this.chunk(first);
|
||||
return c.subarray(start - first * CHUNK_BYTES, end - first * CHUNK_BYTES);
|
||||
}
|
||||
const out = new Uint8Array(end - start);
|
||||
let filled = 0;
|
||||
for (let i = first; i <= last; i += 1) {
|
||||
const c = await this.chunk(i);
|
||||
const lo = i === first ? start - first * CHUNK_BYTES : 0;
|
||||
const hi = i === last ? end - last * CHUNK_BYTES : c.length;
|
||||
out.set(c.subarray(lo, hi), filled);
|
||||
filled += hi - lo;
|
||||
}
|
||||
return out.subarray(0, filled);
|
||||
}
|
||||
|
||||
// The file as a stream of chunks from `start`, for the formats read in order.
|
||||
async *stream(start = 0, end = this.size) {
|
||||
for (let at = start; at < end; at += CHUNK_BYTES) {
|
||||
const bytes = await this.bytes(at, Math.min(end, at + CHUNK_BYTES));
|
||||
if (!bytes.length) return;
|
||||
yield bytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- rows of text -----------------------------------------------------------
|
||||
|
||||
const decoder = new TextDecoder('utf-8');
|
||||
|
||||
export class ByteRows {
|
||||
constructor(reader, size = reader.size) {
|
||||
this.reader = reader;
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
// The row that starts at `start` (a row start): { start, end, text }.
|
||||
async rowAt(start) {
|
||||
if (start >= this.size) return null;
|
||||
const limit = Math.min(this.size, (Math.floor(start / MAX_ROW_BYTES) + 1) * MAX_ROW_BYTES);
|
||||
const bytes = await this.reader.bytes(start, Math.min(this.size, limit + 3));
|
||||
const nl = bytes.subarray(0, limit - start).indexOf(NEWLINE);
|
||||
const end = nl >= 0 ? start + nl + 1 : limit;
|
||||
// A row cut at a multiple of MAX_ROW_BYTES owns the character whose lead
|
||||
// byte it holds; the next row skips that character's continuation bytes.
|
||||
let lo = 0;
|
||||
while (lo < 3 && lo < bytes.length && isContinuation(bytes[lo])) lo += 1;
|
||||
let hi = end - start;
|
||||
if (nl < 0) while (hi < bytes.length && hi < end - start + 3 && isContinuation(bytes[hi])) hi += 1;
|
||||
let text = decoder.decode(bytes.subarray(lo, hi));
|
||||
if (text.endsWith('\n')) text = text.slice(0, -1);
|
||||
if (text.endsWith('\r')) text = text.slice(0, -1);
|
||||
return { start, end, text };
|
||||
}
|
||||
|
||||
// The start of the row that holds byte `b`.
|
||||
async startOf(b) {
|
||||
const lo = Math.floor(b / MAX_ROW_BYTES) * MAX_ROW_BYTES;
|
||||
const bytes = await this.reader.bytes(lo, b);
|
||||
const nl = bytes.lastIndexOf(NEWLINE);
|
||||
return nl >= 0 ? lo + nl + 1 : lo;
|
||||
}
|
||||
|
||||
async rowContaining(b) {
|
||||
if (this.size <= 0) return null;
|
||||
return this.rowAt(await this.startOf(Math.min(Math.max(0, b), this.size - 1)));
|
||||
}
|
||||
|
||||
// The row that ends where the row at `start` begins.
|
||||
async rowBefore(start) {
|
||||
if (start <= 0) return null;
|
||||
return this.rowAt(await this.startOf(start - 1));
|
||||
}
|
||||
|
||||
// `count` rows from the row at `start`.
|
||||
async rowsFrom(start, count) {
|
||||
const rows = [];
|
||||
let at = start;
|
||||
while (rows.length < count && at < this.size) {
|
||||
const row = await this.rowAt(at);
|
||||
rows.push(row);
|
||||
at = row.end;
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
}
|
||||
|
||||
// Every row of bytes that are all in memory (a file of one chunk).
|
||||
export function splitRows(bytes) {
|
||||
const rows = [];
|
||||
const reader = { size: bytes.length, bytes: async (a, b) => bytes.subarray(Math.max(0, a), Math.min(bytes.length, b)) };
|
||||
const source = new ByteRows(reader, bytes.length);
|
||||
return source.rowsFrom(0, Infinity).then(found => { rows.push(...found); return rows; });
|
||||
}
|
||||
|
||||
// --- the views ----------------------------------------------------------------
|
||||
|
||||
function rowHeight(probe) {
|
||||
const h = probe.getBoundingClientRect ? probe.getBoundingClientRect().height : 0;
|
||||
return h > 0 ? h : DEFAULT_ROW_PX;
|
||||
}
|
||||
|
||||
function frame(container, className) {
|
||||
const doc = container.ownerDocument;
|
||||
const scroller = doc.createElement('div');
|
||||
scroller.className = `attachment-window ${className || ''}`.trim();
|
||||
const viewport = doc.createElement('div');
|
||||
viewport.className = 'attachment-window-viewport';
|
||||
const spacer = doc.createElement('div');
|
||||
spacer.className = 'attachment-window-spacer';
|
||||
scroller.append(viewport, spacer);
|
||||
container.appendChild(scroller);
|
||||
return { doc, scroller, viewport, spacer };
|
||||
}
|
||||
|
||||
// A scroll area over a text file of any size. renderRows(rows, viewport) draws
|
||||
// the visible rows; header(viewport) may pin something above them.
|
||||
export class WindowView {
|
||||
constructor(container, { rows, all = null, size, renderRows, className, viewportHeight, rowPx }) {
|
||||
Object.assign(this, frame(container, className));
|
||||
this.source = rows;
|
||||
this.all = all; // every row, when the file is one chunk: exact scrolling
|
||||
this.size = size;
|
||||
this.renderRows = renderRows;
|
||||
this.top = null;
|
||||
this.topIndex = 0;
|
||||
this.lastScroll = 0;
|
||||
this.carry = 0;
|
||||
this.generation = 0;
|
||||
this.fixedViewport = viewportHeight;
|
||||
const probe = this.doc.createElement('div');
|
||||
probe.className = 'attachment-window-row';
|
||||
probe.textContent = 'M';
|
||||
this.viewport.appendChild(probe);
|
||||
this.rowPx = rowPx || rowHeight(probe);
|
||||
probe.remove();
|
||||
this.onScroll = () => { this.update().catch(() => {}); };
|
||||
this.scroller.addEventListener('scroll', this.onScroll, { passive: true });
|
||||
}
|
||||
|
||||
visibleCount() {
|
||||
const h = this.fixedViewport || this.scroller.clientHeight || 600;
|
||||
return Math.ceil(h / this.rowPx) + 1;
|
||||
}
|
||||
|
||||
layout() {
|
||||
const viewportPx = this.visibleCount() * this.rowPx;
|
||||
let total;
|
||||
if (this.all) total = this.all.length * this.rowPx;
|
||||
else {
|
||||
// Rows estimated from the bytes per row seen so far.
|
||||
const perRow = Math.max(8, this.bytesPerRow || 80);
|
||||
total = Math.min(MAX_SCROLL_PX, Math.ceil(this.size / perRow) * this.rowPx);
|
||||
}
|
||||
this.spacer.style.height = `${Math.max(0, total - viewportPx)}px`;
|
||||
this.maxScroll = Math.max(0, total - viewportPx);
|
||||
}
|
||||
|
||||
async start() {
|
||||
const n = this.visibleCount();
|
||||
if (this.all) {
|
||||
this.layout();
|
||||
this.draw(this.all.slice(0, n));
|
||||
return;
|
||||
}
|
||||
const rows = await this.source.rowsFrom(0, n);
|
||||
this.top = rows[0] || null;
|
||||
if (rows.length) this.bytesPerRow = (rows[rows.length - 1].end) / rows.length;
|
||||
this.layout();
|
||||
this.draw(rows);
|
||||
}
|
||||
|
||||
draw(rows) {
|
||||
this.visible = rows;
|
||||
this.renderRows(rows, this.viewport);
|
||||
}
|
||||
|
||||
async update() {
|
||||
const generation = ++this.generation;
|
||||
const scrollTop = this.scroller.scrollTop;
|
||||
const n = this.visibleCount();
|
||||
if (this.all) {
|
||||
this.topIndex = Math.min(Math.max(0, this.all.length - n + 1), Math.floor(scrollTop / this.rowPx));
|
||||
this.draw(this.all.slice(this.topIndex, this.topIndex + n));
|
||||
return;
|
||||
}
|
||||
const delta = scrollTop - this.lastScroll;
|
||||
this.lastScroll = scrollTop;
|
||||
const page = n * this.rowPx;
|
||||
let top = this.top;
|
||||
if (scrollTop <= 0) {
|
||||
top = await this.source.rowAt(0);
|
||||
this.carry = 0;
|
||||
} else if (scrollTop >= this.maxScroll - 1) {
|
||||
// The end of the scrollbar is the end of the file.
|
||||
let row = await this.source.rowContaining(this.size - 1);
|
||||
for (let i = 1; i < n - 1 && row && row.start > 0; i += 1) row = await this.source.rowBefore(row.start);
|
||||
top = row;
|
||||
this.carry = 0;
|
||||
} else if (Math.abs(delta) <= 2 * page && top) {
|
||||
// A small scroll moves row by row.
|
||||
const exact = (delta + this.carry) / this.rowPx;
|
||||
const steps = Math.trunc(exact);
|
||||
this.carry = (exact - steps) * this.rowPx;
|
||||
for (let i = 0; i < Math.abs(steps) && top; i += 1) {
|
||||
const next = steps > 0 ? (top.end < this.size ? await this.source.rowAt(top.end) : null)
|
||||
: await this.source.rowBefore(top.start);
|
||||
if (!next) break;
|
||||
top = next;
|
||||
}
|
||||
} else {
|
||||
// A jump: the byte at the scrollbar's fraction of the file.
|
||||
const fraction = this.maxScroll ? scrollTop / this.maxScroll : 0;
|
||||
top = await this.source.rowContaining(Math.floor(fraction * this.size));
|
||||
this.carry = 0;
|
||||
}
|
||||
if (generation !== this.generation || !top) return;
|
||||
this.top = top;
|
||||
this.draw(await this.source.rowsFrom(top.start, n));
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.generation += 1;
|
||||
this.scroller.removeEventListener('scroll', this.onScroll);
|
||||
this.scroller.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// Rows read in order as they are scrolled to. next() resolves to the next
|
||||
// rows, or null at the end. renderRow(row, index) returns an element.
|
||||
export class GrowingView {
|
||||
constructor(container, { next, renderRow, className, listTag = 'div', viewportHeight, rowPx, batch = 4 }) {
|
||||
Object.assign(this, frame(container, className));
|
||||
this.list = this.doc.createElement(listTag);
|
||||
this.list.className = 'attachment-window-list';
|
||||
this.viewport.appendChild(this.list);
|
||||
this.next = next;
|
||||
this.renderRow = renderRow;
|
||||
this.rows = [];
|
||||
this.heights = [];
|
||||
this.done = false;
|
||||
this.loading = null;
|
||||
this.fixedViewport = viewportHeight;
|
||||
this.estimate = rowPx || DEFAULT_ROW_PX;
|
||||
this.batch = batch;
|
||||
this.onScroll = () => { this.update().catch(() => {}); };
|
||||
this.scroller.addEventListener('scroll', this.onScroll, { passive: true });
|
||||
}
|
||||
|
||||
viewportPx() { return this.fixedViewport || this.scroller.clientHeight || 600; }
|
||||
|
||||
heightOf(i) { return this.heights[i] || this.estimate; }
|
||||
|
||||
async more() {
|
||||
if (this.done) return;
|
||||
if (!this.loading) {
|
||||
this.loading = (async () => {
|
||||
const got = await this.next();
|
||||
if (!got) this.done = true;
|
||||
else this.rows.push(...got);
|
||||
})().finally(() => { this.loading = null; });
|
||||
}
|
||||
await this.loading;
|
||||
}
|
||||
|
||||
async start() {
|
||||
await this.update();
|
||||
}
|
||||
|
||||
// The first row at or below `px`, and the pixel where it starts.
|
||||
rowAtPx(px) {
|
||||
let y = 0;
|
||||
for (let i = 0; i < this.rows.length; i += 1) {
|
||||
const h = this.heightOf(i);
|
||||
if (y + h > px) return [i, y];
|
||||
y += h;
|
||||
}
|
||||
return [this.rows.length, y];
|
||||
}
|
||||
|
||||
totalPx() {
|
||||
let y = 0;
|
||||
for (let i = 0; i < this.rows.length; i += 1) y += this.heightOf(i);
|
||||
return y;
|
||||
}
|
||||
|
||||
async update() {
|
||||
const scrollTop = this.scroller.scrollTop;
|
||||
const want = scrollTop + this.viewportPx() * (1 + this.batch);
|
||||
// Infinite scroll: read on while what is read does not reach past the view.
|
||||
while (!this.done && this.totalPx() < want) await this.more();
|
||||
const [first, y] = this.rowAtPx(scrollTop);
|
||||
const end = Math.min(this.rows.length, first + Math.ceil(this.viewportPx() / this.estimate) + 2);
|
||||
const items = [];
|
||||
for (let i = first; i < end; i += 1) items.push(this.renderRow(this.rows[i], i));
|
||||
this.list.replaceChildren(...items);
|
||||
// Measure what was drawn, for the rows' positions next time.
|
||||
items.forEach((el, k) => {
|
||||
const h = el.getBoundingClientRect ? el.getBoundingClientRect().height : 0;
|
||||
if (h > 0) this.heights[first + k] = h;
|
||||
});
|
||||
// The first drawn row may begin above the view: shift it up by that much.
|
||||
this.list.style.transform = `translateY(${y - scrollTop}px)`;
|
||||
this.spacer.style.height = `${Math.max(0, this.totalPx() - this.viewportPx())}px`;
|
||||
this.visible = items;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.done = true;
|
||||
this.scroller.removeEventListener('scroll', this.onScroll);
|
||||
this.scroller.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// A scroll area over rows whose number is known and that are fetched by their
|
||||
// index (a converted preview, attachmentRecords.js): the scrollbar is exactly
|
||||
// the rows, and only the visible ones are fetched and drawn.
|
||||
// rowsAt(first, count) resolves to the rows [first, first + count).
|
||||
export class IndexedView {
|
||||
constructor(container, { count, rowsAt, renderRows, className, viewportHeight, rowPx }) {
|
||||
Object.assign(this, frame(container, className));
|
||||
this.count = count;
|
||||
this.rowsAt = rowsAt;
|
||||
this.renderRows = renderRows;
|
||||
this.fixedViewport = viewportHeight;
|
||||
this.generation = 0;
|
||||
const probe = this.doc.createElement('div');
|
||||
probe.className = 'attachment-window-row';
|
||||
probe.textContent = 'M';
|
||||
this.viewport.appendChild(probe);
|
||||
this.rowPx = rowPx || rowHeight(probe);
|
||||
probe.remove();
|
||||
this.onScroll = () => { this.update().catch(() => {}); };
|
||||
this.scroller.addEventListener('scroll', this.onScroll, { passive: true });
|
||||
}
|
||||
|
||||
visibleCount() {
|
||||
const h = this.fixedViewport || this.scroller.clientHeight || 600;
|
||||
return Math.ceil(h / this.rowPx) + 1;
|
||||
}
|
||||
|
||||
layout() {
|
||||
const viewportPx = this.visibleCount() * this.rowPx;
|
||||
const total = Math.min(MAX_SCROLL_PX, this.count * this.rowPx);
|
||||
this.maxScroll = Math.max(0, total - viewportPx);
|
||||
this.spacer.style.height = `${this.maxScroll}px`;
|
||||
}
|
||||
|
||||
// The first visible row for a scroll position: by pixels, or - for more rows
|
||||
// than a browser scrolls - by the fraction of the scrollbar.
|
||||
firstAt(scrollTop) {
|
||||
const n = this.visibleCount();
|
||||
const last = Math.max(0, this.count - n + 1);
|
||||
if (this.count * this.rowPx <= MAX_SCROLL_PX) return Math.min(last, Math.floor(scrollTop / this.rowPx));
|
||||
return Math.min(last, Math.round((this.maxScroll ? scrollTop / this.maxScroll : 0) * last));
|
||||
}
|
||||
|
||||
async start() {
|
||||
this.layout();
|
||||
await this.update();
|
||||
}
|
||||
|
||||
async update() {
|
||||
const generation = ++this.generation;
|
||||
const first = this.firstAt(this.scroller.scrollTop);
|
||||
const rows = await this.rowsAt(first, Math.min(this.visibleCount(), this.count - first));
|
||||
if (generation !== this.generation) return;
|
||||
this.first = first;
|
||||
this.visible = rows;
|
||||
this.renderRows(rows, this.viewport, first);
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.generation += 1;
|
||||
this.scroller.removeEventListener('scroll', this.onScroll);
|
||||
this.scroller.remove();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// #6939: the card details window opens at the width its user dragged it to, else
|
||||
// at the Admin Panel's default percentage of the window, else 520px. The
|
||||
// decision is models/lib/cardDetailsWidth.js; this is the browser half - the
|
||||
// CSS custom property every window reads, and noticing that the resize handle
|
||||
// was dragged. docs/Features/Cards/Card-Details-Width.md
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Session } from 'meteor/session';
|
||||
import { Tracker } from 'meteor/tracker';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import Users from '/models/users';
|
||||
|
||||
const widths = require('/models/lib/cardDetailsWidth');
|
||||
|
||||
// The Session answers at once after a drag, before the profile comes back; it
|
||||
// holds a number, or null for "forgotten". Unset = read the stored one.
|
||||
const SESSION_KEY = 'cardDetailsWidth';
|
||||
|
||||
function storedWidth() {
|
||||
const session = Session.get(SESSION_KEY);
|
||||
if (typeof session === 'number' || session === null) return session;
|
||||
const user = ReactiveCache.getCurrentUser();
|
||||
if (user && user.getCardDetailsWidth) return user.getCardDetailsWidth() ?? null;
|
||||
return Users.getPublicCardDetailsWidth ? Users.getPublicCardDetailsWidth() : null;
|
||||
}
|
||||
|
||||
export function hasCardDetailsWidth() {
|
||||
return widths.clampUserWidth(storedWidth()) !== null;
|
||||
}
|
||||
|
||||
export function saveCardDetailsWidth(width) {
|
||||
const value = width === null ? null : widths.clampUserWidth(width);
|
||||
if (width !== null && value === null) return;
|
||||
Session.set(SESSION_KEY, value);
|
||||
if (ReactiveCache.getCurrentUser()) {
|
||||
Meteor.call('setCardDetailsWidth', value);
|
||||
} else if (Users.setPublicCardDetailsWidth) {
|
||||
Users.setPublicCardDetailsWidth(value);
|
||||
}
|
||||
}
|
||||
|
||||
// Forget the dragged width; the open windows go back to the default at once.
|
||||
export function resetCardDetailsWidth() {
|
||||
saveCardDetailsWidth(null);
|
||||
document.querySelectorAll('.card-details').forEach(el => {
|
||||
el.style.width = '';
|
||||
el.style.height = '';
|
||||
});
|
||||
// Re-placed once the property is gone (the autorun below runs at the flush),
|
||||
// or they would measure the old width again (cardDetails.js resize handler).
|
||||
Tracker.afterFlush(() => window.dispatchEvent(new Event('resize')));
|
||||
}
|
||||
|
||||
Meteor.startup(() => {
|
||||
Tracker.autorun(() => {
|
||||
const css = widths.cardDetailsWidthCss({
|
||||
userWidth: storedWidth(),
|
||||
defaultPercent: ReactiveCache.getCurrentSetting()?.cardDetailsDefaultWidthPercent,
|
||||
});
|
||||
const root = document.documentElement;
|
||||
if (css) root.style.setProperty(widths.CSS_PROPERTY, css);
|
||||
else root.style.removeProperty(widths.CSS_PROPERTY);
|
||||
});
|
||||
});
|
||||
|
||||
const BOUND = 'data-wekan-width-memory';
|
||||
|
||||
// A press on the window's resize handle, then the release: the width it was
|
||||
// dragged to is kept. A double-click on the handle forgets it. Not for the
|
||||
// maximized card, nor in the mobile view, which have no handle.
|
||||
export function rememberCardDetailsWidth(el) {
|
||||
if (!el || el.getAttribute(BOUND)) return;
|
||||
el.setAttribute(BOUND, '1');
|
||||
const rtl = () => document.documentElement.dir === 'rtl';
|
||||
const usable = () => document.body.classList.contains('desktop-mode')
|
||||
&& !el.classList.contains('card-details-maximized');
|
||||
el.addEventListener('pointerdown', event => {
|
||||
if (!usable() || !widths.onResizeHandle(el.getBoundingClientRect(), event.clientX, event.clientY, rtl())) return;
|
||||
const before = el.getBoundingClientRect().width;
|
||||
// The browser resizes the window itself and sends the card no mousemove,
|
||||
// so its own drag flag is never set: a resize that ended with the mouse
|
||||
// outside the card - every one that makes it wider - closed the card.
|
||||
// Marked here as the resize it is, in a flag of its own: the card's
|
||||
// mousedown, which comes after this pointerdown, clears its drag flag.
|
||||
// The close handler in cardDetails.js reads both.
|
||||
Session.set('cardDetailsIsResizing', true);
|
||||
const done = () => {
|
||||
window.removeEventListener('pointerup', done, true);
|
||||
window.removeEventListener('pointercancel', done, true);
|
||||
// Cleared once the release's mouseup AND click have been handled: the
|
||||
// close handler runs for each of them.
|
||||
setTimeout(() => Session.set('cardDetailsIsResizing', false), 0);
|
||||
if (!el.isConnected) return;
|
||||
const after = el.getBoundingClientRect().width;
|
||||
if (widths.widthChanged(before, after)) saveCardDetailsWidth(after);
|
||||
};
|
||||
window.addEventListener('pointerup', done, true);
|
||||
window.addEventListener('pointercancel', done, true);
|
||||
});
|
||||
el.addEventListener('dblclick', event => {
|
||||
if (usable() && widths.onResizeHandle(el.getBoundingClientRect(), event.clientX, event.clientY, rtl())) {
|
||||
event.preventDefault();
|
||||
resetCardDetailsWidth();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
// The payment methods of Budget and billing (models/lib/paymentCodes.js), as
|
||||
// the browser draws them: their labels' translation keys, the placeholders of
|
||||
// their fields, and the QR code and the Finnish bank barcode as SVG. Shared by
|
||||
// the Budget and billing page (client/components/main/billing.js) and Board
|
||||
// View / Shop (client/components/boards/shopView.js), so a method reads and
|
||||
// scans the same on an invoice and at a shop's checkout.
|
||||
import qrcode from 'qrcode-generator';
|
||||
|
||||
const { code128CModules } = require('/models/lib/paymentCodes');
|
||||
|
||||
const METHOD_KEYS = {
|
||||
sepa: 'billing-method-sepa', 'fi-bank': 'billing-method-fi-bank', 'swiss-qr': 'billing-method-swiss-qr',
|
||||
'bank-transfer': 'billing-method-bank-transfer', swish: 'billing-method-swish', pix: 'billing-method-pix',
|
||||
upi: 'billing-method-upi', bitcoin: 'billing-method-bitcoin', paypal: 'billing-method-paypal', link: 'billing-method-link',
|
||||
cash: 'billing-method-cash', cheque: 'billing-method-cheque', other: 'billing-method-other',
|
||||
promptpay: 'billing-method-promptpay', paynow: 'billing-method-paynow', vietqr: 'billing-method-vietqr', fps: 'billing-method-fps',
|
||||
spayd: 'billing-method-spayd', zbp: 'billing-method-zbp', mnb: 'billing-method-mnb', ips: 'billing-method-ips',
|
||||
'dk-fik': 'billing-method-dk-fik', ethereum: 'billing-method-ethereum', litecoin: 'billing-method-litecoin',
|
||||
};
|
||||
const FIELD_KEYS = {
|
||||
name: 'billing-field-name', iban: 'billing-field-iban', bic: 'billing-field-bic', street: 'billing-field-street',
|
||||
building: 'billing-field-building', postcode: 'billing-field-postcode', town: 'billing-field-town', country: 'billing-country',
|
||||
details: 'billing-field-details', payee: 'billing-field-payee', key: 'billing-field-pix-key', city: 'billing-field-town',
|
||||
vpa: 'billing-field-vpa', address: 'billing-field-crypto-address', user: 'billing-field-paypal-user', label: 'billing-field-label',
|
||||
url: 'billing-field-url', target: 'billing-field-promptpay-target', proxy: 'billing-field-proxy', bin: 'billing-field-bank-bin',
|
||||
account: 'billing-field-account', nip: 'billing-field-nip', creditor: 'billing-field-creditor',
|
||||
};
|
||||
const PLACEHOLDERS = {
|
||||
iban: 'FI21 1234 5600 0007 85', bic: 'NDEAFIHH', country: 'CH', url: '…?amount={amount}&reference={reference}', vpa: 'shop@bank',
|
||||
target: '081 234 5678', proxy: '+65 9123 4567', bin: '970436', creditor: '12345678', nip: '5260250274',
|
||||
};
|
||||
|
||||
// The QR code of a payment, drawn from its matrix: the SVG carries modules
|
||||
// only, never the payload's text.
|
||||
function qrSvg(payload, swissCross) {
|
||||
qrcode.stringToBytes = qrcode.stringToBytesFuncs['UTF-8'];
|
||||
const qr = qrcode(0, 'M');
|
||||
qr.addData(payload, 'Byte');
|
||||
qr.make();
|
||||
const n = qr.getModuleCount();
|
||||
const m = 4;
|
||||
let path = '';
|
||||
for (let r = 0; r < n; r += 1) for (let c = 0; c < n; c += 1) if (qr.isDark(r, c)) path += `M${c + m} ${r + m}h1v1h-1z`;
|
||||
const size = n + 2 * m;
|
||||
let cross = '';
|
||||
if (swissCross) {
|
||||
const s = n * 7 / 46;
|
||||
const x = m + n / 2 - s / 2;
|
||||
cross = `<rect x="${x}" y="${x}" width="${s}" height="${s}" fill="#fff"/><rect x="${x + s * 0.06}" y="${x + s * 0.06}" width="${s * 0.88}" height="${s * 0.88}" fill="#000"/>`
|
||||
+ `<rect x="${x + s * 0.4}" y="${x + s * 0.2}" width="${s * 0.2}" height="${s * 0.6}" fill="#fff"/><rect x="${x + s * 0.2}" y="${x + s * 0.4}" width="${s * 0.6}" height="${s * 0.2}" fill="#fff"/>`;
|
||||
}
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${size} ${size}" width="160" height="160" shape-rendering="crispEdges" role="img">`
|
||||
+ `<rect width="${size}" height="${size}" fill="#fff"/><path d="${path}" fill="#000"/>${cross}</svg>`;
|
||||
}
|
||||
|
||||
// The Finnish bank barcode: digits only, as bars.
|
||||
function barcodeSvg(digits) {
|
||||
if (!/^\d{54}$/.test(String(digits))) return '';
|
||||
const modules = code128CModules(digits, 10);
|
||||
let path = '';
|
||||
for (let i = 0; i < modules.length; i += 1) if (modules[i] === '1') path += `M${i} 0h1v40h-1z`;
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${modules.length} 40" width="100%" height="60" preserveAspectRatio="none" shape-rendering="crispEdges" role="img">`
|
||||
+ `<rect width="${modules.length}" height="40" fill="#fff"/><path d="${path}" fill="#000"/></svg>`;
|
||||
}
|
||||
|
||||
|
||||
export { METHOD_KEYS, FIELD_KEYS, PLACEHOLDERS, qrSvg, barcodeSvg };
|
||||
+16
-2
@@ -114,6 +114,10 @@ window.Popup = new (class {
|
||||
openerElement,
|
||||
hasPopupParent: clickFromPopup(evt),
|
||||
title: self._getTitle(popupName, openOptions.titleKey),
|
||||
// Where the focus goes when Escape or Back leaves this popup for the
|
||||
// one under it: the control that opened it, found again by selector
|
||||
// because the popup under it is drawn anew (featureHelp.js).
|
||||
returnFocusSelector: openOptions.returnFocusSelector || null,
|
||||
depth: self._stack.length,
|
||||
offset: self._getOffset(openerElement, popupName),
|
||||
dataContext: openOptions.dataContext || (this && this.currentData && this.currentData()) || (options && options.dataContextIfCurrentDataIsUndefined) || this,
|
||||
@@ -210,9 +214,19 @@ window.Popup = new (class {
|
||||
// restore the old popup scroll position
|
||||
$contentWrapper.scrollTop(stack.scrollTop);
|
||||
}
|
||||
for (let i = 0; i < n; i++) this._stack.pop();
|
||||
let left = null;
|
||||
for (let i = 0; i < n; i++) left = this._stack.pop();
|
||||
this._dep.changed();
|
||||
this.focusCurrentPopup();
|
||||
const selector = left && left.returnFocusSelector;
|
||||
if (selector) {
|
||||
Tracker.afterFlush(() => {
|
||||
const target = document.querySelector(selector);
|
||||
if (target) target.focus();
|
||||
else this.focusCurrentPopup();
|
||||
});
|
||||
} else {
|
||||
this.focusCurrentPopup();
|
||||
}
|
||||
} else {
|
||||
this.close();
|
||||
}
|
||||
|
||||
@@ -86,6 +86,9 @@ function computePopupOffset(params) {
|
||||
boardChangeColorPopup: 720, // Board Settings / Change Color
|
||||
// Stickers: the same, and more of them - a hundred and fifty icons.
|
||||
cardStickersPopup: 720, // Card / Stickers
|
||||
// The ? of a feature: two headings and their texts, read like a page
|
||||
// (client/components/main/featureHelp.css).
|
||||
featureHelpPopup: 720,
|
||||
// Board Settings / Card is placed above, as a centred panel (#6796).
|
||||
};
|
||||
// The export popups are one popup with one scope each (#1173): same panes,
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// Admin Panel / Settings / Features / Turn off all webhooks
|
||||
// (models/lib/webhooksSwitch.js) for the interface: while it is on, every
|
||||
// webhook screen is hidden - not greyed out. The server refuses and sends
|
||||
// nothing whatever the interface shows (server/webhooksSwitch.js).
|
||||
import { Template } from 'meteor/templating';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
|
||||
const { webhooksDisabled } = require('/models/lib/webhooksSwitch');
|
||||
|
||||
export function webhooksOff() {
|
||||
return webhooksDisabled(ReactiveCache.getCurrentSetting());
|
||||
}
|
||||
|
||||
// {{#unless webhooksOff}} in a template.
|
||||
Template.registerHelper('webhooksOff', () => webhooksOff());
|
||||
@@ -1,37 +1,44 @@
|
||||
import { unzipSync } from 'fflate';
|
||||
import { assertSourceSize, readBoundedResponse } from './attachmentPreviewSource.js';
|
||||
// A ZIP attachment's file names in the slideshow, read through HTTP Range
|
||||
// requests: the end of the file for where the central directory is (ZIP64 as
|
||||
// well), then the central directory itself, as far as it is scrolled
|
||||
// (attachmentWindow.js GrowingView). No entry is inflated or downloaded; a
|
||||
// 4 GB archive of a million files costs the screenful of names shown.
|
||||
//
|
||||
// The directory is read by models/lib/zipDirectory.js, which the server's
|
||||
// OpenDocument preview conversion shares.
|
||||
|
||||
export const MAX_ZIP_ENTRIES = 2048;
|
||||
import { RangeReader, GrowingView } from './attachmentWindow.js';
|
||||
import { ZipDirectory } from '../../models/lib/zipDirectory.js';
|
||||
|
||||
export function listZipEntries(bytes) {
|
||||
assertSourceSize(bytes.byteLength);
|
||||
if (bytes.byteLength < 22) throw new Error('Invalid ZIP archive');
|
||||
const entries = [];
|
||||
// fflate's filter reads the central directory. Returning false for EVERY
|
||||
// entry means no payload is inflated, including encrypted or huge entries.
|
||||
unzipSync(bytes, { filter(entry) {
|
||||
if (entries.length >= MAX_ZIP_ENTRIES) throw new RangeError('Too many ZIP entries');
|
||||
entries.push(entry.name);
|
||||
return false;
|
||||
} });
|
||||
return entries;
|
||||
}
|
||||
export { ZipDirectory };
|
||||
|
||||
export async function openZipAttachment({ container, signal, size, url, emptyMessage }) {
|
||||
assertSourceSize(size);
|
||||
const response = await fetch(url, { credentials: 'same-origin', signal });
|
||||
if (!response.ok) throw new Error(`ZIP attachment fetch failed: ${response.status}`);
|
||||
assertSourceSize(Number(response.headers.get('content-length')));
|
||||
const entries = listZipEntries(new Uint8Array(await readBoundedResponse(response)));
|
||||
if (signal.aborted) return;
|
||||
const list = container.ownerDocument.createElement('ul');
|
||||
for (const name of entries) {
|
||||
const item = container.ownerDocument.createElement('li');
|
||||
// Archive paths are inert text: never HTML, links or extraction targets.
|
||||
item.textContent = name;
|
||||
list.appendChild(item);
|
||||
}
|
||||
export async function openZipAttachment({ container, signal, size, url, emptyMessage, fetchImpl, viewportHeight }) {
|
||||
const reader = new RangeReader(url, size, { signal, fetchImpl });
|
||||
await reader.probeSize();
|
||||
const directory = await new ZipDirectory(reader).open();
|
||||
if (signal && signal.aborted) return { destroy() {} };
|
||||
container.replaceChildren();
|
||||
if (entries.length) container.appendChild(list);
|
||||
else container.textContent = emptyMessage;
|
||||
if (!directory.count) {
|
||||
container.textContent = emptyMessage;
|
||||
return { destroy() { container.replaceChildren(); } };
|
||||
}
|
||||
const entries = directory.entries();
|
||||
const doc = container.ownerDocument;
|
||||
const view = new GrowingView(container, {
|
||||
listTag: 'ul',
|
||||
viewportHeight,
|
||||
next: async () => {
|
||||
const rows = [];
|
||||
while (rows.length < 200) {
|
||||
const { value, done } = await entries.next();
|
||||
if (done) break;
|
||||
rows.push(value.name);
|
||||
}
|
||||
return rows.length ? rows : null;
|
||||
},
|
||||
// Archive paths are inert text: never HTML, links or extraction targets.
|
||||
renderRow: name => { const li = doc.createElement('li'); li.textContent = name; return li; },
|
||||
});
|
||||
await view.start();
|
||||
return { view, destroy() { view.destroy(); container.replaceChildren(); } };
|
||||
}
|
||||
@@ -42,6 +42,7 @@ import '/client/components/main/myCards.css';
|
||||
// rules there, which otherwise leave a clicked pagination button black or grey.
|
||||
import '/client/components/main/paginationControls.css';
|
||||
import '/client/components/main/popup.css';
|
||||
import '/client/components/main/featureHelp.css';
|
||||
import '/client/components/main/spinner_bounce.css';
|
||||
import '/client/components/main/spinner_cube.css';
|
||||
import '/client/components/main/spinner_cube_grid.css';
|
||||
|
||||
+32
-4
@@ -206,13 +206,18 @@ function startSandstormAutoOpen() {
|
||||
});
|
||||
}
|
||||
|
||||
// Once a page load: is this the Cloud Panel's domain? Then / opens the panel.
|
||||
// Once a page load: is this the Cloud Panel's domain? Then / opens the panel:
|
||||
// Admin Panel / Cloud for a Cloud Admin, /cloud for a customer. The server
|
||||
// answers `enabled: false` on a WeKan without the CLOUD environment variable,
|
||||
// and nothing changes there.
|
||||
let cloudPanelChecked = false;
|
||||
function maybeOpenCloudPanel() {
|
||||
if (cloudPanelChecked || !Meteor.userId()) return;
|
||||
cloudPanelChecked = true;
|
||||
Meteor.callAsync('cloudPanelWhoAmI').then(info => {
|
||||
if (info && info.onCloudHost && FlowRouter.current().path === '/') FlowRouter.go('/cloud');
|
||||
if (!info || !info.enabled || !info.onCloudHost || FlowRouter.current().path !== '/') return;
|
||||
if (info.isCloudAdmin) FlowRouter.go('/admin/cloud/domains');
|
||||
else if (info.domains && info.domains.length) FlowRouter.go('/cloud');
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
@@ -736,8 +741,10 @@ FlowRouter.route('/billing', {
|
||||
},
|
||||
});
|
||||
|
||||
// Cloud Panel (docs/Features/Admin-Panel/Cloud-Panel.md): answers only on the
|
||||
// panel's own domain; elsewhere the page says so.
|
||||
// Cloud Panel (docs/Features/Admin-Panel/Cloud-Panel.md): answers only where
|
||||
// the server has the CLOUD environment variable, at that address; elsewhere
|
||||
// the page says so. /cloud is the customers' panel - and a Cloud Admin's too,
|
||||
// who has it as Admin Panel / Cloud as well, with the pane in the address.
|
||||
FlowRouter.route('/cloud', {
|
||||
name: 'cloud',
|
||||
triggersEnter: [ensureSignedInUnlessSandstorm],
|
||||
@@ -745,6 +752,27 @@ FlowRouter.route('/cloud', {
|
||||
Filter.reset();
|
||||
EscapeActions.executeUpTo('popup-close');
|
||||
Utils.manageCustomUI();
|
||||
Session.set('cloudOpenPane', null);
|
||||
this.render('defaultLayout', {
|
||||
content: 'cloudPanel',
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
FlowRouter.route('/admin/cloud', {
|
||||
name: 'cloud-admin-home',
|
||||
triggersEnter: [(context, redirect) => redirect('/admin/cloud/domains')],
|
||||
action() {},
|
||||
});
|
||||
|
||||
FlowRouter.route('/admin/cloud/:pane', {
|
||||
name: 'cloud-admin',
|
||||
triggersEnter: [ensureSignedInUnlessSandstorm],
|
||||
action(params) {
|
||||
Filter.reset();
|
||||
EscapeActions.executeUpTo('popup-close');
|
||||
Utils.manageCustomUI();
|
||||
Session.set('cloudOpenPane', (params && params.pane) || 'domains');
|
||||
this.render('defaultLayout', {
|
||||
content: 'cloudPanel',
|
||||
});
|
||||
|
||||
@@ -424,6 +424,14 @@ services:
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Metrics.md
|
||||
#- METRICS_ALLOWED_IP_ADDRESSES=192.168.0.100,192.168.0.200
|
||||
#-----------------------------------------------------------------
|
||||
# ==== ADMIN PANEL ALLOWED IP ADDRESSES ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Admin-Panel/Admin-Panel-Allowed-Addresses.md
|
||||
# The IPv4 and IPv6 addresses and CIDR ranges the Admin Panel and the admin
|
||||
# REST API can be used from. Set here, it wins over Admin Panel / Settings /
|
||||
# Privacy and security. any = no restriction, the way back in after a list
|
||||
# that locked you out. Unset = the Admin Panel list decides.
|
||||
#- ADMIN_PANEL_ALLOWED_IP_ADDRESSES=192.168.0.0/24,2001:db8::/32
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OUTGOING WEBHOOKS ====
|
||||
# What to send to Outgoing Webhook, or leave out. If commented out the default values will be: cardId,listId,oldListId,boardId,comment,user,card,commentId,swimlaneId,customerField,customFieldValue
|
||||
#- WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,board,list,swimlane,commentId
|
||||
@@ -432,7 +440,7 @@ services:
|
||||
#- DEBUG=true
|
||||
#---------------------------------------------
|
||||
# ==== AUTOLOGIN WITH OIDC/OAUTH2 ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/autologin.md
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/autologin.md
|
||||
#- OIDC_REDIRECTION_ENABLED=true
|
||||
# OIDC RP-initiated logout endpoint (end_session_endpoint). When set, the
|
||||
# "Log Out" menu redirects to this endpoint so the identity provider session
|
||||
@@ -524,7 +532,7 @@ services:
|
||||
#- OAUTH2_EMAIL_MAP=email
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OAUTH2 KEYCLOAK ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
#- OAUTH2_ENABLED=true
|
||||
# OAuth2 login style: redirect (default) or popup.
|
||||
#- OAUTH2_LOGIN_STYLE=redirect
|
||||
@@ -982,6 +990,10 @@ services:
|
||||
# WEKAN_RAM_MONITOR : false turns off the memory monitor of this server
|
||||
# (Admin Panel / Problems / Memory usage). Default on.
|
||||
#- WEKAN_RAM_MONITOR=false
|
||||
# CLOUD : The Cloud Admin container's own domain, e.g. cloud.wekan.fi:
|
||||
# only then is there a Cloud Panel (Admin Panel / Cloud), and only at that
|
||||
# address. Empty: none. Never set from the browser.
|
||||
#- CLOUD=cloud.example.com
|
||||
# WEKAN_IMPORT_RUN_STALE_MS : Milliseconds after which an import with no
|
||||
# progress counts as interrupted and can be resumed or discarded (at least
|
||||
# 60000).
|
||||
@@ -990,6 +1002,9 @@ services:
|
||||
# is deleted by the daily sweep, so resolved problems age out; a recurring
|
||||
# problem keeps a recent date and stays. Default 90, 0 = keep forever.
|
||||
#- EVENTLOG_RETENTION_DAYS=90
|
||||
# LOGIN_ADDRESS_RETENTION_DAYS : Days a sign-in address is kept after its last
|
||||
# use, on the account and in the login reports. Default 365; 0 keeps them.
|
||||
#- LOGIN_ADDRESS_RETENTION_DAYS=365
|
||||
#---------------------------------------------------------------
|
||||
# ATTACHMENT RETENTION (models/lib/attachmentRetention.js). Off unless set.
|
||||
# ATTACHMENTS_RETENTION_DAYS : once a night, delete card attachments older
|
||||
|
||||
@@ -426,6 +426,14 @@ services:
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Metrics.md
|
||||
#- METRICS_ALLOWED_IP_ADDRESSES=192.168.0.100,192.168.0.200
|
||||
#-----------------------------------------------------------------
|
||||
# ==== ADMIN PANEL ALLOWED IP ADDRESSES ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Admin-Panel/Admin-Panel-Allowed-Addresses.md
|
||||
# The IPv4 and IPv6 addresses and CIDR ranges the Admin Panel and the admin
|
||||
# REST API can be used from. Set here, it wins over Admin Panel / Settings /
|
||||
# Privacy and security. any = no restriction, the way back in after a list
|
||||
# that locked you out. Unset = the Admin Panel list decides.
|
||||
#- ADMIN_PANEL_ALLOWED_IP_ADDRESSES=192.168.0.0/24,2001:db8::/32
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OUTGOING WEBHOOKS ====
|
||||
# What to send to Outgoing Webhook, or leave out. If commented out the default values will be: cardId,listId,oldListId,boardId,comment,user,card,commentId,swimlaneId,customerField,customFieldValue
|
||||
#- WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,board,list,swimlane,commentId
|
||||
@@ -434,7 +442,7 @@ services:
|
||||
#- DEBUG=true
|
||||
#---------------------------------------------
|
||||
# ==== AUTOLOGIN WITH OIDC/OAUTH2 ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/autologin.md
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/autologin.md
|
||||
#- OIDC_REDIRECTION_ENABLED=true
|
||||
# OIDC RP-initiated logout endpoint (end_session_endpoint). When set, the
|
||||
# "Log Out" menu redirects to this endpoint so the identity provider session
|
||||
@@ -526,7 +534,7 @@ services:
|
||||
#- OAUTH2_EMAIL_MAP=email
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OAUTH2 KEYCLOAK ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
#- OAUTH2_ENABLED=true
|
||||
# OAuth2 login style: redirect (default) or popup.
|
||||
#- OAUTH2_LOGIN_STYLE=redirect
|
||||
@@ -984,6 +992,10 @@ services:
|
||||
# WEKAN_RAM_MONITOR : false turns off the memory monitor of this server
|
||||
# (Admin Panel / Problems / Memory usage). Default on.
|
||||
#- WEKAN_RAM_MONITOR=false
|
||||
# CLOUD : The Cloud Admin container's own domain, e.g. cloud.wekan.fi:
|
||||
# only then is there a Cloud Panel (Admin Panel / Cloud), and only at that
|
||||
# address. Empty: none. Never set from the browser.
|
||||
#- CLOUD=cloud.example.com
|
||||
# WEKAN_IMPORT_RUN_STALE_MS : Milliseconds after which an import with no
|
||||
# progress counts as interrupted and can be resumed or discarded (at least
|
||||
# 60000).
|
||||
@@ -992,6 +1004,9 @@ services:
|
||||
# is deleted by the daily sweep, so resolved problems age out; a recurring
|
||||
# problem keeps a recent date and stays. Default 90, 0 = keep forever.
|
||||
#- EVENTLOG_RETENTION_DAYS=90
|
||||
# LOGIN_ADDRESS_RETENTION_DAYS : Days a sign-in address is kept after its last
|
||||
# use, on the account and in the login reports. Default 365; 0 keeps them.
|
||||
#- LOGIN_ADDRESS_RETENTION_DAYS=365
|
||||
#---------------------------------------------------------------
|
||||
# ATTACHMENT RETENTION (models/lib/attachmentRetention.js). Off unless set.
|
||||
# ATTACHMENTS_RETENTION_DAYS : once a night, delete card attachments older
|
||||
|
||||
@@ -413,6 +413,14 @@ services:
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Metrics.md
|
||||
#- METRICS_ALLOWED_IP_ADDRESSES=192.168.0.100,192.168.0.200
|
||||
#-----------------------------------------------------------------
|
||||
# ==== ADMIN PANEL ALLOWED IP ADDRESSES ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Admin-Panel/Admin-Panel-Allowed-Addresses.md
|
||||
# The IPv4 and IPv6 addresses and CIDR ranges the Admin Panel and the admin
|
||||
# REST API can be used from. Set here, it wins over Admin Panel / Settings /
|
||||
# Privacy and security. any = no restriction, the way back in after a list
|
||||
# that locked you out. Unset = the Admin Panel list decides.
|
||||
#- ADMIN_PANEL_ALLOWED_IP_ADDRESSES=192.168.0.0/24,2001:db8::/32
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OUTGOING WEBHOOKS ====
|
||||
# What to send to Outgoing Webhook, or leave out. If commented out the default values will be: cardId,listId,oldListId,boardId,comment,user,card,commentId,swimlaneId,customerField,customFieldValue
|
||||
#- WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,board,list,swimlane,commentId
|
||||
@@ -421,7 +429,7 @@ services:
|
||||
#- DEBUG=true
|
||||
#---------------------------------------------
|
||||
# ==== AUTOLOGIN WITH OIDC/OAUTH2 ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/autologin.md
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/autologin.md
|
||||
#- OIDC_REDIRECTION_ENABLED=true
|
||||
# OIDC RP-initiated logout endpoint (end_session_endpoint). When set, the
|
||||
# "Log Out" menu redirects to this endpoint so the identity provider session
|
||||
@@ -513,7 +521,7 @@ services:
|
||||
#- OAUTH2_EMAIL_MAP=email
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OAUTH2 KEYCLOAK ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
#- OAUTH2_ENABLED=true
|
||||
# OAuth2 login style: redirect (default) or popup.
|
||||
#- OAUTH2_LOGIN_STYLE=redirect
|
||||
@@ -971,6 +979,10 @@ services:
|
||||
# WEKAN_RAM_MONITOR : false turns off the memory monitor of this server
|
||||
# (Admin Panel / Problems / Memory usage). Default on.
|
||||
#- WEKAN_RAM_MONITOR=false
|
||||
# CLOUD : The Cloud Admin container's own domain, e.g. cloud.wekan.fi:
|
||||
# only then is there a Cloud Panel (Admin Panel / Cloud), and only at that
|
||||
# address. Empty: none. Never set from the browser.
|
||||
#- CLOUD=cloud.example.com
|
||||
# WEKAN_IMPORT_RUN_STALE_MS : Milliseconds after which an import with no
|
||||
# progress counts as interrupted and can be resumed or discarded (at least
|
||||
# 60000).
|
||||
@@ -979,6 +991,9 @@ services:
|
||||
# is deleted by the daily sweep, so resolved problems age out; a recurring
|
||||
# problem keeps a recent date and stays. Default 90, 0 = keep forever.
|
||||
#- EVENTLOG_RETENTION_DAYS=90
|
||||
# LOGIN_ADDRESS_RETENTION_DAYS : Days a sign-in address is kept after its last
|
||||
# use, on the account and in the login reports. Default 365; 0 keeps them.
|
||||
#- LOGIN_ADDRESS_RETENTION_DAYS=365
|
||||
#---------------------------------------------------------------
|
||||
# ATTACHMENT RETENTION (models/lib/attachmentRetention.js). Off unless set.
|
||||
# ATTACHMENTS_RETENTION_DAYS : once a night, delete card attachments older
|
||||
|
||||
@@ -430,6 +430,14 @@ services:
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Metrics.md
|
||||
#- METRICS_ALLOWED_IP_ADDRESSES=192.168.0.100,192.168.0.200
|
||||
#-----------------------------------------------------------------
|
||||
# ==== ADMIN PANEL ALLOWED IP ADDRESSES ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Admin-Panel/Admin-Panel-Allowed-Addresses.md
|
||||
# The IPv4 and IPv6 addresses and CIDR ranges the Admin Panel and the admin
|
||||
# REST API can be used from. Set here, it wins over Admin Panel / Settings /
|
||||
# Privacy and security. any = no restriction, the way back in after a list
|
||||
# that locked you out. Unset = the Admin Panel list decides.
|
||||
#- ADMIN_PANEL_ALLOWED_IP_ADDRESSES=192.168.0.0/24,2001:db8::/32
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OUTGOING WEBHOOKS ====
|
||||
# What to send to Outgoing Webhook, or leave out. If commented out the default values will be: cardId,listId,oldListId,boardId,comment,user,card,commentId,swimlaneId,customerField,customFieldValue
|
||||
#- WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,board,list,swimlane,commentId
|
||||
@@ -438,7 +446,7 @@ services:
|
||||
#- DEBUG=true
|
||||
#---------------------------------------------
|
||||
# ==== AUTOLOGIN WITH OIDC/OAUTH2 ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/autologin.md
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/autologin.md
|
||||
#- OIDC_REDIRECTION_ENABLED=true
|
||||
# OIDC RP-initiated logout endpoint (end_session_endpoint). When set, the
|
||||
# "Log Out" menu redirects to this endpoint so the identity provider session
|
||||
@@ -530,7 +538,7 @@ services:
|
||||
#- OAUTH2_EMAIL_MAP=email
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OAUTH2 KEYCLOAK ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
#- OAUTH2_ENABLED=true
|
||||
# OAuth2 login style: redirect (default) or popup.
|
||||
#- OAUTH2_LOGIN_STYLE=redirect
|
||||
@@ -988,6 +996,10 @@ services:
|
||||
# WEKAN_RAM_MONITOR : false turns off the memory monitor of this server
|
||||
# (Admin Panel / Problems / Memory usage). Default on.
|
||||
#- WEKAN_RAM_MONITOR=false
|
||||
# CLOUD : The Cloud Admin container's own domain, e.g. cloud.wekan.fi:
|
||||
# only then is there a Cloud Panel (Admin Panel / Cloud), and only at that
|
||||
# address. Empty: none. Never set from the browser.
|
||||
#- CLOUD=cloud.example.com
|
||||
# WEKAN_IMPORT_RUN_STALE_MS : Milliseconds after which an import with no
|
||||
# progress counts as interrupted and can be resumed or discarded (at least
|
||||
# 60000).
|
||||
@@ -996,6 +1008,9 @@ services:
|
||||
# is deleted by the daily sweep, so resolved problems age out; a recurring
|
||||
# problem keeps a recent date and stays. Default 90, 0 = keep forever.
|
||||
#- EVENTLOG_RETENTION_DAYS=90
|
||||
# LOGIN_ADDRESS_RETENTION_DAYS : Days a sign-in address is kept after its last
|
||||
# use, on the account and in the login reports. Default 365; 0 keeps them.
|
||||
#- LOGIN_ADDRESS_RETENTION_DAYS=365
|
||||
#---------------------------------------------------------------
|
||||
# ATTACHMENT RETENTION (models/lib/attachmentRetention.js). Off unless set.
|
||||
# ATTACHMENTS_RETENTION_DAYS : once a night, delete card attachments older
|
||||
|
||||
@@ -336,6 +336,14 @@ services:
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Metrics.md
|
||||
#- METRICS_ALLOWED_IP_ADDRESSES=192.168.0.100,192.168.0.200
|
||||
#-----------------------------------------------------------------
|
||||
# ==== ADMIN PANEL ALLOWED IP ADDRESSES ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Admin-Panel/Admin-Panel-Allowed-Addresses.md
|
||||
# The IPv4 and IPv6 addresses and CIDR ranges the Admin Panel and the admin
|
||||
# REST API can be used from. Set here, it wins over Admin Panel / Settings /
|
||||
# Privacy and security. any = no restriction, the way back in after a list
|
||||
# that locked you out. Unset = the Admin Panel list decides.
|
||||
#- ADMIN_PANEL_ALLOWED_IP_ADDRESSES=192.168.0.0/24,2001:db8::/32
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OUTGOING WEBHOOKS ====
|
||||
# What to send to Outgoing Webhook, or leave out. If commented out the default values will be: cardId,listId,oldListId,boardId,comment,user,card,commentId,swimlaneId,customerField,customFieldValue
|
||||
#- WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,board,list,swimlane,commentId
|
||||
@@ -344,7 +352,7 @@ services:
|
||||
#- DEBUG=true
|
||||
#---------------------------------------------
|
||||
# ==== AUTOLOGIN WITH OIDC/OAUTH2 ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/autologin.md
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/autologin.md
|
||||
#- OIDC_REDIRECTION_ENABLED=true
|
||||
# OIDC RP-initiated logout endpoint (end_session_endpoint). When set, the
|
||||
# "Log Out" menu redirects to this endpoint so the identity provider session
|
||||
@@ -436,7 +444,7 @@ services:
|
||||
#- OAUTH2_EMAIL_MAP=email
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OAUTH2 KEYCLOAK ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
#- OAUTH2_ENABLED=true
|
||||
# OAuth2 login style: redirect (default) or popup.
|
||||
#- OAUTH2_LOGIN_STYLE=redirect
|
||||
@@ -894,6 +902,10 @@ services:
|
||||
# WEKAN_RAM_MONITOR : false turns off the memory monitor of this server
|
||||
# (Admin Panel / Problems / Memory usage). Default on.
|
||||
#- WEKAN_RAM_MONITOR=false
|
||||
# CLOUD : The Cloud Admin container's own domain, e.g. cloud.wekan.fi:
|
||||
# only then is there a Cloud Panel (Admin Panel / Cloud), and only at that
|
||||
# address. Empty: none. Never set from the browser.
|
||||
#- CLOUD=cloud.example.com
|
||||
# WEKAN_IMPORT_RUN_STALE_MS : Milliseconds after which an import with no
|
||||
# progress counts as interrupted and can be resumed or discarded (at least
|
||||
# 60000).
|
||||
@@ -902,6 +914,9 @@ services:
|
||||
# is deleted by the daily sweep, so resolved problems age out; a recurring
|
||||
# problem keeps a recent date and stays. Default 90, 0 = keep forever.
|
||||
#- EVENTLOG_RETENTION_DAYS=90
|
||||
# LOGIN_ADDRESS_RETENTION_DAYS : Days a sign-in address is kept after its last
|
||||
# use, on the account and in the login reports. Default 365; 0 keeps them.
|
||||
#- LOGIN_ADDRESS_RETENTION_DAYS=365
|
||||
#---------------------------------------------------------------
|
||||
# ATTACHMENT RETENTION (models/lib/attachmentRetention.js). Off unless set.
|
||||
# ATTACHMENTS_RETENTION_DAYS : once a night, delete card attachments older
|
||||
|
||||
@@ -567,6 +567,14 @@ services:
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Metrics.md
|
||||
#- METRICS_ALLOWED_IP_ADDRESSES=192.168.0.100,192.168.0.200
|
||||
#-----------------------------------------------------------------
|
||||
# ==== ADMIN PANEL ALLOWED IP ADDRESSES ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Admin-Panel/Admin-Panel-Allowed-Addresses.md
|
||||
# The IPv4 and IPv6 addresses and CIDR ranges the Admin Panel and the admin
|
||||
# REST API can be used from. Set here, it wins over Admin Panel / Settings /
|
||||
# Privacy and security. any = no restriction, the way back in after a list
|
||||
# that locked you out. Unset = the Admin Panel list decides.
|
||||
#- ADMIN_PANEL_ALLOWED_IP_ADDRESSES=192.168.0.0/24,2001:db8::/32
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OUTGOING WEBHOOKS ====
|
||||
# What to send to Outgoing Webhook, or leave out. If commented out the default values will be: cardId,listId,oldListId,boardId,comment,user,card,commentId,swimlaneId,customerField,customFieldValue
|
||||
#- WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,board,list,swimlane,commentId
|
||||
@@ -575,7 +583,7 @@ services:
|
||||
#- DEBUG=true
|
||||
#---------------------------------------------
|
||||
# ==== AUTOLOGIN WITH OIDC/OAUTH2 ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/autologin.md
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/autologin.md
|
||||
#- OIDC_REDIRECTION_ENABLED=true
|
||||
# OIDC RP-initiated logout endpoint (end_session_endpoint). When set, the
|
||||
# "Log Out" menu redirects to this endpoint so the identity provider session
|
||||
@@ -667,7 +675,7 @@ services:
|
||||
#- OAUTH2_EMAIL_MAP=email
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OAUTH2 KEYCLOAK ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
#- OAUTH2_ENABLED=true
|
||||
# OAuth2 login style: redirect (default) or popup.
|
||||
#- OAUTH2_LOGIN_STYLE=redirect
|
||||
@@ -1125,6 +1133,10 @@ services:
|
||||
# WEKAN_RAM_MONITOR : false turns off the memory monitor of this server
|
||||
# (Admin Panel / Problems / Memory usage). Default on.
|
||||
#- WEKAN_RAM_MONITOR=false
|
||||
# CLOUD : The Cloud Admin container's own domain, e.g. cloud.wekan.fi:
|
||||
# only then is there a Cloud Panel (Admin Panel / Cloud), and only at that
|
||||
# address. Empty: none. Never set from the browser.
|
||||
#- CLOUD=cloud.example.com
|
||||
# WEKAN_IMPORT_RUN_STALE_MS : Milliseconds after which an import with no
|
||||
# progress counts as interrupted and can be resumed or discarded (at least
|
||||
# 60000).
|
||||
@@ -1133,6 +1145,9 @@ services:
|
||||
# is deleted by the daily sweep, so resolved problems age out; a recurring
|
||||
# problem keeps a recent date and stays. Default 90, 0 = keep forever.
|
||||
#- EVENTLOG_RETENTION_DAYS=90
|
||||
# LOGIN_ADDRESS_RETENTION_DAYS : Days a sign-in address is kept after its last
|
||||
# use, on the account and in the login reports. Default 365; 0 keeps them.
|
||||
#- LOGIN_ADDRESS_RETENTION_DAYS=365
|
||||
#---------------------------------------------------------------
|
||||
# ATTACHMENT RETENTION (models/lib/attachmentRetention.js). Off unless set.
|
||||
# ATTACHMENTS_RETENTION_DAYS : once a night, delete card attachments older
|
||||
|
||||
+17
-2
@@ -411,6 +411,14 @@ services:
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Metrics.md
|
||||
#- METRICS_ALLOWED_IP_ADDRESSES=192.168.0.100,192.168.0.200
|
||||
#-----------------------------------------------------------------
|
||||
# ==== ADMIN PANEL ALLOWED IP ADDRESSES ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Admin-Panel/Admin-Panel-Allowed-Addresses.md
|
||||
# The IPv4 and IPv6 addresses and CIDR ranges the Admin Panel and the admin
|
||||
# REST API can be used from. Set here, it wins over Admin Panel / Settings /
|
||||
# Privacy and security. any = no restriction, the way back in after a list
|
||||
# that locked you out. Unset = the Admin Panel list decides.
|
||||
#- ADMIN_PANEL_ALLOWED_IP_ADDRESSES=192.168.0.0/24,2001:db8::/32
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OUTGOING WEBHOOKS ====
|
||||
# What to send to Outgoing Webhook, or leave out. If commented out the default values will be: cardId,listId,oldListId,boardId,comment,user,card,commentId,swimlaneId,customerField,customFieldValue
|
||||
#- WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,board,list,swimlane,commentId
|
||||
@@ -419,7 +427,7 @@ services:
|
||||
#- DEBUG=true
|
||||
#---------------------------------------------
|
||||
# ==== AUTOLOGIN WITH OIDC/OAUTH2 ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/autologin.md
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/autologin.md
|
||||
#- OIDC_REDIRECTION_ENABLED=true
|
||||
# OIDC RP-initiated logout endpoint (end_session_endpoint). When set, the
|
||||
# "Log Out" menu redirects to this endpoint so the identity provider session
|
||||
@@ -511,7 +519,7 @@ services:
|
||||
#- OAUTH2_EMAIL_MAP=email
|
||||
#-----------------------------------------------------------------
|
||||
# ==== OAUTH2 KEYCLOAK ====
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Login/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
# https://github.com/wekan/wekan/blob/main/docs/Features/Login-Page/Keycloak/Keycloak.md <== MAPPING INFO, REQUIRED
|
||||
#- OAUTH2_ENABLED=true
|
||||
# OAuth2 login style: redirect (default) or popup.
|
||||
#- OAUTH2_LOGIN_STYLE=redirect
|
||||
@@ -969,6 +977,10 @@ services:
|
||||
# WEKAN_RAM_MONITOR : false turns off the memory monitor of this server
|
||||
# (Admin Panel / Problems / Memory usage). Default on.
|
||||
#- WEKAN_RAM_MONITOR=false
|
||||
# CLOUD : The Cloud Admin container's own domain, e.g. cloud.wekan.fi:
|
||||
# only then is there a Cloud Panel (Admin Panel / Cloud), and only at that
|
||||
# address. Empty: none. Never set from the browser.
|
||||
#- CLOUD=cloud.example.com
|
||||
# WEKAN_IMPORT_RUN_STALE_MS : Milliseconds after which an import with no
|
||||
# progress counts as interrupted and can be resumed or discarded (at least
|
||||
# 60000).
|
||||
@@ -977,6 +989,9 @@ services:
|
||||
# is deleted by the daily sweep, so resolved problems age out; a recurring
|
||||
# problem keeps a recent date and stays. Default 90, 0 = keep forever.
|
||||
#- EVENTLOG_RETENTION_DAYS=90
|
||||
# LOGIN_ADDRESS_RETENTION_DAYS : Days a sign-in address is kept after its last
|
||||
# use, on the account and in the login reports. Default 365; 0 keeps them.
|
||||
#- LOGIN_ADDRESS_RETENTION_DAYS=365
|
||||
#---------------------------------------------------------------
|
||||
# ATTACHMENT RETENTION (models/lib/attachmentRetention.js). Off unless set.
|
||||
# ATTACHMENTS_RETENTION_DAYS : once a night, delete card attachments older
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
# Personal-data inventory
|
||||
|
||||
<!-- Generated by releases/compliance/data-inventory.mjs from
|
||||
models/lib/personalDataInventory.js. Do not edit by hand. -->
|
||||
|
||||
Which MongoDB collection holds which personal data, why, for how long, and
|
||||
what happens to it when a person is erased: the inventory of
|
||||
[Compliance](README.md) rows 2.1 and 2.2 (work package WP-3). It is the
|
||||
starting point of a record of processing activities ([GDPR] Art. 30(1)) that
|
||||
the operator of an instance completes: the legal basis column is a hint, the
|
||||
operator decides it, and the recipients depend on what the instance has
|
||||
enabled (mail server, file storage, webhooks, integrations).
|
||||
|
||||
- **185 collections**, 128 of them with personal data.
|
||||
- **Health data** ([GDPR] Art. 9 special category): `workloadAbsences`.
|
||||
- **Financial data**: `billingBudgets`, `billingExpenses`, `billingFees`, `billingInvoices`, `billingProfiles`, `billingQuotes`, `billingRates`, `cloudDomains`, `cloudInvoices`, `shopOrders`, `timeEntries`.
|
||||
- **Not erased yet** (erasure should delete or anonymise, nothing does it today;
|
||||
the work list of WP-4): 40 collections - `activityNotificationIntents`, `activityNotificationPlans`, `activityPubFollowers`, `billingRates`, `board_email_addresses`, `card_comment_reactions`, `cfs.avatars.filerecord`, `checklistItems`, `cloudChatMessages`, `email_bounces`, `eventlog`, `github_import_jobs`, `idleSessions`, `invitation_codes`, `listSyncCredentials`, `listSyncNotificationPlans`, `listSyncRuleEmailCommands`, `listSyncRuleEmailOutcomes`, `loginAddresses`, `notificationEmailCommands`, `notificationEmailControls`, `notificationEmailJobs`, `notificationEmailLeases`, `notificationTrayReceipts`, `notificationWebhookJobs`, `orgUser`, `passkeyChallenges`, `presences`, `recoveryEvents`, `sandstorm_api_grants`, `sessiondata`, `shortPasswordLogins`, `sqrlSessions`, `timeEntries`, `trello_api_credentials`, `trello_export_jobs`, `trello_import_jobs`, `unsaved-edits`, `userPositionHistory`, `windowsSsoTokens`.
|
||||
|
||||
Categories: identity (who a person is), contact (e-mail and other addresses),
|
||||
network (IP addresses, devices), usage (what a person did and when), content
|
||||
(what a person wrote or uploaded), **health**, **financial**, auth (credentials,
|
||||
tokens, keys), none (no personal data). Erasure: delete, anonymize,
|
||||
keep-pseudonymous (kept, linked only by an id) or n/a.
|
||||
|
||||
| Collection | Categories | Subject field | Purpose | Legal basis hint | Retention | Erasure | Where | Notes |
|
||||
|---|---|---|---|---|---|---|---|---|
|
||||
| `accessibilitySettings` | none | - | Admin-written accessibility statement page (title, body, enabled). | n/a | until changed | n/a | defined: `models/accessibilitySettings.js`; erasure: nothing yet | Instance configuration, no per-person fields. |
|
||||
| `accountSettings` | none | - | Instance-wide account switches set in Admin Panel (boolean values by key). | n/a | until changed | n/a | defined: `models/accountSettings.js`; erasure: nothing yet | Global settings keyed by setting name, not by user. |
|
||||
| `actions` | contact, content | - | Board rule actions (what a rule does when its trigger fires). | contract | board lifetime | n/a | defined: `models/actions.js`; retention: `server/models/boards.js`; erasure: nothing yet | Schemaless; a send-email action can hold recipient e-mail addresses and a username action a username typed by a board admin. Not linked to a userId, so not found by user erasure. |
|
||||
| `activities` | usage, content | `userId, memberId` | Board activity feed: who did what to which board, list, card or comment. | legitimate interest | board lifetime | keep-pseudonymous | defined: `models/activities.js`; retention: `server/models/boards.js`; erasure: nothing yet | Kept on user deletion by design (#1289, models/lib/userDeletionCleanup.js header) so history stays readable; no age-based removal (Compliance README 2.7). Rows can embed comment text and attachment names. |
|
||||
| `activityNotificationControls` | none | - | Operator controls (pause/cancel) for activity notification delivery. | n/a | until deleted (no retention) | n/a | defined: `server/notifications/activityPlans.js`; erasure: nothing yet | - |
|
||||
| `activityNotificationIntents` | usage, content | `dispatchUserId` | Captures each activity that still has notifications to deliver. | contract | compacted once delivered or cancelled | delete | defined: `server/notifications/activityIntents.js`; retention: `server/lib/activityNotificationCancellationRetention.js`; erasure: nothing yet | Stores a copy of the activity document (actor id, card/board ids, text) while pending. |
|
||||
| `activityNotificationLeases` | none | - | Renewable writer leases for activity notification delivery. | n/a | until deleted (no retention) | n/a | defined: `server/notifications/activityPlans.js`; erasure: nothing yet | - |
|
||||
| `activityNotificationPlans` | usage, content | `plan.recipients` | Frozen per-activity recipient and message plan for tray/e-mail delivery. | contract | compacted after delivery | delete | defined: `server/notifications/activityPlans.js`; retention: `server/lib/activityNotificationPlanRetention.js`; erasure: nothing yet | Compaction keeps the id and a checksum; recipient user ids remain in uncompacted plans. |
|
||||
| `activityPubFollowers` | identity, network | - | Fediverse actors (actor URL and inbox) that follow a public board. | legitimate interest | until the actor sends Undo Follow | delete | defined: `server/activityPub.js`; retention: `server/activityPub.js`; erasure: nothing yet | Remote people, not WeKan users: no userId link. Rows are removed only by an Undo Follow; not removed with the board. |
|
||||
| `activityPubKeys` | none | - | The instance key pair that signs ActivityPub requests. | n/a | instance lifetime | n/a | defined: `server/activityPub.js`; erasure: nothing yet | Instance secret, no personal data. |
|
||||
| `adminAuditLog` | identity, network, usage | `actorId` | Audit trail of administrator actions: who, when, which method, masked arguments, client IP. | legal obligation | 365 days (fixed AUDIT_KEEP_DAYS) | keep-pseudonymous | defined: `server/adminAudit.js`; retention: `server/adminAudit.js`; erasure: nothing yet | Stores actorUsername and ip besides actorId; args may name the target user. Kept on user deletion as an audit record; nothing pseudonymises actorUsername yet. |
|
||||
| `announcements` | none | - | Admin-written announcement banner shown to signed-in users. | n/a | until changed | n/a | defined: `models/announcements.js`; erasure: nothing yet | Instance configuration. |
|
||||
| `archivedSwimlaneIds` | none | - | Client-only collection that the boardArchivedSwimlaneIds publication fills with the archived swimlane ids of a board. | n/a | not stored (client memory only) | n/a | defined: `models/lib/archivedSwimlaneIds.js`; erasure: nothing yet | Created only on the client (Meteor.isClient); one { _id: boardId, ids } document per board, no person. |
|
||||
| `attachmentBulkMoveStatus` | none | - | Progress of the server-side bulk attachment storage move job. | n/a | until overwritten by the next job | n/a | defined: `models/attachmentBulkMoveStatus.js`; erasure: nothing yet | Singleton job status. |
|
||||
| `attachmentMigrationStatus` | none | - | Progress of the attachment migration job. | n/a | until deleted | n/a | defined: `models/attachmentMigrationStatus.js`; erasure: nothing yet | Job status only. |
|
||||
| `attachments` | content, identity | `userId` | Metadata of files uploaded to cards and boards (Meteor-Files); the file bytes are in the configured storage. | contract | board lifetime; soft-deleted ones purged after the retention period (0 = keep) (ATTACHMENTS_RETENTION_DAYS (Admin Panel / Attachments / Retention)) | keep-pseudonymous | defined: `models/attachments.js`; retention: `server/attachmentRetention.js`; erasure: nothing yet | Uploads stay with the board when the uploader is deleted; file content can itself contain any personal data, including Art. 9 data, which WeKan cannot classify. |
|
||||
| `attachments.chunks` | content | - | GridFS chunks (file bytes) of attachments stored in the database. | contract | as the attachments row (ATTACHMENTS_RETENTION_DAYS (Admin Panel / Attachments / Retention)) | keep-pseudonymous | defined: `models/attachments.server.js`; retention: `server/attachmentRetention.js`; erasure: nothing yet | Removed with the attachment. |
|
||||
| `attachments.files` | content | - | GridFS file records of attachments stored in the database. | contract | as the attachments row (ATTACHMENTS_RETENTION_DAYS (Admin Panel / Attachments / Retention)) | keep-pseudonymous | defined: `models/attachments.server.js`; retention: `server/attachmentRetention.js`; erasure: nothing yet | Linked to a person only through the attachments row; the bytes may contain any personal data. |
|
||||
| `attachmentStorageSettings` | none | - | Where attachments are stored and the upload/download limits. | n/a | until changed | n/a | defined: `models/attachmentStorageSettings.js`; erasure: nothing yet | Instance configuration; may hold storage credentials (secrets, not personal data). |
|
||||
| `avatars` | identity | `userId` | Profile pictures users upload (Meteor-Files). | consent | until replaced or the account is deleted | delete | defined: `models/avatars.js`; erasure: `models/lib/userDeletionCleanup.js` | A photo of a face is personal data; removed with the user. Anonymisation (models/lib/userAnonymization.js) only clears profile.avatarUrl and leaves the uploaded file. |
|
||||
| `avatars.chunks` | identity | - | GridFS chunks (image bytes) of uploaded profile pictures. | consent | as the avatars row | delete | defined: `models/avatars.server.js`; erasure: `models/lib/userDeletionCleanup.js` | A photo of a face; removed with the avatars row. |
|
||||
| `avatars.files` | identity | - | GridFS file records of uploaded profile pictures stored in the database. | consent | as the avatars row | delete | defined: `models/avatars.server.js`; erasure: `models/lib/userDeletionCleanup.js` | Removed when the avatars row is removed on user deletion (the FilesCollection removes the stored file). |
|
||||
| `backupRuns` | usage | `userId` | History of backup runs: trigger, who started it, host, result. | legitimate interest | 400 days (HISTORY_DAYS) | keep-pseudonymous | defined: `server/lib/backupRuns.js`; retention: `server/lib/backupRuns.js`; erasure: nothing yet | userId of the admin who started a manual run, or null. |
|
||||
| `backupSettings` | none | - | Backup schedule set in Admin Panel / Attachments / Backup. | n/a | one row, overwritten | n/a | defined: `server/methods/backup.js`; erasure: nothing yet | Doubtful: schedule document not read field by field. |
|
||||
| `billingBudgets` | **financial** | `createdBy` | A board budget in money and/or hours. | contract | board lifetime | keep-pseudonymous | defined: `models/billing.js`; retention: `server/billing.js`; erasure: nothing yet | FINANCIAL data of the organisation; linked to a person only through createdBy. |
|
||||
| `billingExpenses` | **financial**, content | `userId, createdBy` | Expenses of a board's work (travel, materials, subcontractors). | legal obligation | board lifetime; invoiced ones kept as records after the board is deleted | keep-pseudonymous | defined: `models/billing.js`; retention: `server/billing.js`; erasure: nothing yet | FINANCIAL data; userId names whose expense it was. Invoiced expenses are accounting records (statutory retention is the controller's to decide). |
|
||||
| `billingFees` | **financial** | `createdBy` | Fixed fees to bill on a board. | contract | board lifetime | keep-pseudonymous | defined: `models/billing.js`; retention: `server/billing.js`; erasure: nothing yet | FINANCIAL data. |
|
||||
| `billingInvoices` | **financial**, identity, contact | `lines.userId, createdBy` | Invoices of a board's billable hours, fees and expenses, with customer and payments. | legal obligation | until deleted (kept after the board is deleted: invoices are records) | keep-pseudonymous | defined: `models/billing.js`; retention: `server/billing.js`; erasure: nothing yet | FINANCIAL data; the customer field can name a natural person; lines name the member whose hours were billed. Accounting law usually requires keeping invoices, so erasure must not delete them. |
|
||||
| `billingProfiles` | **financial**, identity, contact | `createdBy` | Who issues a board's invoices: issuer details, VAT ID, payment terms and methods. | contract | board lifetime | keep-pseudonymous | defined: `models/billing.js`; retention: `server/billing.js`; erasure: nothing yet | FINANCIAL data: bank account / payment details, which identify a sole trader issuer. |
|
||||
| `billingQuotes` | **financial**, identity, contact | `createdBy` | Priced quotes for a customer to accept. | contract | until deleted (not removed with the board) | keep-pseudonymous | defined: `models/billing.js`; erasure: nothing yet | FINANCIAL data; customer name, country and VAT ID; issuer snapshot. |
|
||||
| `billingRates` | **financial** | `userId, createdBy` | Hourly rates on a board: a member's own or the board default. | contract | board lifetime | delete | defined: `models/billing.js`; retention: `server/billing.js`; erasure: nothing yet | FINANCIAL data: a member's own hourly rate is personal pay data. Not removed when the member is deleted. |
|
||||
| `board_email_addresses` | contact, auth | `userId` | A member's personal secret e-mail address (token) for sending cards to a board. | contract | until the member makes a new address | delete | defined: `server/emailToCard.js`; retention: `server/emailToCard.js`; erasure: nothing yet | Not removed on user deletion or with the board; an orphaned row is refused on use because the member lost access. |
|
||||
| `boardMovementMatches` | none | - | Client-only publication of card ids matching a movement filter. | n/a | not stored | n/a | defined: `server/publications/boardMovementMatches.js`; erasure: nothing yet | Virtual collection sent by publication.added; nothing in MongoDB. |
|
||||
| `boards` | identity, content | `members.userId, watchers.userId` | Boards with their title, description, members, roles and settings. | contract | until the board is deleted | anonymize | defined: `models/boards.js`; erasure: `models/lib/userDeletionCleanup.js` | Deletion pulls the user from members and watchers; anonymisation keeps the membership pointing at the renamed account. |
|
||||
| `boardTablePages` | content, identity | - | Client-only publication of one page of the board Table view. | contract | not stored | n/a | defined: `server/publications/boardTablePage.js`; erasure: nothing yet | Virtual collection; carries whole card documents (members, assignees) to board members, nothing in MongoDB. |
|
||||
| `boardTextMatches` | content | - | Client-only publication of cards matching a text filter. | contract | not stored | n/a | defined: `server/publications/boardTextMatches.js`; erasure: nothing yet | Virtual collection with card title and description; nothing in MongoDB. |
|
||||
| `bot_runs` | content, usage | - | One row per time a card is handed to a bot, with what the bot runner reported. | legitimate interest | until deleted (no cleanup found) | n/a | defined: `models/botRuns.js`; erasure: nothing yet | Holds the bot's text, questions and the card comments sent to it, which can contain personal data; not keyed by userId. Not removed with the board. |
|
||||
| `caldavLinks` | auth | - | Per-board CalDAV calendar link: URL, username and password for pushing due dates. | contract | until a board admin changes it | n/a | defined: `server/caldavSync.js`; erasure: nothing yet | Board-scoped third-party credentials (stored in plain text), not linked to a WeKan user id. Not removed with the board. |
|
||||
| `caldavState` | none | - | Which card due dates were pushed to the CalDAV calendar. | n/a | until the card loses its due date | n/a | defined: `server/caldavSync.js`; retention: `server/caldavSync.js`; erasure: nothing yet | Card id, board id and due date only. |
|
||||
| `card_comment_reactions` | usage | `reactions.userIds` | Emoji reactions on card comments and who gave them. | contract | board lifetime | anonymize | defined: `models/cardCommentReactions.js`; erasure: nothing yet | The user id should be pulled from reactions.userIds on deletion; nothing does it. |
|
||||
| `card_comments` | content | `userId` | Comments written on cards. | contract | card lifetime | keep-pseudonymous | defined: `models/cardComments.js`; retention: `models/cards.js`; erasure: nothing yet | Kept on user deletion by design (#1289); free text can contain any personal data, @mentions of usernames are not rewritten. |
|
||||
| `card_text_notes` | content | `userId` | Extra markdown text notes on a card. | contract | card lifetime | keep-pseudonymous | defined: `models/cardTextNotes.js`; erasure: nothing yet | Authored content kept like comments. |
|
||||
| `cardDescriptionDocs` | content | - | Collaborative editing document of a card description. | contract | card lifetime | n/a | defined: `server/sharedDescription.js`; retention: `server/sharedDescription.js`; erasure: nothing yet | Removed with the card (Cards.after.remove). |
|
||||
| `cards` | content, identity, usage | `userId, members, assignees, requesters, assigners, watchers, vote, poker` | Cards: title, description, dates, people on the card, time spent, votes and planning poker. | contract | board lifetime | anonymize | defined: `models/cards.js`; retention: `server/models/boards.js`; erasure: `models/lib/userDeletionCleanup.js` | Deletion pulls members/assignees/requesters/assigners/watchers; the creator userId, requestedBy/assignedBy text, vote and poker user lists stay. |
|
||||
| `cfs_gridfs.attachments.chunks` | content | - | Legacy (WeKan before Meteor-Files) GridFS chunks of old attachments, read for migration. | contract | until migrated or deleted | keep-pseudonymous | defined: `models/lib/attachmentBackwardCompatibility.js`; erasure: nothing yet | Present only on databases that started before the Meteor-Files migration. |
|
||||
| `cfs_gridfs.attachments.files` | content | - | Legacy GridFS file metadata of old attachments. | contract | until migrated or deleted | n/a | defined: `models/lib/attachmentBackwardCompatibility.js`; erasure: nothing yet | Linked to a person only through cfs.attachments.filerecord. |
|
||||
| `cfs_gridfs.avatars.chunks` | identity | - | Legacy GridFS chunks of old avatars, read for migration. | contract | until migrated or deleted | n/a | defined: `models/lib/attachmentBackwardCompatibility.js`; erasure: nothing yet | Linked to its user only through cfs.avatars.filerecord, like cfs_gridfs.avatars.files. |
|
||||
| `cfs_gridfs.avatars.files` | identity | - | Legacy GridFS file metadata of old avatars. | contract | until migrated or deleted | n/a | defined: `models/lib/attachmentBackwardCompatibility.js`; erasure: nothing yet | The picture is personal; linked to its user only through cfs.avatars.filerecord. |
|
||||
| `cfs.attachments.filerecord` | content | `userId` | Legacy CollectionFS attachment records, read for migration to Meteor-Files. | contract | until migrated or deleted | keep-pseudonymous | defined: `models/lib/attachmentBackwardCompatibility.js`; erasure: nothing yet | Only on installations upgraded from old WeKan; uploader userId kept like current attachments. |
|
||||
| `cfs.avatars.filerecord` | identity | `userId` | Legacy CollectionFS avatar records, read for migration. | contract | until migrated or deleted | delete | defined: `models/lib/attachmentBackwardCompatibility.js`; erasure: nothing yet | Profile pictures of the user; the deletion plan removes only current Avatars, not these legacy rows. |
|
||||
| `changeHistory` | usage, content | `userId, restoredByUserId` | Append-only, hash-chained change history with previous and new content for undo and audit. | legitimate interest | board lifetime | keep-pseudonymous | defined: `models/changeHistory.js`; erasure: nothing yet | Rows cannot be deleted without breaking the hash chain (server/lib/historyChainAppend.js); previousContent/newContent can hold any card text. |
|
||||
| `checklistItems` | content | `assigneeId` | Items of card checklists. | contract | card lifetime | anonymize | defined: `models/checklistItems.js`; retention: `models/cards.js`; erasure: nothing yet | assigneeId should be cleared when the assignee is deleted; nothing does it. |
|
||||
| `checklists` | content | - | Checklists on cards. | contract | card lifetime | n/a | defined: `models/checklists.js`; retention: `models/cards.js`; erasure: nothing yet | Titles only; not linked to a person. |
|
||||
| `cloudChatMessages` | content, identity | `userId` | Legacy Cloud Panel chat between a hosting customer and Cloud Admins (migrated to the support board). | contract | until the customer domain is deleted | delete | defined: `models/cloudPanel.js`; retention: `server/cloudPanel.js`; erasure: nothing yet | authorName and text identify the customer; not removed on user deletion. |
|
||||
| `cloudDomains` | identity, contact, **financial** | `customerUsernames` | Hosting customer domains with customer name, e-mail, billing e-mail and contract dates. | contract | until the Cloud Admin deletes the domain | keep-pseudonymous | defined: `models/cloudPanel.js`; retention: `server/cloudPanel.js`; erasure: nothing yet | FINANCIAL: customer contact and billing data of a cloud customer; also holds database credentials (secret). Contract data, deleted by a Cloud Admin, not by user erasure. |
|
||||
| `cloudInvoices` | **financial** | `createdBy` | Hosting invoices of a customer domain. | legal obligation | until a Cloud Admin deletes the invoice | keep-pseudonymous | defined: `models/cloudPanel.js`; retention: `server/cloudPanel.js`; erasure: nothing yet | FINANCIAL data; accounting records. |
|
||||
| `cloudSettings` | network | - | Cloud Panel configuration: Cloudflare, Caddy and the addresses Cloud Admins may sign in from. | legitimate interest | until changed | n/a | defined: `models/cloudPanel.js`; erasure: nothing yet | allowedAddresses can be an admin's home IP address; holds API tokens (secrets). |
|
||||
| `continuousBackupLease` | none | - | Lease so only one server runs continuous backup. | n/a | one row, overwritten | n/a | defined: `server/continuousBackup.js`; erasure: nothing yet | - |
|
||||
| `continuousBackupSettings` | auth | `updatedBy` | Continuous backup target settings saved by a site administrator. | legitimate interest | one row, overwritten | keep-pseudonymous | defined: `server/continuousBackup.js`; erasure: nothing yet | May hold storage credentials; updatedBy is the admin user id only. |
|
||||
| `counters` | none | - | Named sequence counters (e.g. card numbers). | n/a | permanent | n/a | defined: `models/counters.js`; erasure: nothing yet | - |
|
||||
| `cronJobs` | none | - | synced-cron run log of scheduled jobs. | n/a | 2 days (collectionTTL 172800 s) | n/a | defined: `server/cron/syncedCron.js`; retention: `server/cron/syncedCron.js`; erasure: nothing yet | Job names and times only. |
|
||||
| `customBoardRoles` | none | - | Custom board roles and their capabilities. | n/a | until deleted | n/a | defined: `models/customBoardRoles.js`; erasure: nothing yet | Role definitions; assignments live in boards.members. |
|
||||
| `customFields` | none | - | Custom field definitions of boards. | n/a | board lifetime | n/a | defined: `models/customFields.js`; erasure: nothing yet | Definitions only; the values are on cards. |
|
||||
| `dataHealth` | identity | - | Last nightly data-health scan result and repair claims. | legitimate interest | replaced by the next scan | keep-pseudonymous | defined: `server/lib/dataHealthScan.js`; retention: `server/lib/dataHealthScan.js`; erasure: nothing yet | Findings list document ids, including user ids (for example user-duplicate-email); no names or addresses. |
|
||||
| `documentPreviews` | content | - | Plain text extracted from attachments, for searching attachment contents. | contract | attachment lifetime | n/a | defined: `server/lib/documentGif.js`; retention: `server/lib/documentGif.js`; erasure: nothing yet | Follows the attachment (replaced on re-index); may contain any personal data written in the document. |
|
||||
| `email_bounces` | contact, usage | `email` | One row per e-mail address that bounced or complained, with counts and recent events, to stop mailing it. | legitimate interest | until an administrator clears the address | delete | defined: `server/emailBounces.js`; retention: `server/emailBounces.js`; erasure: nothing yet | Keyed by e-mail address, not user id; the history holds diagnostic text from the receiving mail server. |
|
||||
| `email_to_card_received` | none | - | Message-IDs already turned into cards, so a retried delivery does not make a second card. | n/a | 30 days (TTL on at) | n/a | defined: `server/emailToCard.js`; retention: `server/emailToCard.js`; erasure: nothing yet | Message key and time only. |
|
||||
| `eventlog` | identity, network, usage | `userId, username, actors` | Admin Panel / Problems: security, speed and test events, one accumulating row per kind of problem. | legitimate interest | 90 days (EVENTLOG_RETENTION_DAYS) | anonymize | defined: `models/eventLog.js`; retention: `models/eventLog.js`; erasure: nothing yet | Holds the most recent username, IP address and geolocation plus a capped per-username and per-address tally (actors); nothing removes a deleted user from it before the retention sweep. |
|
||||
| `eventlogAcks` | none | - | When each Problems stream was last acknowledged. | n/a | until deleted | n/a | defined: `models/eventLog.js`; erasure: nothing yet | Only { stream, at }. |
|
||||
| `fileIntegrity` | none | - | Filesystem storage baseline: name, size, digests and signature of each stored file. | n/a | while the file exists | n/a | defined: `models/fileIntegrity.js`; erasure: nothing yet | File names may echo what a user uploaded, but no row is linked to a person. |
|
||||
| `fileIntegrityKeys` | none | - | Signing key and scan bookkeeping for the file integrity baseline. | n/a | until deleted | n/a | defined: `models/fileIntegrity.js`; erasure: nothing yet | Instance secret, not personal data. |
|
||||
| `github_import_jobs` | usage | `userId` | Progress, results and error log of a background GitHub organization import. | contract | until the owner deletes the job | delete | defined: `models/githubImportJobs.js`; retention: `server/githubOrgImport.js`; erasure: nothing yet | The GitHub token is never stored here. |
|
||||
| `historyChainHeads` | none | - | Head hash of each board's hash-chained change history. | n/a | board lifetime | n/a | defined: `server/lib/storedHistoryChain.js`; erasure: nothing yet | - |
|
||||
| `historyIntegrityReported` | none | - | Which broken change-history rows the integrity audit already reported. | n/a | until deleted | n/a | defined: `server/lib/historyIntegrityScan.js`; erasure: nothing yet | Row id, reason and time only. |
|
||||
| `historyWriterGates` | none | - | Which boards are migrated to the coordinated history append path. | n/a | board lifetime | n/a | defined: `server/lib/storedHistoryChain.js`; erasure: nothing yet | - |
|
||||
| `historyWriterLeases` | none | - | Leases of legacy history writer tokens. | n/a | until released or taken over | n/a | defined: `server/lib/storedHistoryChain.js`; erasure: nothing yet | - |
|
||||
| `idleSessions` | usage, auth | `userId` | Last activity time per login token, for signing out idle sessions. | legitimate interest | until the session is idle-signed-out (LOGOUT_IDLE_MINUTES) | delete | defined: `server/idleLogout.js`; retention: `server/idleLogout.js`; erasure: nothing yet | _id is the hashed login token. Rows of a deleted user stay until the idle sweep removes them (only when idle logout is enabled). |
|
||||
| `impersonatedUsers` | usage | `adminId, userId` | Audit record of an administrator impersonating a user or downloading their attachment. | legitimate interest | until deleted | keep-pseudonymous | defined: `models/impersonatedUsers.js`; erasure: nothing yet | No age-based removal yet (README 2.5 proposes ADMIN_AUDIT_RETENTION_DAYS for it). Holds a free-text reason. |
|
||||
| `importRuns` | usage | `userId` | Progress and outcome of board imports, so an administrator can keep or discard an interrupted one. | legitimate interest | until deleted | keep-pseudonymous | defined: `server/importRuns.js`; erasure: nothing yet | No age-based removal found. The discard detail text names the administrator's username. |
|
||||
| `inbound_mail_state` | none | - | Per IMAP mailbox poll lease, UIDVALIDITY and last UID read. | n/a | one row per configured mailbox | n/a | defined: `server/lib/imapInbound.js`; erasure: nothing yet | lastError may echo a mail server message; the mailbox credentials live in settings. |
|
||||
| `integrations` | auth, content | `userId` | Outgoing webhooks of a board (URL, token, events). | contract | board lifetime | keep-pseudonymous | defined: `models/integrations.js`; erasure: nothing yet | userId is the creator; the token and URL are credentials of the receiving service. |
|
||||
| `invitation_codes` | contact | `email, authorId` | Registration invitations sent by e-mail. | legitimate interest | until used (then valid: false, kept) or removed by an admin or a bounce | delete | defined: `models/invitationCodes.js`; retention: `server/models/settings.js`; erasure: nothing yet | Holds the invitee e-mail address; a used code is only invalidated, not removed. server/emailBounces.js removes valid codes of a bouncing address. |
|
||||
| `inviteToBoardRolesSettings` | none | - | Which board roles may invite members. | n/a | until deleted | n/a | defined: `models/inviteToBoardRolesSettings.js`; erasure: nothing yet | - |
|
||||
| `lists` | content, usage | `watchers` | Lists of a board. | contract | board lifetime | delete | defined: `models/lists.js`; erasure: `models/lib/userDeletionCleanup.js` | The deleted user is pulled from watchers; titles are board content. |
|
||||
| `listSyncCredentials` | auth | `runAsUserId` | Server-only credentials (token, remote username) of a synced list. | contract | list lifetime | delete | defined: `models/listSyncCredentials.js`; erasure: nothing yet | Never published. runAsUserId names the WeKan account the sync acts as; nothing removes it when that account is deleted. |
|
||||
| `listSyncLeases` | none | - | Leases so only one server syncs a list at a time. | n/a | until released or taken over | n/a | defined: `server/lib/listSyncLease.js`; erasure: nothing yet | No provider URLs or credentials. |
|
||||
| `listSyncNotificationPlans` | usage, content | `plan.recipients.userId` | Frozen notification recipients and message for a Sync-applied change. | contract | compacted 90 days after completion (SYNC_RECEIPT_METADATA_DAYS) | delete | defined: `server/notifications/storedDelivery.js`; retention: `server/lib/syncNotificationRetention.js`; erasure: nothing yet | Compacted after delivery plus the retention period. |
|
||||
| `listSyncNotificationReceipts` | none | - | Delivery-confirmed receipts for Sync notification plans. | n/a | until deleted (no retention) | n/a | defined: `server/notifications/storedDelivery.js`; erasure: nothing yet | Minimal ids and completion time; kept for good. |
|
||||
| `listSyncOperationCompletions` | none | - | Immutable completion receipts of list-sync operations. | n/a | until deleted (no TTL by design) | n/a | defined: `server/lib/listSyncOperations.js`; erasure: nothing yet | - |
|
||||
| `listSyncOperationDiscards` | usage | `operator` | Audit record of each stuck list-sync operation an administrator discarded. | legitimate interest | until deleted (no TTL by design) | keep-pseudonymous | defined: `server/lib/listSyncOperations.js`; erasure: nothing yet | Names the deciding administrator (operator) and decidedAt. |
|
||||
| `listSyncOperationIntents` | usage | `actorId` | Durable intents of list-sync runs, with the user who started them. | contract | until deleted (no TTL by design) | keep-pseudonymous | defined: `server/lib/listSyncOperations.js`; erasure: nothing yet | User id only. |
|
||||
| `listSyncOperations` | usage | `actorId` | The current durable list-sync operation per list. | contract | until completed or discarded | keep-pseudonymous | defined: `server/lib/listSyncOperations.js`; erasure: nothing yet | User id only. |
|
||||
| `listSyncOperationSteps` | content | - | Planned steps of a list-sync operation, kept for crash recovery. | contract | until deleted (no TTL by design) | n/a | defined: `server/lib/listSyncOperations.js`; erasure: nothing yet | May carry synced card fields. |
|
||||
| `listSyncRuleAddSwimlaneCommands` | usage, content | `actorId` | Durable, replay-safe journal of a Sync rule add-swimlane action. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Keeps the acting user id and the card/list data the action wrote, like activities; no retention sweep. |
|
||||
| `listSyncRuleArchiveCommands` | usage, content | `actorId` | Durable journal of a Sync rule archive action (up to 1000 cards). | legitimate interest | compacted 90 days after completion (SYNC_RECEIPT_METADATA_DAYS) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; retention: `server/lib/syncRuleArchiveRetention.js`; erasure: nothing yet | Card titles and placement until compacted in place. |
|
||||
| `listSyncRuleArchiveCompletions` | none | - | Archive command completion receipts with their time. | n/a | until deleted (no retention) | n/a | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Kept for good. |
|
||||
| `listSyncRuleArchiveEffects` | usage, content | `actorId` | History and activity content written by a rule archive command. | legitimate interest | compacted 90 days after completion (SYNC_RECEIPT_METADATA_DAYS) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; retention: `server/lib/syncRuleArchiveRetention.js`; erasure: nothing yet | Removed 90 days after the archive run finished. |
|
||||
| `listSyncRuleArchiveReceipts` | none | - | Per-card receipts of a rule archive command. | n/a | until deleted (no retention) | n/a | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Minimal ids; kept for good. |
|
||||
| `listSyncRuleCardCommands` | usage, content | `actorId` | Durable, replay-safe journal of a Sync rule card field (members, assignees, labels, dates) action. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Keeps the acting user id and the card/list data the action wrote, like activities; no retention sweep. |
|
||||
| `listSyncRuleChecklistCommands` | usage, content | `actorId` | Durable, replay-safe journal of a Sync rule checklist item action. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Keeps the acting user id and the card/list data the action wrote, like activities; no retention sweep. |
|
||||
| `listSyncRuleChecklistLifecycleCommands` | usage, content | `actorId` | Durable, replay-safe journal of a Sync rule checklist add/remove action. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Keeps the acting user id and the card/list data the action wrote, like activities; no retention sweep. |
|
||||
| `listSyncRuleCompletions` | none | - | Plan completion receipts with their time. | n/a | until deleted (no retention) | n/a | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Kept for good. |
|
||||
| `listSyncRuleCopyCardCommands` | usage, content | `actorId` | Durable, replay-safe journal of a Sync rule copy-card action. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Keeps the acting user id and the card/list data the action wrote, like activities; no retention sweep. |
|
||||
| `listSyncRuleCreateCardCommands` | usage, content | `actorId` | Durable, replay-safe journal of a Sync rule create-card action. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Keeps the acting user id and the card/list data the action wrote, like activities; no retention sweep. |
|
||||
| `listSyncRuleEmailAttempts` | none | - | State of each send attempt of a rule e-mail command. | legitimate interest | until deleted (no retention) | n/a | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Already minimal metadata (ids, state, times); kept as is by the retention pass. |
|
||||
| `listSyncRuleEmailCommands` | contact, content | `actorId` | Durable copy of a rule e-mail (recipients, body, attachments up to 12 MB). | legitimate interest | compacted 90 days after completion (SYNC_RECEIPT_METADATA_DAYS) | delete | defined: `server/notifications/storedRulePlans.js`; retention: `server/lib/syncRuleEmailRetention.js`; erasure: nothing yet | Compacted in place to ids and checksum 90 days after the attempt is terminal. |
|
||||
| `listSyncRuleEmailOutcomes` | contact | - | Recipient addresses of a rule e-mail attempt, for the unconfirmed-recipient review. | legitimate interest | compacted 90 days after completion (SYNC_RECEIPT_METADATA_DAYS) | delete | defined: `server/notifications/storedRulePlans.js`; retention: `server/lib/syncRuleEmailRetention.js`; erasure: nothing yet | Removed when the command is compacted; addressed by e-mail, not user id. |
|
||||
| `listSyncRuleEmailResolutions` | contact, usage | `actorId` | Who accepted a partially accepted rule e-mail attempt, and for which addresses. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Addresses only, no SMTP text; not covered by the e-mail retention pass. |
|
||||
| `listSyncRuleLinkCardCommands` | usage, content | `actorId` | Durable, replay-safe journal of a Sync rule link-card action. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Keeps the acting user id and the card/list data the action wrote, like activities; no retention sweep. |
|
||||
| `listSyncRuleListSkips` | usage | `actorId` | Records a rule action skipped because the target list refuses the actor's role. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Decision record for replay; no retention. |
|
||||
| `listSyncRuleMoveAllBoardCommands` | usage, content | `actorId` | Durable, replay-safe journal of a Sync rule move-all-cards-to-board action. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Keeps the acting user id and the card/list data the action wrote, like activities; no retention sweep. |
|
||||
| `listSyncRuleMoveAllCommands` | usage, content | `actorId` | Durable, replay-safe journal of a Sync rule move-all-cards action. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Keeps the acting user id and the card/list data the action wrote, like activities; no retention sweep. |
|
||||
| `listSyncRuleMoveBoardCommands` | usage, content | `actorId` | Durable, replay-safe journal of a Sync rule move-card-to-board action. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Keeps the acting user id and the card/list data the action wrote, like activities; no retention sweep. |
|
||||
| `listSyncRuleMoveCommands` | usage, content | `actorId` | Durable, replay-safe journal of a Sync rule move-card action. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Keeps the acting user id and the card/list data the action wrote, like activities; no retention sweep. |
|
||||
| `listSyncRulePlans` | usage, content, contact | `actorId` | Frozen rules and actions matched by a Sync-applied activity. | legitimate interest | compacted 90 days after completion (SYNC_RECEIPT_METADATA_DAYS) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; retention: `server/lib/syncRuleRetention.js`; erasure: nothing yet | Whole rule/action documents, including an e-mail action's recipients and text, until compacted. |
|
||||
| `listSyncRuleReceipts` | none | - | Per-action completion receipts of rule invocations. | n/a | until deleted (no retention) | n/a | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Minimal ids; kept for good. |
|
||||
| `listSyncRuleSortListCommands` | usage, content | `actorId` | Durable, replay-safe journal of a Sync rule sort-list action. | legitimate interest | until deleted (no retention) | keep-pseudonymous | defined: `server/notifications/storedRulePlans.js`; erasure: nothing yet | Keeps the acting user id and the card/list data the action wrote, like activities; no retention sweep. |
|
||||
| `listSyncRunReports` | none | - | Status reports of list-sync runs for Admin Panel. | n/a | 30 days (TTL on startedAt) | n/a | defined: `server/lib/listSyncRunReports.js`; retention: `server/lib/listSyncRunReports.js`; erasure: nothing yet | Doubtful: not every report field was read; assumed list/board ids, status and counts. |
|
||||
| `listSyncTargets` | none | - | Durable mapping from a synced source item to the card it replaced. | n/a | until deleted | n/a | defined: `server/lib/listSyncTargets.js`; erasure: nothing yet | No tokens. |
|
||||
| `listSyncWebhookCommentPlans` | content | `userId` | Comment text a two-way webhook reply asks WeKan to post. | legitimate interest | compacted 90 days after completion (SYNC_RECEIPT_METADATA_DAYS) | keep-pseudonymous | defined: `server/notifications/storedWebhooks.js`; retention: `server/lib/syncWebhookRetention.js`; erasure: nothing yet | Removed 90 days after the plan completed. |
|
||||
| `listSyncWebhookCommentReceipts` | none | - | Receipts that a webhook reply comment was written. | n/a | until deleted (no retention) | n/a | defined: `server/notifications/storedWebhooks.js`; erasure: nothing yet | Minimal; kept for good. |
|
||||
| `listSyncWebhookCompletions` | none | - | Webhook plan completion receipts with their time. | n/a | until deleted (no retention) | n/a | defined: `server/notifications/storedWebhooks.js`; erasure: nothing yet | Kept for good. |
|
||||
| `listSyncWebhookPlans` | content, auth | - | Frozen webhook targets (URL, X-Wekan-Token) and request body of a Sync change. | legitimate interest | compacted 90 days after completion (SYNC_RECEIPT_METADATA_DAYS) | n/a | defined: `server/notifications/storedWebhooks.js`; retention: `server/lib/syncWebhookRetention.js`; erasure: nothing yet | Body contains activity payload with user names until compacted; holds an endpoint credential. |
|
||||
| `listSyncWebhookReceipts` | none | - | Per-target webhook delivery receipts. | n/a | until deleted (no retention) | n/a | defined: `server/notifications/storedWebhooks.js`; erasure: nothing yet | Minimal; kept for good. |
|
||||
| `listSyncWebhookResponses` | content | - | The receiver's reply to a Sync webhook delivery. | legitimate interest | compacted 90 days after completion (SYNC_RECEIPT_METADATA_DAYS) | n/a | defined: `server/notifications/storedWebhooks.js`; retention: `server/lib/syncWebhookRetention.js`; erasure: nothing yet | Removed 90 days after the plan completed; may contain whatever the receiver returns. |
|
||||
| `lockoutSettings` | none | - | Brute-force lockout thresholds. | n/a | until deleted | n/a | defined: `models/lockoutSettings.js`; erasure: nothing yet | - |
|
||||
| `loginAddresses` | network, identity, usage | `users (per-account tally)` | One row per address people log in from, with who uses it and how often. | legitimate interest | 365 days (LOGIN_ADDRESS_RETENTION_DAYS) | delete | defined: `models/loginAddresses.js`; retention: `server/lib/loginAddressRetention.js`; erasure: nothing yet | IP address, geolocation and per-account counts; a deleted user stays in users until the retention sweep. |
|
||||
| `meteor_accounts_loginServiceConfiguration` | none | - | OAuth / OIDC client ids and secrets of the instance (accounts-base ServiceConfiguration). | n/a | until the provider is removed | n/a | defined: `server/lib/oauthProviders.js`; erasure: nothing yet | Instance credentials, not data about a person; a secret, so never exported with personal data. |
|
||||
| `migrations` | none | - | Which data migrations have run. | n/a | instance lifetime | n/a | defined: `server/migrations/ensureValidSwimlaneIds.js`; erasure: nothing yet | - |
|
||||
| `notificationEmailCommands` | usage | `userId` | Replay-safe record of admin cancel/resume commands on a user's e-mail queue. | legitimate interest | compacted after 30 days (EMAIL_RECEIPT_METADATA_DAYS) | delete | defined: `server/notifications/emailQueue.js`; retention: `server/lib/emailReceiptRetention.js`; erasure: nothing yet | Holds the target userId and the acting admin's actorId. |
|
||||
| `notificationEmailControls` | usage | `_id` | Per-user e-mail queue control (cancelBefore cutoff, generation). | legitimate interest | until deleted (no retention) | delete | defined: `server/notifications/emailQueue.js`; erasure: nothing yet | Document _id is the userId; no personal content beyond that. |
|
||||
| `notificationEmailJobs` | contact, content, usage | `userId` | Durable outbox of notification e-mails, one job per recipient and event. | contract | body removed when sent/cancelled; metadata compacted after 30 days (EMAIL_RECEIPT_METADATA_DAYS) | delete | defined: `server/notifications/emailQueue.js`; retention: `server/lib/emailReceiptRetention.js`; erasure: nothing yet | Pending jobs hold the rendered subject and HTML (card titles, comments, names); the payload is $unset on send (server/lib/emailOutbox.js). |
|
||||
| `notificationEmailLeases` | usage | `_id` | Per-recipient lease so one server drains a user's e-mail queue at a time. | legitimate interest | lease expiry (short-lived) | delete | defined: `server/notifications/emailQueue.js`; erasure: nothing yet | Keyed by userId; holds no content. |
|
||||
| `notificationEmailSendSlots` | none | - | Global SMTP send-rate slots. | n/a | until deleted (no retention) | n/a | defined: `server/notifications/emailQueue.js`; erasure: nothing yet | - |
|
||||
| `notificationTrayReceipts` | usage | `userId` | Permanent receipt that an activity was delivered to a user's notification tray. | contract | until deleted (no retention) | delete | defined: `server/notifications/trayQueue.js`; erasure: nothing yet | Deliberately no TTL (prevents re-appearance after dismissal); { userId, activityId } only. |
|
||||
| `notificationWebhookJobs` | content, identity | - | Durable queue of grouped or scheduled outgoing webhook bodies. | legitimate interest | body removed when sent/cancelled; row kept | delete | defined: `server/notifications/webhookQueue.js`; retention: `server/lib/webhookOutbox.js`; erasure: nothing yet | Pending bodies carry the activity payload (user names, card text); no user id field to select by, so erasure would need to match the body. |
|
||||
| `notificationWebhookLeases` | none | - | Per-webhook delivery leases. | n/a | until deleted (no retention) | n/a | defined: `server/notifications/webhookQueue.js`; erasure: nothing yet | - |
|
||||
| `org` | none | - | Organizations: name, domains, branding, legal notice URL. | n/a | until deleted | n/a | defined: `models/org.js`; erasure: nothing yet | Organization data; membership is on users.orgs and orgUser. |
|
||||
| `orgUser` | identity | `userId` | Membership and role of a user in an organization. | contract | until deleted | delete | defined: `models/orgUser.js`; erasure: nothing yet | - |
|
||||
| `passkeyChallenges` | auth | `userId` | Short-lived WebAuthn challenges for passkey registration and sign-in. | contract | TTL at expiresAt | delete | defined: `server/passkeys.js`; retention: `server/passkeys.js`; erasure: nothing yet | Expires by TTL (and is removed when used); no deletion hook needed in practice. |
|
||||
| `positionHistory` | content | - | Original position and title of swimlanes, lists and cards, for restoring order. | contract | board lifetime | n/a | defined: `models/positionHistory.js`; erasure: nothing yet | No user field. |
|
||||
| `presences` | usage | `userId` | Online status shown on avatars. | legitimate interest | until deleted | delete | defined: `models/presences.js`; erasure: nothing yet | Read by client/components/users/userAvatar.js; no writer found in the current code (legacy presence package). |
|
||||
| `recoveryEvents` | identity, network, usage | `userId, username` | Record of data recovery, permanent deletion and remediation events. | legitimate interest | until deleted | anonymize | defined: `models/recoveryEvents.js`; erasure: nothing yet | Holds username and location of who acted; may hold deletedData (content). |
|
||||
| `recoveryStatus` | none | - | Maintenance spinner flag while a recovery runs. | n/a | single document | n/a | defined: `models/recoveryStatus.js`; erasure: nothing yet | - |
|
||||
| `rules` | content | - | Board automation rules linking a trigger to an action. | contract | board lifetime | n/a | defined: `models/rules.js`; erasure: nothing yet | Configuration; no user field. |
|
||||
| `sandstorm_api_grants` | auth | `userId` | Sandstorm Powerbox capabilities granted for webhooks, list sync and a user's external services. | contract | until revoked | delete | defined: `server/sandstormEgress.js`; retention: `server/sandstormEgress.js`; erasure: nothing yet | Per-user grants (userId, service) are kept after user deletion; webhook/sync grants have no user. |
|
||||
| `savedCardFilters` | usage | `ownerId` | Card filter presets a member saved on a board. | contract | until deleted by the member, or with the board | delete | defined: `server/filterPresets.js`; retention: `server/filterPresets.js`; erasure: `server/filterPresets.js` | Meteor.users.after.remove deletes by ownerId; Boards.after.remove deletes by boardId. |
|
||||
| `scrumBatchJobs` | usage | `userId` | Background undo/redo job of a large Scrum History batch, one per board. | contract | until the job finishes | keep-pseudonymous | defined: `server/lib/scrumBatchJobs.js`; retention: `server/lib/scrumBatchJobs.js`; erasure: nothing yet | Short-lived; user id only. |
|
||||
| `scrumDailySnapshots` | content | - | Daily sprint report observations (burndown). | contract | board lifetime | n/a | defined: `models/scrumDailySnapshots.js`; retention: `server/scrumDailySnapshots.js`; erasure: nothing yet | Removed with the board. |
|
||||
| `scrumEvents` | content | `createdBy, updatedBy` | Scrum events (meetings) of a board. | contract | board lifetime | keep-pseudonymous | defined: `models/scrumEvents.js`; erasure: nothing yet | - |
|
||||
| `scrumHistoryCompletions` | none | - | Evidence that a Scrum History restore row completed. | n/a | until deleted (no TTL by design) | n/a | defined: `server/lib/scrumHistoryPending.js`; erasure: nothing yet | - |
|
||||
| `scrumHistoryPending` | none | - | Recovery checkpoint of an in-progress Scrum History restore, one per board. | n/a | until the restore finishes | n/a | defined: `server/lib/scrumHistoryPending.js`; erasure: nothing yet | Doubtful: may hold the requesting user id. |
|
||||
| `scrumHistoryRequests` | usage | `userId` | Idempotency records of Scrum History undo/redo requests per user. | contract | until deleted | keep-pseudonymous | defined: `server/lib/scrumHistoryPending.js`; erasure: nothing yet | User id only. |
|
||||
| `scrumImportPending` | content | - | Recovery checkpoint of a Scrum import, one per destination board. | contract | board lifetime | n/a | defined: `server/lib/scrumImportJournal.js`; retention: `server/lib/scrumImportJournal.js`; erasure: nothing yet | Removed with the board. |
|
||||
| `scrumImportSteps` | content | - | Per-document recovery data of a Scrum import. | contract | board lifetime | n/a | defined: `server/lib/scrumImportJournal.js`; retention: `server/lib/scrumImportJournal.js`; erasure: nothing yet | Removed with the board. |
|
||||
| `scrumReleases` | content | `createdBy, updatedBy` | Scrum releases of a board. | contract | board lifetime | keep-pseudonymous | defined: `models/scrumReleases.js`; erasure: nothing yet | - |
|
||||
| `scrumRolloverRows` | content | - | Chunks of a sprint close rollover plan: card Scrum metadata before and after. | contract | until the rollover is applied, or with the board | n/a | defined: `server/lib/scrumRolloverStore.js`; retention: `server/lib/scrumRolloverStore.js`; erasure: nothing yet | Scrum metadata may carry long texts. |
|
||||
| `scrumSnapshotRows` | content | - | Sprint start, close and daily snapshot rows. | contract | board lifetime | n/a | defined: `server/lib/scrumSnapshotStore.js`; retention: `server/lib/scrumSnapshotStore.js`; erasure: nothing yet | Doubtful: card rows may include assignee ids. |
|
||||
| `scrumSprints` | content | `createdBy, updatedBy` | Scrum sprints of a board. | contract | board lifetime | keep-pseudonymous | defined: `models/scrumSprints.js`; erasure: nothing yet | - |
|
||||
| `sessiondata` | usage | `userId` | Search results and selector of a user's global search session. | contract | 1 day | delete | defined: `models/usersessiondata.js`; retention: `server/publications/cards.js`; erasure: nothing yet | Short-lived; removed after a day of no use. |
|
||||
| `settings` | auth | - | Instance settings, including the SMTP server and its credentials. | n/a | single document | n/a | defined: `models/settings.js`; erasure: nothing yet | No data subject; mailServer.username/password and from address are instance configuration. |
|
||||
| `sharedLabels` | none | - | Labels shared across an instance, organization or team. | n/a | until deleted | n/a | defined: `models/sharedLabels.js`; erasure: nothing yet | - |
|
||||
| `shopOrders` | **financial** | - | Order numbering and totals of a board shop, for numbering and rate limiting. | legal obligation | until deleted | n/a | defined: `models/shopOrders.js`; erasure: nothing yet | FINANCIAL: amounts, VAT, payment type; no buyer identity (only byAccount true/false). The buyer name and contact are on the order card. |
|
||||
| `shortPasswordLogins` | identity, auth, usage | `userId, username` | Accounts still logging in with a password shorter than the policy. | legitimate interest | 365 days (LOGIN_ADDRESS_RETENTION_DAYS) | delete | defined: `models/shortPasswordLogins.js`; retention: `server/lib/loginAddressRetention.js`; erasure: nothing yet | - |
|
||||
| `sqrlNuts` | auth | - | One-time SQRL nonces. | contract | TTL at expiresAt | n/a | defined: `server/sqrl.js`; retention: `server/sqrl.js`; erasure: nothing yet | No user link. |
|
||||
| `sqrlSessions` | auth, network | `userId` | Pending SQRL sign-in or association sessions, with the requesting IP. | contract | TTL at expiresAt | delete | defined: `server/sqrl.js`; retention: `server/sqrl.js`; erasure: nothing yet | Short-lived, expires by TTL; stores ip and userId/authUserId. |
|
||||
| `swimlanes` | content | - | Swimlanes of a board. | contract | board lifetime | n/a | defined: `models/swimlanes.js`; erasure: nothing yet | No user field; titles are board content. |
|
||||
| `tableVisibilityModeSettings` | none | - | Allowed table visibility modes. | n/a | until deleted | n/a | defined: `models/tableVisibilityModeSettings.js`; erasure: nothing yet | - |
|
||||
| `team` | none | - | Teams: name, description, website. | n/a | until deleted | n/a | defined: `models/team.js`; erasure: nothing yet | Membership is on users.teams. |
|
||||
| `text_migration_status` | none | - | Progress of the MongoDB to FerretDB text migration. | n/a | single document | n/a | defined: `models/textMigrationStatus.js`; erasure: nothing yet | - |
|
||||
| `timeEntries` | usage, **financial** | `userId, approvedBy` | Hours a person worked on a card, approval and invoicing. | contract | card lifetime; invoiced entries kept | delete | defined: `models/timeEntries.js`; retention: `server/timeEntries.js`; erasure: nothing yet | FINANCIAL when invoiced (invoiceId): bookkeeping may require keeping it, then pseudonymise instead. Removed with the card unless invoiced. |
|
||||
| `translation` | none | - | Admin-customised translation strings. | n/a | until deleted | n/a | defined: `models/translation.js`; erasure: nothing yet | - |
|
||||
| `trello_api_credentials` | auth | `_id` | A member's saved Trello API key and token (_id is the user id). | consent | until the member clears them | delete | defined: `server/trelloApiImport.js`; retention: `server/trelloApiImport.js`; erasure: nothing yet | Third-party credentials kept after user deletion: WP-4 gap. |
|
||||
| `trello_export_jobs` | usage | `userId` | Progress of a member's board export to Trello. | contract | until deleted | delete | defined: `server/trelloApiExport.js`; erasure: nothing yet | No removal found for finished jobs. |
|
||||
| `trello_import_jobs` | usage | `userId` | Progress, results and error log of a background Trello import. | contract | until the owner deletes the job | delete | defined: `models/trelloImportJobs.js`; retention: `server/trelloApiImport.js`; erasure: nothing yet | Trello key and token are never stored here. |
|
||||
| `triggers` | content | - | Triggers of board automation rules. | contract | board lifetime | n/a | defined: `models/triggers.js`; erasure: nothing yet | Configuration; may name a username in a member trigger. |
|
||||
| `unsaved-edits` | content | `userId` | Drafts of a field a user started editing but did not save. | contract | until saved or discarded | delete | defined: `models/unsavedEdits.js`; erasure: nothing yet | - |
|
||||
| `userPositionHistory` | usage | `userId` | Per-user undo/redo history of moves on a board. | contract | 1000 newest entries per user and board | delete | defined: `models/userPositionHistory.js`; retention: `server/models/userPositionHistory.js`; erasure: nothing yet | Trimmed daily (models/lib/positionHistoryCleanup.js); checkpoints are kept. |
|
||||
| `users` | identity, contact, network, auth, usage | `_id` | The accounts: username, full name, e-mail addresses, profile and preferences, login services, 2FA/passkey/SQRL metadata, push subscriptions, sign-in addresses. | contract | until the account is deleted; sign-in address entries 365 days (LOGIN_ADDRESS_RETENTION_DAYS) | delete | defined: `models/users.js`; retention: `server/lib/loginAddressRetention.js`; erasure: `server/models/users.js` | Meteor accounts collection (Meteor.users), so no new Mongo.Collection line. removeUser deletes the document and Users.after.remove runs models/lib/userDeletionCleanup.js; anonymizeUser (models/lib/userAnonymization.js) rewrites names and e-mail but keeps loginAddresses, passkeys, sqrl, webPushSubscriptions, ntfy and profile.emailBuffer (WP-4). |
|
||||
| `webPushKeys` | none | - | The instance VAPID key pair for browser push. | n/a | instance lifetime | n/a | defined: `server/webPush.js`; erasure: nothing yet | Push subscriptions themselves live on the users document. |
|
||||
| `windowsSsoTokens` | auth | `userId` | Short-lived one-time tokens of Windows single sign-on. | contract | TTL at expiresAt | delete | defined: `server/windowsSso.js`; retention: `server/windowsSso.js`; erasure: nothing yet | Expires by TTL; _id is the token hash. |
|
||||
| `workloadAbsences` | **health**, usage | `userId, createdBy` | Absences of a person (vacation, sick, holiday, training, other) for workload planning. | contract | until deleted | delete | defined: `models/workload.js`; erasure: `server/workload.js` | HEALTH DATA (GDPR Art. 9): type sick. Removed when the user is deleted; no age-based removal. |
|
||||
| `workloadAllocations` | usage | `userId, createdBy` | Allocation of a person or role to a board for a period. | contract | until deleted | delete | defined: `models/workload.js`; erasure: `server/workload.js` | - |
|
||||
| `workloadCapacities` | usage | `userId` | Working hours, work percent, working days and skills of a person. | contract | until deleted | delete | defined: `models/workload.js`; erasure: `server/workload.js` | Employment data (part-time percent). |
|
||||
| `workloadHolidays` | none | - | Public holidays for everyone. | n/a | until deleted | n/a | defined: `models/workload.js`; erasure: nothing yet | createdBy is the admin who entered it. |
|
||||
|
||||
[GDPR]: https://eur-lex.europa.eu/eli/reg/2016/679/oj "Regulation (EU) 2016/679"
|
||||
@@ -0,0 +1,521 @@
|
||||
# WeKan compliance gap analysis (2026-11-22)
|
||||
|
||||
> **What this is.** An analysis of which requirements of laws and standards a
|
||||
> self-hosted WeKan supports, which it does in part, and what is missing - with
|
||||
> the code it found and the official text of each provision. It is a plan for
|
||||
> WeKan's development, not legal advice and not a claim of compliance: whether
|
||||
> a deployment complies depends on how its operator runs it. The legal sources
|
||||
> are in [Sources.md](Sources.md). Rows are updated as the work packages are
|
||||
> done.
|
||||
|
||||
Read-only analysis of the WeKan repository (branch `main`). Scope: what a **self-hosted collaborative
|
||||
application** must provide so that the organisation running it can meet GDPR /
|
||||
UK GDPR, ePrivacy, NIS2, ISO/IEC 27001:2022 Annex A, ISO/IEC 27701, SOC 2 TSC,
|
||||
HIPAA Security and Privacy Rules, CCPA/CPRA, LGPD, PIPEDA, Australian Privacy
|
||||
Act, PIPL, India DPDP, Japan APPI, POPIA, EU Cyber Resilience Act, EU
|
||||
Accessibility Act / EN 301 549 / WCAG 2.2 AA, EU Data Act and (checked) EU AI
|
||||
Act / eIDAS. Organisational processes (DPIAs, staff training, the operator's
|
||||
own incident procedure) are out of scope except where the app must support them.
|
||||
|
||||
Status: **EXISTS** (done, evidence given), **PARTIAL** (exists, a concrete part
|
||||
missing), **MISSING** (searched, not found - search terms given).
|
||||
Priority: **P1** legally required for most deployments, **P2** commonly required
|
||||
by a framework, **P3** nice to have.
|
||||
|
||||
Legal basis column: every row names the exact provision and links its
|
||||
official source; the bracketed key (e.g. [GDPR], [CRA], [DDG5]) is a link
|
||||
defined in "Legal sources" at the end of this file, and
|
||||
[Sources.md](Sources.md) holds, per source, the
|
||||
HTTP status seen, the version/consolidation read, the application date and a
|
||||
quotation of the sentence relied on. Citations were added on 2026-11-22 from
|
||||
the current official texts (Pandex / EU Publications Office Cellar /
|
||||
national official portals), not from memory. **UNVERIFIED** marks a
|
||||
provision that could not be confirmed in an official source, with the
|
||||
reason; the row does not rely on it as fact. GDPR article numbers are the EU
|
||||
text; the UK GDPR (amended by the Data (Use and Access) Act 2025) was not
|
||||
re-read article by article. ISO/IEC 27001/27701 control numbers and SOC 2
|
||||
criteria are **UNVERIFIED** throughout: iso.org answered 403 and both texts
|
||||
are paywalled/gated, so they are kept only as orientation.
|
||||
|
||||
## Summary
|
||||
|
||||
WeKan already has a strong **security** base: TOTP 2FA with a `REQUIRE_2FA`
|
||||
off/admins/all policy, passkeys, account lockout, idle logout and timed logout,
|
||||
log out everywhere, password minimum + breached-password check, HSTS/HTTPS,
|
||||
board roles and custom roles, an admin audit log, a summarised security event
|
||||
log, file and history integrity scans (history is hash-chained), backups with
|
||||
restore and encrypted continuous backup, S3 server-side encryption,
|
||||
inactive-account disabling, a published vulnerability-disclosure process,
|
||||
an accessibility statement page and axe-core tests.
|
||||
|
||||
The gaps are concentrated in **privacy transparency and data-subject rights**,
|
||||
not in security:
|
||||
|
||||
1. **No self-service "download my data"** and no admin "export this person's
|
||||
data" (only board exports and the REST `GET /api/user`).
|
||||
2. **Erasure is incomplete**: `removeUser` and `anonymizeUser` leave personal
|
||||
data in at least 12 other collections - including `workloadAbsences` whose
|
||||
`type: 'sick'` is health data (GDPR Art. 9) - and the login-address tally
|
||||
keeps the old username after anonymisation. `anonymizeUser` is not in the
|
||||
audit log.
|
||||
3. **No privacy policy / terms / imprint / cookie pages inside WeKan**, no
|
||||
versioned acceptance record - only one external "legal notice" URL shown on
|
||||
the login page with "By continuing, you accept our legal notice". An
|
||||
operator that offers an instance commercially in Germany or Austria must
|
||||
keep an imprint "ständig verfügbar" (§ 5 DDG, § 5 ECG) - a login-only link
|
||||
is not enough (row 7.3).
|
||||
4. **No ROPA export yet, and no retention for some personal data**
|
||||
(`impersonatedUsers`, activities, change history, time entries,
|
||||
absences). The data inventory exists ([Data-Inventory.md](Data-Inventory.md),
|
||||
WP-3) and sign-in addresses expire (`LOGIN_ADDRESS_RETENTION_DAYS`, row 2.6).
|
||||
5. **Audit log gaps**: client-side Settings writes (Admin Panel switches) are
|
||||
not audited, retention is a fixed 365 days (HIPAA § 164.316(b)(2)(i) keeps
|
||||
required Security Rule documentation 6 years - it does not literally name
|
||||
audit-log rows), no export / SIEM forwarding, no record of who exported
|
||||
what.
|
||||
6. **CRA**: no SBOM drawn up per release (deliberately off in Docker, pinned
|
||||
by a test), no support-period statement, no `/.well-known/security.txt`.
|
||||
The CRA applies in full only from **2027-12-11**, but its Art. 14
|
||||
reporting duties apply since **2026-09-11** - see "Legal status" below for
|
||||
whether WeKan is a manufacturer at all.
|
||||
7. **WCAG 2.2**: the axe suite runs WCAG 2.0/2.1 tags only; the 2.2-only
|
||||
criteria are open in `TODO.md`. Legally the EU baseline is still WCAG 2.1
|
||||
AA through EN 301 549 V3.2.1, and only for public-sector deployments (Web
|
||||
Accessibility Directive) or in-scope consumer services (EAA); 2.2 is good
|
||||
practice.
|
||||
|
||||
EU AI Act (Regulation (EU) 2024/1689, **amended by Regulation (EU)
|
||||
2026/1744**, consolidated 2026-07-27 - its Art. 113 dates changed): **not
|
||||
applicable** - WeKan has no AI model; its "assistants" are
|
||||
deterministic code (`docs/Features/General/Assistants/Assistants.md`: "No
|
||||
model is downloaded, no text leaves the server"); a grep for
|
||||
`openai|anthropic|ollama|llm|chatgpt|gemini` in `models/ server/ client/` found
|
||||
nothing. eIDAS: **not applicable** (no qualified signatures/seals; SAML/OIDC
|
||||
login is enough for eIDAS-notified eIDs via an IdP). ePrivacy cookie banner:
|
||||
**not required by default** - WeKan sets only the strictly necessary
|
||||
`meteor_login_token` cookie; the Matomo code in `client/lib/utils.js`
|
||||
(`setMatomo`, `manageMatomo`) is dead code (only called from
|
||||
`client/lib/tests/Utils.tests.js`; `matomoURL`/`matomoSiteId` are not in the
|
||||
`models/settings.js` schema and nothing writes them) - it should be removed or,
|
||||
if kept, gated behind consent.
|
||||
|
||||
Side findings (bugs, not compliance features, worth fixing on the way):
|
||||
`removeUser` and `anonymizeUser` on oneself do not check
|
||||
`AccountSettings 'accounts-allowUserDelete'` server-side (only the button is
|
||||
hidden, `client/components/users/userHeader.jade:243`), and a self-delete
|
||||
skips the last-administrator check (`server/models/users.js` `removeUser`,
|
||||
self branch returns before it). `TODO.md` already lists "the per-address login
|
||||
delay is never applied" and the attachment-retention per-run limit mismatch.
|
||||
|
||||
## Legal status on 2026-11-22 (what applies now, what comes later)
|
||||
|
||||
| Instrument | Version read | Applies from | Binds |
|
||||
|---|---|---|---|
|
||||
| [GDPR] Regulation (EU) 2016/679 | consolidation 2016-05-04 (corrigendum); no amending act in Cellar | **2018-05-25** (Art. 99(2)) - applies now | the operator (controller); WeKan supplies the features |
|
||||
| [EPD] Directive 2002/58/EC Art. 5(3); DE [TDDDG25] § 25; UK [PECR6] reg. 6 | 2009-12-19; TDDDG current; PECR reg. 6 **substituted 2026-02-05** | applies now | operator |
|
||||
| [NIS2] Directive (EU) 2022/2555 | 2022-12-27, unamended | Member State measures **from 2024-10-18** (Art. 41(1)); DE: [BSIG] 2025 (Ausfertigung 2025-12-02) - applies now where transposed | operators that are essential/important entities (Art. 2), not WeKan |
|
||||
| [CRA] Regulation (EU) 2024/2847 | 2024-11-20; amended only by Reg. (EU) 2025/327 (EHDS) | **Art. 14 reporting since 2026-09-11** (also for products placed before 2027-12-11, Art. 69(3)); Chapter IV since 2026-06-11; **everything else, incl. Art. 13, Annex I, Annex II and Art. 24, from 2027-12-11** (Art. 71(2)) | manufacturers / stewards - see the CRA note below |
|
||||
| [EAA] Directive (EU) 2019/882 | 2019-06-07, unamended | **2025-06-28** (Art. 31(2)); services transition to 2030-06-28 (Art. 32) | only consumer services listed in Art. 2(2) - a kanban tool is not one; microenterprises exempt (Art. 4(5)) |
|
||||
| [WAD] Directive (EU) 2016/2102 | OJ text | websites 2019-09-23 / 2020-09-23, apps 2021-06-23 (Art. 12(3)) - applies now | public sector bodies running WeKan |
|
||||
| [DA] Regulation (EU) 2023/2854 | 2023-12-22, unamended | **2025-09-12** (Art. 50) - applies now | operators selling WeKan as a data processing service (Art. 23 switching) |
|
||||
| [ECD] Art. 5; DE [DDG5] § 5 DDG; AT [ECG5] § 5 ECG, [MedienG] §§ 24-25; UK [UKECR6] reg. 6 | DDG last amended 2026-05-12; ECG/MedienG "Fassung vom 22.11.2026" | applies now (DDG since 2024-05-14, replacing § 5 TMG) | operator of a commercially offered instance |
|
||||
| [AIA] Regulation (EU) 2024/1689 | **amended by Reg. (EU) 2026/1744**, consolidated 2026-07-27 | in parts since 2025; high-risk 2027-12-02 / 2028-08-02 | not applicable (no AI) |
|
||||
| [HIPAA] 45 CFR 164 Subpart C (Security Rule) | eCFR up to date 2026-11-19; Security Rule unchanged since 2013; NPRM of 2025-01-06 not final | applies now | covered entities / business associates |
|
||||
| [HIPAA] Privacy Rule final rule 91 FR 74848 (2026-11-19) | amends § 164.524 etc. | **2027-01-19** | same |
|
||||
| [CCPA] Cal. Civ. Code § 1798.100 et seq. + 11 CCR § 7000 et seq. | statute and regulations effective 2026-01-01 | applies now; ADMT regulations by **2027-01-01** | a "business" (§ 1798.140(d)) |
|
||||
| [LGPD] Lei 13.709/2018 | texto compilado | applies now (sanctions since 2021-08-01, Art. 65) | operator |
|
||||
| [PIPEDA] S.C. 2000, c. 5 | current to 2026-10-29 | applies now | operator |
|
||||
| [AUPA] Privacy Act 1988 (Cth) | compilation C2026C00227, 2026-06-04 | applies now (small business ≤ AUD 3 M turnover generally exempt, s. 6D) | operator |
|
||||
| [PIPL] 个人信息保护法 | 2021 text (NPC) | **2021-11-01** (Art. 74) | operator |
|
||||
| [DPDP] Act No. 22 of 2023 | as enacted | **UNVERIFIED**: core duties reported to start 2027-05-13 (MeitY page not readable) - treat as later | operator |
|
||||
| [APPI] Act No. 57 of 2003 | translation of Act No. 37 of 2021 | applies now | operator |
|
||||
| [POPIA] Act 4 of 2013 | Gazette text as enacted | applies now (commencement date UNVERIFIED) | operator |
|
||||
| [WCAG22], [EN301549], [ISO27001], [ISO27701], [SOC2], [RFC9116], [NIST63B] | standards / guidance | not law by themselves | - |
|
||||
|
||||
**CRA and WeKan itself (Art. 3(13), 3(14), 24, recitals 15, 18, 19).**
|
||||
The open-source steward regime of Art. 24 needs a **legal person** (Art.
|
||||
3(14): "a legal person, other than a manufacturer"; recital 19). WeKan's own
|
||||
commercial-support page says "WeKan (VAT Number: FI34047245) is a Finnish Sole
|
||||
Proprietorship", i.e. a natural person, so WeKan is not a steward. Whether
|
||||
WeKan is a *manufacturer* depends on whether it is supplied "in the course of
|
||||
a commercial activity" (Art. 3(22)): free FOSS that is "not monetised" is not
|
||||
commercial (recital 18), but recital 15 names "charging a price for technical
|
||||
support services where this does not serve only the recuperation of actual
|
||||
costs" and "an intention to monetise" as signs of commercial supply, and the
|
||||
same page sells support cases, hourly work, yearly plans and an "Official SaaS
|
||||
with Admin Panel: 50 euro/year" (while stating all revenue goes to WeKan's
|
||||
FLOSS development). So the premise "free, non-commercial" is not clearly
|
||||
supported; the case is borderline. If it is commercial, Lauri Ojansivu is the
|
||||
manufacturer (Art. 3(13) covers natural persons and "free of charge"): Art. 14
|
||||
reporting of actively exploited vulnerabilities (24 h / 72 h / 14 days) via
|
||||
ENISA's single reporting platform already applies, and Art. 13 + Annex I/II
|
||||
from 2027-12-11. If not, the CRA does not apply to WeKan at all. Organisations
|
||||
that **sell or bundle** WeKan are manufacturers of their product and must do
|
||||
FOSS due diligence (Art. 13(5)); organisations that **only self-host** it are
|
||||
users. Rows 5.1-5.5 are written so they are worth doing either way. This is
|
||||
a reading of the text, not legal advice.
|
||||
|
||||
---
|
||||
|
||||
## 1. Data subject rights
|
||||
|
||||
| # | Requirement | Legal basis (exact provision; key links to official source) | Status | Evidence | What is missing / smallest addition | Menu | Prio |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| 1.1 | Right of access + portability: a person downloads all data about themselves, machine-readable | [GDPR] Art. 15(1),(3), Art. 20(1); [CCPA] § 1798.110(a); [LGPD] Art. 18 (items II, V UNVERIFIED - only the head was read); [PIPEDA] Sch. 1 Principle 4.9; [AUPA] APP 12.1; [PIPL] Art. 45 (UNVERIFIED, not read); [APPI] Art. 33; [POPIA] s. 23; [DPDP] s. 11 (not yet in force, UNVERIFIED date); [HIPAA] § 164.524 (amended by 91 FR 74848, effective 2027-01-19). Data Act Art. 4-5 removed: they cover connected-product data, not WeKan ([DA] Art. 1(1)(a)). | **PARTIAL** | Board exports in many formats (`models/lib/exportAllBoards.js`, `server/routes/exportAllBoards.js`, All Boards sidebar "Export all boards"); REST `GET /api/user` (`server/models/users.js:2672`) returns the user document minus `services` plus board memberships. Searched `exportMyData|exportUserData|downloadMyData|my-data|personal data` - no personal-data export. | A "Download my data" ZIP: `user.json` (profile, settings, `loginAddresses`, notifications, 2FA/passkey **metadata** only, no secrets), `authored/` (cards created, comments, checklists, attachments uploaded, time entries, workload absences/capacity, reactions, saved filters), `boards.json` (memberships + roles), and the existing per-board WeKan JSON export of boards still visible to them. New `server/lib/personalDataExport.js` driven by the inventory (WP-3) so a new collection is included automatically; route `GET /api/user/export` reusing `activeUserByToken(token, 'export', req)` like `server/routes/exportAllBoards.js`; respect `assertExportEnabled()` only for board content, never for the person's own profile (access right cannot be switched off). | Member Settings / **Privacy and my data** / Download my data | P1 |
|
||||
| 1.2 | Admin answers a data-subject request on behalf of a person | Same rights as 1.1, exercised through the controller: [GDPR] Art. 12(3) (deadline one month - UNVERIFIED, Art. 12 not re-read), Art. 15; [CCPA] § 1798.110; [HIPAA] § 164.524 | **MISSING** | Admin Panel / People / People ⋯ menu (`settingsUserPopup` in `client/components/settings/peopleBody.jade:730`) has Impersonate, Anonymize, Delete only. Impersonation can export boards but that is not a DSAR. | Add "Export personal data" to the ⋯ menu calling the same exporter for `userId` (admin only, audited, add to `AUDITED_METHODS`). | Admin Panel / People / People / ⋯ | P1 |
|
||||
| 1.3 | Rectification | [GDPR] Art. 16 (not re-read, UNVERIFIED); [CCPA] § 1798.106(a); [LGPD] Art. 18(III); [PIPEDA] Principle 4.9; [HIPAA] § 164.526; [POPIA] s. 24 (not re-read, UNVERIFIED) | **EXISTS** | Member Settings / Edit Profile (`editProfilePopup`, `client/components/users/userHeader.jade`): full name, username, initials, email; admin edit in People (`editUser`). `allowUserNameChange`/email change governed by `models/accountSettings.js`. | - | - | - |
|
||||
| 1.4 | Erasure: delete account | [GDPR] Art. 17(1); [CCPA] § 1798.105(a); [LGPD] Art. 18 (item VI UNVERIFIED); [PIPEDA] Principle 4.5.3; [AUPA] APP 11.2; [PIPL] Art. 47; [APPI] Art. 35; [DPDP] s. 8(7), s. 12 (date UNVERIFIED); CRA Annex I Part I(2)(m) from 2027-12-11 ([CRA], see CRA note) | **PARTIAL** | Self: Edit Profile "Delete" when `allowUserDelete` (`userHeader.jade:243-245`); admin: People ⋯ Delete; REST `DELETE /api/users/:userId`. `Users.after.remove` cleanup plan `models/lib/userDeletionCleanup.js` covers `boards.members/watchers`, `cards.members/assignees/watchers`, `lists.watchers`, avatars. | Not cleaned (grep of the plan): `workloadAbsences` (health data), `workloadCapacities`, `workloadAllocations`, `timeEntries`, `loginAddresses` (per-address user tally keyed by username, `server/lib/loginTally.js`), `shortPasswordLogins`, `impersonatedUsers`, `idleSessions`, `notificationEmailJobs`/outbox (rendered e-mail HTML), `unsaved-edits`, `userPositionHistory`, `savedCardFilters`, `sessiondata`, `orgUser`, `card_comment_reactions`, eventlog actor tallies. Extend `buildUserDeletionCleanupPlan` with one entry per collection from the inventory (WP-3) and a negative test that every inventory entry with `subjectField` has a deletion rule. Also: server-side check of `allowUserDelete` for self-delete, and the last-admin check for self. | Member Settings / Privacy and my data / Delete account (move the button there; keep Edit Profile link) | P1 |
|
||||
| 1.5 | Erasure alternative: anonymise (keep history, remove identity) | [GDPR] Art. 17(1) and Art. 5(1)(e) (anonymised data leave GDPR scope - recital 26, UNVERIFIED, not re-read); [PIPEDA] Principle 4.5.3 ("made anonymous"); [AUPA] APP 11.2 ("de-identified") | **PARTIAL** | `anonymizeUser` (`server/models/users.js:483`), pure `models/lib/userAnonymization.js` (`buildAnonymizeUpdate`): scrubs username, fullname, initials, avatarUrl, emails, password, `profile.token`, login tokens. Test `tests/userAnonymization.test.cjs`. | Not scrubbed: `loginAddresses` on the user and in the `loginAddresses` collection (old username stays as the tally key), `passkeys`, `sqrl`, `webPushSubscriptions`, `ntfy`, `profile.emailToCard`, `profile.emailBuffer`, `services.*` (OAuth/OIDC/LDAP/SAML identifiers, `twoFactorAuthentication`, `accounts-lockout`), `orgs`/`teams` free text, `@username` mentions and `requestedBy`/`assignedBy` strings in cards and comments (the import anonymiser already rewrites these: `models/lib/importExportSecurity.js` `buildUserAnonymizationMap`), plus the same side collections as 1.4. Extend `buildAnonymizeUpdate` `$unset` and reuse the mention rewriter. | Same as 1.4 | P1 |
|
||||
| 1.6 | Restriction of processing / objection | [GDPR] Art. 18(1), Art. 21(1); [LGPD] Art. 18(IV),(IX) (UNVERIFIED sub-items, Art. 18 head read); [POPIA] s. 11(3) (UNVERIFIED, s. 11(1) read) | **PARTIAL** | Admin deactivation `loginDisabled` (People "Active Person"), revokes tokens (`server/models/users.js:2795`); per-user notification opt-outs (Member Settings / Notifications); `profile.webhookHideIdentity` (`models/users.js:438`); site switches Disable all activities / notifications / watch (`docs/Features/Admin-Panel/Settings/Activities-and-Notifications.md`). | No person-initiated "request restriction/objection" channel. Smallest: a "Contact the privacy contact" link on the privacy page (WP-1) - the process is organisational. | Member Settings / Privacy and my data | P3 |
|
||||
| 1.7 | Consent records and withdrawal; terms/privacy acceptance with versioning | [GDPR] Art. 7(1) (demonstrate consent), 7(3) withdrawal (UNVERIFIED, Art. 7(1)-(2) read); [LGPD] Art. 8; [PIPL] Art. 14; [DPDP] s. 6(1) (date UNVERIFIED); [POPIA] s. 11(1)(a). Accepting terms is a contract question, not GDPR consent; for employee boards consent is rarely the legal basis. CCPA has no general consent duty - removed. | **MISSING** | Only `legalNotice` URL (`models/settings.js:477`, Admin Panel / Settings / Appearance `#legalNoticevalue`, `settingBody.jade:602`) rendered on the login page as "By continuing, you accept our legal notice" (`client/components/main/layouts.jade:136-141`). Searched `consent|termsAccepted|acceptTerms|termsOfService|privacyPolicy` - none in app code. | Store `users.legalAcceptances: [{ page, version, at }]`; legal pages (WP-1) carry `version` + `modifiedAt`; optional setting "Require acceptance" shows a blocking accept dialog after login when the stored version is older - same gate pattern as `server/passwordChangeRequired.js`. Withdrawal = the user sees the accepted versions in Member Settings / Privacy and my data and can delete/anonymise. Registration form: an "I accept" checkbox when required. | Login page footer + Member Settings / Privacy and my data; config in Admin Panel / Settings / Privacy | P2 |
|
||||
| 1.8 | Cookie consent | [EPD] Art. 5(3) (strictly-necessary exemption); DE [TDDDG25] § 25(2) Nr. 2; UK [PECR6] reg. 6 (substituted 2026-02-05) + Sch. A1; [GDPR] Art. 7 for any consent | **EXISTS (not needed) / cleanup** | Only `meteor_login_token` (strictly necessary; `models/lib/loginCookieExpiry.js`). Searched `document.cookie|Cookies.set|analytics|matomo|plausible|gtag(`: only dead Matomo code in `client/lib/utils.js:1037-1090`. | No banner needed. Add a cookie/local-storage section to the privacy page (WP-1). Remove dead Matomo code or gate it behind consent with Matomo `disableCookies`. | Login page footer "Cookies" | P2 |
|
||||
| 1.9 | Children's data / age | [GDPR] Art. 8(1) (16, Member States may lower to 13); [COPPA] § 312.2 (under 13); [PIPL] Art. 31 (under 14); [DPDP] s. 2(f), s. 9(1) (under 18; date UNVERIFIED); [POPIA] s. 11(1)(a); UK AADC UNVERIFIED (ico.org.uk answered 403) | **MISSING** | Searched `dateOfBirth|birthdate|minimum age|minAge|parental` - none. | WeKan is not directed at children; smallest: optional "minimum age" confirmation checkbox on the registration form (Admin Panel / People / Login setting `registrationMinimumAge`, empty = off). | Admin Panel / People / Login | P3 |
|
||||
| 1.10 | Portability formats (structured, commonly used, machine-readable) | [GDPR] Art. 20(1); [CCPA] § 1798.100(d) portable format (UNVERIFIED, sub-section not re-read); [DA] Art. 23 + Art. 25 switching/export - only for operators that sell WeKan as a data processing service (SaaS), applies since 2025-09-12 | **EXISTS** | WeKan JSON, CSV/TSV, Excel and ~50 tool formats (`models/lib/exportAllBoards.js` `EXTENSIONS`), Trello/Jira/... import. | Personal-data export (1.1) should be JSON + CSV. | - | - |
|
||||
| 1.11 | Automated decision-making notice | [GDPR] Art. 22(1), Art. 13(2)(f) (UNVERIFIED letter, Art. 13 head read); [CCPA] ADMT regs 11 CCR § 7200 et seq. (compliance by 2027-01-01) | **EXISTS (N/A)** | No profiling decisions; helpers are rule-based (`docs/Features/General/Assistants/Assistants.md`). Auto-disable of inactive accounts is an admin policy (`server/disableInactiveUsers.js`). | Mention in privacy page template. | - | P3 |
|
||||
|
||||
## 2. Records and retention
|
||||
|
||||
| # | Requirement | Legal basis (exact provision; key links to official source) | Status | Evidence | What is missing / smallest addition | Menu | Prio |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| 2.1 | Data inventory: which collection/field holds which category of personal data, purpose, legal basis, recipients | [GDPR] Art. 30(1) (exemption Art. 30(5) below 250 staff unless processing is not occasional or includes Art. 9 data - WeKan absences are health data); [LGPD] Art. 37; [PIPL] Art. 51 (classification and measures) - Art. 54 is compliance audits, corrected; [POPIA] s. 14, s. 17 (s. 17 UNVERIFIED); [DPDP] s. 8 (date UNVERIFIED); 27701 7.2.8 and ISO A.5.9/A.5.34 UNVERIFIED ([ISO27701], [ISO27001]) | **PARTIAL** | Done in [bfd83d09b6](https://github.com/wekan/wekan/commit/bfd83d09b6) (WP-3): `models/lib/personalDataInventory.js` classifies all 185 collections (categories, subject field, purpose, legal-basis hint, retention and where it is enforced, erasure and which file does it); 128 hold personal data, health (Art. 9) in `workloadAbsences`, financial in the billing collections, `timeEntries`, `shopOrders`, `cloudDomains`, `cloudInvoices`. `tests/personalDataInventory.test.cjs` scans `models/`, `server/`, `packages/` (skipping `_build*`) and fails on an unclassified or vanished collection and on a new erasure gap. Generated view: [Data-Inventory.md](Data-Inventory.md) (`releases/compliance/data-inventory.mjs`). | Recipients per instance (see 2.2). The UI part is WP-6: Admin Panel / Settings / **Privacy** / Data inventory (read-only table from the module + "Download ROPA"). | Admin Panel / Settings / **Privacy** / Data inventory (read-only table + "Download ROPA" CSV/Markdown) | P1 |
|
||||
| 2.2 | Records of processing (ROPA) export the controller can complete | [GDPR] Art. 30(1)(a)-(g); [LGPD] Art. 37. PIPL Art. 54 removed (it requires compliance audits, not a ROPA); PIPL Art. 55-56 impact assessment is the nearest record | **PARTIAL** | [Data-Inventory.md](Data-Inventory.md) (from 2.1, [bfd83d09b6](https://github.com/wekan/wekan/commit/bfd83d09b6)) is the static part of a ROPA the controller can complete: purpose, categories, legal-basis hint, retention, erasure per collection. | WP-6, Admin Panel / Settings / Privacy: render the inventory + the instance's actual retention settings + enabled third-party services (HIBP if `PASSWORD_CHECK_PWNED`, `DEFAULT_AVATAR_URL`, mail provider, S3/Azure/GCS, webhooks, ActivityPub) as a ROPA draft. | Admin Panel / Settings / Privacy | P2 |
|
||||
| 2.3 | Attachment retention | [GDPR] Art. 5(1)(e); [HIPAA] § 164.310(d)(2)(i) disposal (UNVERIFIED, § 164.310 not read) | **EXISTS** | `models/lib/attachmentRetention.js`, `server/attachmentRetention.js`, Admin Panel / Attachments / Retention (`adminUrls.js` `retention`), soft-delete then purge. TODO.md notes a per-run limit mismatch. | - | - | - |
|
||||
| 2.4 | Security / speed / test event log retention | [GDPR] Art. 5(1)(e); [NIS2] Art. 21(2)(b); ISO A.8.15 and SOC2 UNVERIFIED ([ISO27001], [SOC2]) | **EXISTS** | `EVENTLOG_RETENTION_DAYS` default 90 (`models/eventLog.js:116-148`). | Show it in the retention overview (2.10). | - | - |
|
||||
| 2.5 | Admin audit log retention configurable (HIPAA keeps required Security Rule documentation 6 years, § 164.316(b)(2)(i); a 1+ year log period for SOC2/ISO is common practice, not a cited rule) | [HIPAA] § 164.316(b)(1)(ii), (b)(2)(i) - 6 years for policies and for records of actions/activities/assessments the Security Rule requires (e.g. the activity reviews of § 164.308(a)(1)(ii)(D)); the rule does not literally require keeping raw audit-log rows 6 years. ISO A.8.15, SOC2 UNVERIFIED | **PARTIAL** | Fixed `AUDIT_KEEP_DAYS = 365` (`models/lib/adminAudit.js:26`), pruned daily (`server/adminAudit.js:113-126`). | Read `ADMIN_AUDIT_RETENTION_DAYS` (0 = keep forever, default 365) through `authEnv`/Admin Panel override like other Login settings; also apply to `impersonatedUsers`. | Admin Panel / People / Audit log (show "kept N days") | P2 |
|
||||
| 2.6 | Login / IP data retention | [GDPR] Art. 5(1)(c),(e); [POPIA] s. 14(1); [PIPEDA] Principle 4.5.3; [AUPA] APP 11.2; [PIPL] Art. 19 (UNVERIFIED, not read) | **EXISTS** | `LOGIN_ADDRESS_RETENTION_DAYS` (default 365, 0 = keep): a daily claimed job (`server/lib/loginAddressRetention.js`, decisions in `models/lib/loginAddressRetention.js`, `tests/loginAddressRetention.test.cjs`) removes account address entries, `loginAddresses` rows and their per-account entries, and `shortPasswordLogins` rows last used before the cutoff. | Done. Still open: show the period in the retention overview (2.10). | Admin Panel / People / Login (setting) + Privacy retention overview | P1 |
|
||||
| 2.7 | Activities / change history retention | [GDPR] Art. 5(1)(e) | **MISSING (by design kept)** | No age-based removal of `activities` or `changeHistory` (grep `Activities.removeAsync` only finds per-object deletes). Change history is append-only and hash-chained (`server/lib/historyChainAppend.js`) - deleting rows would break the chain. | `ACTIVITIES_RETENTION_DAYS` (default off) removing old `activities` only; for change history document "kept for the board's lifetime, removed with the board" and pseudonymise actor on user erasure (keep `userId`, drop names). Do not delete chained rows. | Admin Panel / Settings / Activities and notifications | P2 |
|
||||
| 2.8 | Time tracking / absence data retention and minimisation (employee data, health) | [GDPR] Art. 9(1),(2)(b), Art. 88; [LGPD] Art. 11; [POPIA] s. 26; [APPI] Art. 2(3) (medical history) | **PARTIAL** | `WorkloadAbsences` type `sick` visible only to self and admins (`models/workload.js:31-41`, `server/workload.js`). No retention. `timeEntries` none. | `WORKLOAD_ABSENCE_RETENTION_DAYS` (default off); admin switch "do not record absence type" (store only "unavailable"). Classify `health` in inventory. | Admin Panel / Settings / Features (Workload) | P2 |
|
||||
| 2.9 | Notification / e-mail outbox retention | [GDPR] Art. 5(1)(e) | **EXISTS** | Tray: `NOTIFICATION_TRAY_AFTER_READ_DAYS_BEFORE_REMOVE` (`models/lib/notificationCleanup.js`); receipts `EMAIL_RECEIPT_METADATA_DAYS` (`server/lib/emailReceiptRetention.js`); received e-mail TTL 30 d (`server/emailToCard.js:74`); many `*Retention.js` under `server/lib/`. | Include in overview. | - | - |
|
||||
| 2.10 | One place that shows every retention period in force | [GDPR] Art. 13(2)(a), Art. 30(1)(f); 27701, SOC2 C1.2 UNVERIFIED | **MISSING** | Retention is spread over env vars and panes. | Read-only "Retention" table in the Privacy pane, built from inventory `retention.env` + current values; doubles as input for the privacy page. | Admin Panel / Settings / Privacy / Retention | P2 |
|
||||
| 2.11 | Inactive accounts | [GDPR] Art. 5(1)(e); [HIPAA] § 164.308(a)(3)(ii)(C) termination procedures; ISO A.5.18 / SOC2 CC6.2 UNVERIFIED | **EXISTS** | `USERS_DISABLE_INACTIVE_AFTER_DAYS` (`server/disableInactiveUsers.js`, `models/lib/inactiveUsers.js`). | Optional "delete/anonymise after N more days" step (P3). | - | P3 |
|
||||
| 2.12 | Data residency / international transfers information | [GDPR] Art. 44-49, Art. 13(1)(f) (UNVERIFIED letter); [PIPL] Art. 38; [DPDP] s. 16 (date UNVERIFIED); [LGPD] Art. 33; [AUPA] APP 8 | **PARTIAL** | Self-hosted; optional third parties are off by default: HIBP k-anonymity (`models/lib/passwordPolicy.js`), `DEFAULT_AVATAR_URL` (`models/lib/defaultAvatarUrl.js`), cloud storage, webhooks, mail. No document lists them. | `docs/Security/Privacy/Third-Party-Transfers.md` + the ROPA export (2.2) listing which are enabled on this instance. | Admin Panel / Settings / Privacy | P2 |
|
||||
|
||||
## 3. Security controls
|
||||
|
||||
| # | Requirement | Legal basis (exact provision; key links to official source) | Status | Evidence | What is missing / smallest addition | Menu | Prio |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| 3.1 | MFA / 2FA, enforceable | [NIS2] Art. 21(2)(j); DE [BSIG] § 30(2) Nr. 10; [CRA] Annex I Part I(2)(d) (from 2027-12-11); [HIPAA] § 164.312(d) (authentication, MFA not prescribed; MFA only in the 2025 NPRM, not law); ISO A.8.5 / SOC2 CC6.1 UNVERIFIED | **EXISTS** | Member Settings / Two-factor (`js-two-factor-auth`), passkeys, SQRL; `REQUIRE_2FA` off/admins/all (`models/lib/twoFactorRequirement.js`, `server/requireTwoFactor.js`), Admin Panel / People / Login. | - | - | - |
|
||||
| 3.2 | Password policy | [HIPAA] § 164.308(a)(5)(ii)(D) password management (UNVERIFIED, sub-item not read); [NIST63B] (guidance, 15 chars single-factor); ISO A.5.17 / SOC2 UNVERIFIED | **EXISTS** | `PASSWORD_MIN_LENGTH` (default 8), `PASSWORD_MIN_LENGTH_ENFORCE`, `PASSWORD_CHECK_PWNED` (`models/lib/passwordPolicy.js`), Problems / Password length. Matches NIST 800-63B (no forced complexity). | Default minimum 8 is below NIST 800-63B rev.4 recommendation (15 for single-factor); document recommended values in the compliance guide (WP-9). | - | P3 |
|
||||
| 3.3 | Account lockout / brute force | [GDPR] Art. 32(1)(b); [CRA] Annex I Part I(2)(d); [HIPAA] § 164.308(a)(5)(ii)(C) log-in monitoring (UNVERIFIED, not read); ISO A.8.5 / SOC2 UNVERIFIED | **PARTIAL** | `packages/wekan-accounts-lockout`, `models/lib/accountLockout.js`, Admin Panel / People / Locked users; Problems / Security report brute-force rows. | TODO.md: "the per-address login delay is never applied" - fix that bug. | - | P2 |
|
||||
| 3.4 | Automatic logoff / session timeout | [HIPAA] § 164.312(a)(2)(iii) (Addressable: "terminate an electronic session after a predetermined time of inactivity"); ISO A.8.5 UNVERIFIED; PCI DSS not checked | **EXISTS** | `LOGOUT_IDLE_MINUTES` (`models/lib/idleLogout.js`, `server/idleLogout.js`), `LOGOUT_WITH_TIMER`/`LOGOUT_IN` (`models/lib/logoutTimer.js`), login expiry cookie fix (`models/lib/loginCookieExpiry.js`); Admin Panel / People / Login. | - | - | - |
|
||||
| 3.5 | Session management: log out everywhere; see active sessions | [GDPR] Art. 32(1)(b); [CRA] Annex I Part I(2)(d); ISO A.8.5 / SOC2 UNVERIFIED | **PARTIAL** | Member Settings / Log out everywhere (`logoutEverywhere`, `server/models/users.js:991`); admin deactivation clears tokens. Per-token last activity exists in `idleSessions` (`server/idleLogout.js`). | No list of the person's own sessions (device/IP/last active) with "end this session". Small: read `services.resume.loginTokens` + `idleSessions` + `loginAddresses`. Admin: "Log out this user" in People ⋯. | Member Settings / Privacy and my data / Sessions; Admin Panel / People / ⋯ | P3 |
|
||||
| 3.6 | Own login history (IP, place, time) | [GDPR] Art. 15(1),(3); [CRA] Annex I Part I(2)(d) "report on possible unauthorised access"; ISO/SOC2 UNVERIFIED | **PARTIAL** | Admin only: People "Location" column -> login addresses per user (`docs/Features/Admin-Panel/People/People.md`), Problems / Offices. User cannot see their own (grep `loginTally|loginAddresses` in `client/` only hits `client/components/settings/adminProblems.js`). | Show the user's own `loginAddresses` (first/last seen, count, location) in the sessions view (3.5) - also part of 1.1 export. | Member Settings / Privacy and my data | P2 |
|
||||
| 3.7 | RBAC / least privilege | [NIS2] Art. 21(2)(i); [HIPAA] § 164.308(a)(4), § 164.312(a)(1); [GDPR] Art. 25(2), Art. 32(1)(b); ISO A.5.15/A.8.2 / SOC2 CC6.3 UNVERIFIED | **EXISTS** | Board roles + custom roles (`models/customBoardRoles.js`, `models/lib/boardRoleCapabilities.js`), tenant admins (`models/lib/tenantAdmin.js`), admin-only custom fields, private-boards-only, `docs/Features/Admin-Panel/Who-Sees-What.md`. | - | - | - |
|
||||
| 3.8 | Access review: what each person can reach, exportable | [HIPAA] § 164.308(a)(3)(ii)(B) workforce clearance, § 164.308(a)(4); [NIS2] Art. 21(2)(i); ISO A.5.18 / SOC2 CC6.2-6.3 UNVERIFIED | **PARTIAL** | Problems / Boards Report lists every board with visibility and members (`docs/Features/Admin-Panel/Problems/Boards-Report.md`); `/api/user` lists a user's boards. No per-person view, no export (`client/components/settings/tablePage.*` has no CSV export; grep `csv|export` only finds attachment download). | (a) "Boards and roles" in People ⋯ for one user; (b) CSV export button on the shared table page (People, Boards Report, Audit log, Security report). | Admin Panel / People / People ⋯ ; table pages | P2 |
|
||||
| 3.9 | Unique user identification | [HIPAA] § 164.312(a)(2)(i) (Required); ISO A.5.16 UNVERIFIED | **EXISTS** | Unique `username`/`emails` (`models/users.js`), `_id`. | - | - | - |
|
||||
| 3.10 | Emergency access ("break glass") procedure | [HIPAA] § 164.312(a)(2)(ii) emergency access procedure (Required) - about obtaining ePHI in an emergency; § 164.308(a)(7)(ii)(C) emergency mode operation plan | **PARTIAL** | Admin impersonation with a recorded reason (`models/impersonatedUsers.js` `reason`, Problems / Impersonation Report). Searched `break.glass|emergency access` - none; no documented admin-recovery procedure (only `docs/Features/Login-Page/Forgot-Password.md`). | Document the procedure (sealed admin account, `REQUIRE_2FA`, impersonation report as evidence) in the compliance guide; optional: an "emergency" reason category in impersonation that notifies all admins. | docs + Admin Panel / Problems / Impersonation | P3 |
|
||||
| 3.11 | Encryption in transit | [NIS2] Art. 21(2)(h); [HIPAA] § 164.312(e)(1), (e)(2)(ii) (Addressable); [GDPR] Art. 32(1)(a); [CRA] Annex I Part I(2)(e); ISO A.8.24 / SOC2 CC6.7 UNVERIFIED | **EXISTS** | Built-in HTTPS (`models/lib/httpsConfig.js`, `server/httpsServer.js`), HSTS (`models/lib/securityHeaders.js`), verified SMTP TLS (`server/lib/mailTransport.js`), proxy docs. | - | - | - |
|
||||
| 3.12 | Encryption at rest | [GDPR] Art. 32(1)(a); [HIPAA] § 164.312(a)(2)(iv) (Addressable); [NIS2] Art. 21(2)(h); [CRA] Annex I Part I(2)(e) "encrypting relevant data at rest" (from 2027-12-11); ISO A.8.24 UNVERIFIED | **PARTIAL** | S3 SSE for attachments/avatars/backups (`models/lib/s3Encryption.js`), continuous backup encryption (`server/lib/continuousBackup/encryption.js`). Full backups (`server/lib/fullBackup.js`, 0 hits for `encrypt`), filesystem/GridFS attachments and the database itself are not encrypted by WeKan. | Smallest: document "use an encrypted volume / database encryption" + optional passphrase encryption of full backups reusing `continuousBackup/encryption.js`. App-level file encryption is P3. | Admin Panel / Attachments / Backup | P2 (docs) / P3 (feature) |
|
||||
| 3.13 | Backup and restore, tested | [NIS2] Art. 21(2)(c); [GDPR] Art. 32(1)(c); [HIPAA] § 164.308(a)(7)(ii)(A),(B) (Required); ISO A.8.13 / SOC2 A1.2 UNVERIFIED | **EXISTS** | Admin Panel / Attachments / Backup, Continuous backup, `restoreBackup`, `backupRuns` status, `tests/integration/continuousBackup.test.cjs`. | Optional "restore test" result shown (P3). | - | - |
|
||||
| 3.14 | Integrity | [HIPAA] § 164.312(c)(1), (c)(2) (Addressable); [GDPR] Art. 32(1)(b); [CRA] Annex I Part I(2)(f); ISO / SOC2 PI1 UNVERIFIED | **EXISTS** | File integrity scan (`models/lib/fileIntegrity.js`, Problems / Filesystem integrity), hash-chained change history with scan (`server/lib/historyIntegrityScan.js`, `models/lib/changeHistoryIntegrity.js`), data health. | - | - | - |
|
||||
| 3.15 | Data minimisation switches | [GDPR] Art. 5(1)(c), Art. 25(2); [CRA] Annex I Part I(2)(g); [LGPD] Art. 6(III) (UNVERIFIED, not read); 27701 UNVERIFIED | **EXISTS** | Anonymise import/export users, disable import/export avatars, disable all activities/notifications/watch, private boards only, hide identity in webhooks. | Add "do not record login addresses" switch next to 2.6 (P3). | - | P3 |
|
||||
| 3.16 | Secure configuration baseline / hardening guidance | [CRA] Annex I Part I(2)(b) secure by default (from 2027-12-11), Annex II point 8(a); [NIS2] Art. 21(2)(e),(g); [HIPAA] § 164.306 (flexibility of approach); ISO A.8.9 UNVERIFIED | **PARTIAL** | Many secure defaults; `docs/Security/Security-Settings.md`. No per-framework checklist. Searched `HIPAA` (1 hit, `docs/Features/Login-Page/Multitenancy.md`), `NIS2`, `27001` - none. | `docs/Security/Compliance/README.md` (+ GDPR, HIPAA, NIS2/ISO pages) mapping each control to its setting; optionally a read-only "Compliance checklist" in Admin Panel showing which recommended settings are on (2FA required, idle logout set, HTTPS, retention set, audit retention ≥ 6 y for HIPAA...). | Admin Panel / Problems / **Compliance** (read-only checklist) | P2 |
|
||||
|
||||
## 4. Logging and monitoring
|
||||
|
||||
| # | Requirement | Legal basis (exact provision; key links to official source) | Status | Evidence | What is missing / smallest addition | Menu | Prio |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| 4.1 | Audit log of administrative actions | [HIPAA] § 164.312(b), § 164.308(a)(1)(ii)(D); [CRA] Annex I Part I(2)(l) (from 2027-12-11); [NIS2] Art. 21(2)(b); ISO A.8.15 / SOC2 CC7.2, CC8.1 UNVERIFIED | **EXISTS** | `server/adminAudit.js` wraps `AUDITED_METHODS` (`models/lib/adminAudit.js`), secrets redacted, failures recorded; Admin Panel / People / Audit log. | Done (commit 377a7b3abc and the follow-up): the admin-only collections written from the browser (settings, announcements, translation, accessibilitySettings, lockoutSettings, inviteToBoardRolesSettings, attachmentStorageSettings, accountSettings, tableVisibilityModeSettings) through their /insert, /update and /remove methods, and `anonymizeUser`, are in `AUDITED_COLLECTIONS`/`AUDITED_METHODS`. Still open: the DSAR export (WP-5) when it exists; custom board roles are board admins' writes, not site settings. | Admin Panel / People / Audit log | P1 |
|
||||
| 4.2 | Audit of access to / export of data (who exported which board, downloaded attachments in bulk, impersonated) | [HIPAA] § 164.312(b); [GDPR] Art. 32(1)(b), Art. 5(2) accountability (UNVERIFIED, not re-read); [CRA] Annex I Part I(2)(l) "access to or modification of data"; ISO A.8.15 / SOC2 CC7.2 / 27701 UNVERIFIED | **PARTIAL** | Impersonation recorded with reason; refused exports logged (`authz.export-disabled`). Successful exports not recorded (searched `export` in `server/adminAudit.js` / `models/lib/adminAudit.js`). | A "data access" stream: one row per export (who, board/format, IP) written from `refuseDisabledExport`'s success path and `server/routes/exportAllBoards.js`; fold per user/day to avoid growth (CLAUDE.md summary rule). Board-view logging is P3 (high volume). | Admin Panel / People / Audit log (tab "Data access") | P2 |
|
||||
| 4.3 | Audit log export / SIEM forwarding | [NIS2] Art. 21(2)(b), Art. 23(4) (24 h / 72 h reports need evidence); [HIPAA] § 164.308(a)(1)(ii)(D); ISO A.8.15-A.8.16 / SOC2 CC7 UNVERIFIED | **PARTIAL** | Login & registration webhook (`server/accountWebhook.js`, `docs/Features/Admin-Panel/Settings/Login-and-Registration-Webhook.md`). Security event fold writes only to DB (`server/lib/eventLogFold.js`, console only on `DEBUG`). No CSV/JSON download of audit log (`adminAuditLog.jade` has search + pager only). | (a) "Download CSV/JSON" on the Audit log and Security report; (b) env `AUDIT_LOG_STDOUT=json`: one JSON line per audit row and per security fold to stdout, so Docker/journald/Fluent Bit ship it to a SIEM - no new dependency. | Admin Panel / People / Audit log; Problems / Security report | P2 |
|
||||
| 4.4 | Log integrity (tamper evidence) | [HIPAA] § 164.312(c)(1); [CRA] Annex I Part I(2)(f) "report on corruptions"; ISO A.8.15 / SOC2 UNVERIFIED | **PARTIAL** | Change history is hash-chained; `adminAuditLog` is a plain collection. | Chain audit rows with `models/lib/changeHistoryIntegrity.js` (`hashHistoryRow`, `previousHash`) and verify in Problems / Integrity. | Admin Panel / Problems / Integrity | P3 |
|
||||
| 4.5 | Security monitoring / detection | [NIS2] Art. 21(2)(b); [CRA] Annex I Part I(2)(l); ISO A.8.16 / SOC2 CC7.2 UNVERIFIED | **EXISTS** | Problems / Security report with catalog `models/lib/securityCategories.js`, folded rows, account blocking; CPU/RAM/disk monitors; canary tokens (`models/lib/canaryTokens.js`). | - | - | - |
|
||||
| 4.6 | Clock synchronisation / timestamps in UTC | ISO A.8.17 UNVERIFIED (no statutory clock rule was found in the texts read) | **EXISTS (platform)** | Dates stored as BSON Date (UTC); NTP is the host's job. | Mention in compliance guide. | - | P3 |
|
||||
|
||||
## 5. Incident and vulnerability handling
|
||||
|
||||
| # | Requirement | Legal basis (exact provision; key links to official source) | Status | Evidence | What is missing / smallest addition | Menu | Prio |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| 5.1 | Coordinated vulnerability disclosure policy | [CRA] Art. 13(8) last subpara. + Annex I Part II(5),(6) (manufacturer duty from 2027-12-11, if WeKan is a manufacturer - see CRA note); [CRA] Art. 24(1) is the steward equivalent; [NIS2] Art. 12(1) only sets up national CSIRT coordinators (useful route, not a duty on WeKan); ISO A.5.7/A.8.8 UNVERIFIED | **EXISTS** | `SECURITY.md` (GHSA process, CVE policy), Hall of Fame, `docs/Security/Security-Disclosure.md`. | - | - | - |
|
||||
| 5.2 | Support period / which versions get security updates | [CRA] Art. 13(8) (support period at least five years unless shorter use expected), Art. 13(9) (updates kept available 10 years), Art. 13(19) (end month/year stated), Annex II point 7 - from 2027-12-11, for a manufacturer | **MISSING** | `SECURITY.md` "About WeKan Versions" (line 77) describes Standalone vs Sandstorm; grep `supported versions|only the newest|latest version` - none. | One section in `SECURITY.md`: "Security fixes are released for the newest release only; upgrade to stay supported", plus the CRA support period statement. | docs | P2 |
|
||||
| 5.3 | SBOM | [CRA] Annex I Part II(1) - SBOM must be **drawn up** (top-level dependencies, machine-readable) and kept in the technical documentation; giving it to users is optional (Annex II point 9: "If the manufacturer decides"). Applies 2027-12-11. [EO14028] binds US federal procurement only. NIS2 Art. 21(2)(d) supply chain is the operator's duty. | **MISSING** | Docker SBOM deliberately off, pinned by `tests/dockerProvenance.test.cjs` "SBOM stays off, deliberately" (attestation size); maintainer-side `docs/Security/gh/pull-security-reports.sh` pulls GitHub's `sbom.json` locally. | Publish a CycloneDX SBOM as a **release asset** (not an image attestation, so the size concern does not apply): `npm sbom --sbom-format cyclonedx` (npm ≥ 10, already the pinned toolchain) in `release-all.yml` for the app + `.meteor/versions` packages; link it from Admin Panel / Settings / Version. Keep the Docker test as is. | Admin Panel / Settings / Version (link) | P2 |
|
||||
| 5.4 | Security update notification to operators | [CRA] Annex I Part II(8) (disseminate security updates with advisory messages), Art. 14(8) inform impacted users (applies since 2026-09-11 for a manufacturer); [NIS2] Art. 21(2)(e) | **PARTIAL** | Admin Panel / Settings / Version "Check for a newer version" (`checkNewestVersions`, `server/statistics.js:14`, `models/lib/versionCheck.js`). | Mark releases that contain security fixes (CHANGELOG has `CRITICAL SECURITY ISSUE` headers) and show "security update available" in Problems / Summary. | Admin Panel / Problems / Summary | P3 |
|
||||
| 5.5 | `/.well-known/security.txt` (RFC 9116) for the operator's contact | No law requires security.txt: [RFC9116] is a standard. Legal hook: [CRA] Art. 13(17) single point of contact, Annex I Part II(6), Annex II point 2 (manufacturer, from 2027-12-11). ISO A.5.5 UNVERIFIED | **MISSING** | `.well-known` routes: only `assetlinks.json` (`server/routes/customHeadAssets.js:92`) and `webfinger` (`server/activityPub.js:85`). | Serve `security.txt` from a "Security contact" field in the Privacy pane (contact, expires, policy URL defaulting to WeKan's SECURITY.md), same handler pattern as `serveAssetLinks`. | Admin Panel / Settings / Privacy | P2 |
|
||||
| 5.6 | Breach support: find who/what was affected and export it | [GDPR] Art. 33(1) (72 h), Art. 34; [HIPAA] §§ 164.400-414; [CCPA] § 1798.82 (breach statute is outside the CCPA title - UNVERIFIED, not read); [LGPD] Art. 48; [PIPEDA] s. 10.1(1); [AUPA] Part IIIC s. 26WE, 26WK; [POPIA] s. 22(1); [PIPL] Art. 57; [APPI] Art. 26; [NIS2] Art. 23(4); [CRA] Art. 14(3)-(4) severe incidents (since 2026-09-11, manufacturer) | **PARTIAL** | Security report (who, from where, counts), login addresses per user, Boards report (members per board), audit log. Nothing exportable (see 3.8/4.3). | The CSV exports of 3.8b/4.3a cover it: People (with e-mail), Boards report (members), Security report rows, Audit log - filtered by date. A breach *register* is organisational - optional template in docs. | Admin Panel table pages | P2 |
|
||||
| 5.7 | Incident notification channel to admins | [NIS2] Art. 23(4); DE [BSIG] § 32(1); [CRA] Art. 14 (since 2026-09-11); SOC2 CC7.3 UNVERIFIED | **EXISTS** | Admin notify defaults (`setAdminNotifyDefault` in `AUDITED_METHODS`), Problems / Summary, login webhook. | - | - | - |
|
||||
|
||||
## 6. Accessibility
|
||||
|
||||
| # | Requirement | Legal basis (exact provision; key links to official source) | Status | Evidence | What is missing / smallest addition | Menu | Prio |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| 6.1 | Accessibility statement page | [WAD] Art. 7(1) accessibility statement - **public sector bodies only** (websites since 2019/2020, apps since 2021-06-23). Not EAA: EAA Annex V is the service-provider information in the terms and conditions ([EAA] Art. 13(2)), and a kanban tool is not an EAA service ([EAA] Art. 2(2)) - corrected. | **EXISTS** | `/accessibility` route (`config/router.js:355`), `models/accessibilitySettings.js` (enabled/title/body), Admin Panel / Settings / Accessibility (`settingBody.jade:734`). | Statement template text with the required parts (compliance status, non-accessible content, feedback contact, enforcement procedure, date) as the default body; link it from the login footer (WP-1). | Admin Panel / Settings / Accessibility | P2 |
|
||||
| 6.2 | Skip link, focus visible, keyboard, screen reader basics | [WAD] Art. 4 via [EN301549] V3.2.1 (WCAG 2.1 AA) for public bodies; [EAA] Art. 4(3), Annex I only for in-scope consumer services (since 2025-06-28; microenterprises exempt, Art. 4(5)) (WAD Art. 4 UNVERIFIED, not re-read) | **EXISTS** | Skip link (`client/components/main/layouts.jade`, `layouts.css`), `tests/playwright/specs/19-accessibility.e2e.js`, `45-axe-accessibility.e2e.js`, `46-axe-theme-contrast.e2e.js`, keyboard move/copy (`move-copy-keyboard-shortcut-6904.e2e.js`), `prefers-reduced-motion` in several CSS files, `docs/Features/General/Accessibility/Audit.md`. | - | - | - |
|
||||
| 6.3 | WCAG 2.2-only criteria (2.4.11 Focus Not Obscured, 2.5.7 Dragging Movements, 2.5.8 Target Size 24px, 3.2.6 Consistent Help, 3.3.7 Redundant Entry, 3.3.8 Accessible Authentication) | [WCAG22] (W3C Recommendation 12 Dec 2024) - voluntary today: the harmonised [EN301549] V3.2.1 references WCAG 2.1; an EN revision referencing 2.2 is UNVERIFIED | **PARTIAL** | Axe tags `['wcag2a','wcag2aa','wcag21a','wcag21aa','best-practice']` (`tests/playwright/specs/45-axe-accessibility.e2e.js:19`) - no `wcag22aa`; docs say "WCAG 2.1 AA". `TODO.md:37-40` lists the work. Passkeys and paste-friendly password fields help 3.3.8; card move has a non-drag menu (2.5.7) but list/swimlane reorder needs checking. | Add `wcag22aa` to TAGS, fix findings, add a target-size test and a non-drag reorder path for lists/swimlanes; update the docs' target to 2.2. | - (tests + CSS) | P2 |
|
||||
|
||||
## 7. Legal pages and transparency
|
||||
|
||||
| # | Requirement | Legal basis (exact provision; key links to official source) | Status | Evidence | What is missing / smallest addition | Menu | Prio |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| 7.1 | Privacy notice shown at collection time (registration, login) | [GDPR] Art. 13(1)-(2); [CCPA] § 1798.100(a); [LGPD] Art. 9; [PIPEDA] Principles 4.2 (UNVERIFIED), 4.8; [AUPA] APP 1, APP 5.1; [PIPL] Art. 17; [DPDP] s. 5 (date UNVERIFIED); [APPI] Art. 21; [POPIA] s. 18(1) | **MISSING** | Only external `legalNotice` URL (see 1.7). Searched `privacy policy|privacyPolicy|privacy-policy` - no app hits (only a GitHub workflow and translation audit doc); no `privacy` i18n key. | Built-in pages like `/accessibility` and `/support`: `/privacy` rendered from a new `LegalPages` collection (or fields on `AccessibilitySettings`' pattern) with `title`, `body` (markdown), `version`, `modifiedAt`, `enabled`; or an external URL per page for orgs that host it elsewhere (keep `legalNotice` as the "imprint/legal notice" URL for backward compatibility). Default body generated from the inventory + retention (2.1/2.10) so it is accurate out of the box. | Login page footer; Member menu "Privacy"; Admin Panel / Settings / Privacy | P1 |
|
||||
| 7.2 | Terms of use page | No statutory duty found for a generic terms page; contract/consumer law of the operator. EU consumer contracts: [ECD] Art. 10-11 (UNVERIFIED, not read). CCPA/DPDP references removed (they require privacy notices, not terms). | **PARTIAL** | Same `legalNotice` link. | `/terms` page in the same mechanism. | Login footer | P2 |
|
||||
| 7.3 | Imprint / legal notice | DE [DDG5] § 5(1) DDG (replaced § 5 TMG on 2024-05-14); AT [ECG5] § 5(1) ECG + [MedienG] § 24 (Impressum), § 25 (Offenlegung on a website); EU baseline [ECD] Art. 5(1); UK [UKECR6] reg. 6(1); FR/CH/NL/LU/FI equivalents UNVERIFIED | **PARTIAL** | `legalNotice` (`models/settings.js:477`), per-org `orgLegalNotice` (`models/org.js:169`, tenant override `models/lib/tenants.js`). Shown on login page only, as an external URL behind the sentence "By continuing, you accept our legal notice" (`client/components/main/layouts.jade:136-141`). § 5 DDG requires the data to be "leicht erkennbar und unmittelbar erreichbar" and "ständig verfügbar" (§ 5 ECG: "ständig ... leicht und unmittelbar zugänglich"), so a login-page-only link does not reach logged-in users and an unset URL leaves nothing. The duty is the **operator's** (a commercially offered instance), not WeKan's; WeKan only has to make it possible. | An **Imprint** page in the WeKan legal-pages mechanism (WP-6): `/imprint` with structured fields - name / company and legal form, representative, postal address, e-mail and a fast contact channel, register and register number, VAT ID, supervisory authority, professional rules (all optional, rendered only when filled), plus AT MedienG § 25 Offenlegung text and a free-text body; or keep `legalNotice` as an external URL override (backward compatible) and per-org `orgLegalNotice`. Link it from every page: login page footer, the logged-in Member menu, and the footer of `/privacy`, `/terms`, `/cookies`, `/accessibility`. Problems / Compliance (WP-12) warns "Imprint not set" (information, not error: an internal instance may not need one). Do **not** keep "you accept our legal notice": an imprint is information, not a contract. | Login page footer "Imprint"; Member menu / Privacy and my data / Imprint; editor in Admin Panel / Settings / **Privacy** / Legal pages / Imprint | P1 for commercially offered instances in DE/AT (P2 overall) |
|
||||
| 7.4 | Cookie / local storage information | [EPD] Art. 5(3) ("clear and comprehensive information"); DE [TDDDG25] § 25; UK [PECR6] reg. 6; [GDPR] Art. 13 | **MISSING** | see 1.8 | Section of the privacy page (or `/cookies`): `meteor_login_token` (HttpOnly, purpose, lifetime = `loginExpirationInDays`), localStorage keys. | Login footer | P2 |
|
||||
| 7.5 | DPO / privacy contact, representative | [GDPR] Art. 13(1)(b), Art. 27(1), Art. 37(1); [LGPD] Art. 41; [PIPL] Art. 52, Art. 53 (UNVERIFIED, Art. 53 not read); [PIPEDA] Principle 4.1; [POPIA] s. 55; [DPDP] s. 8(9)-(10) (UNVERIFIED sub-sections and date) | **MISSING** | Searched `DPO|data protection officer` - no app hits (only substrings like "enDPOint"). Support page (`/support`, `supportTitle`/`supportPageText`) is generic. | Fields "Privacy contact / DPO", "EU/UK representative" in the Privacy pane, shown on `/privacy`. | Admin Panel / Settings / Privacy | P1 |
|
||||
| 7.6 | DPA / BAA templates and operator guidance | [GDPR] Art. 28(3); [HIPAA] § 164.504(e), § 164.314(a) (§ 164.314 UNVERIFIED, not read) | **MISSING** | Searched `data processing agreement|DPA|BAA` - none. | Docs only: `docs/Security/Compliance/` with a hosting-provider DPA checklist and HIPAA BAA notes (WeKan is software; the hoster signs). | docs | P3 |
|
||||
| 7.7 | "Do not sell or share" link | [CCPA] § 1798.120 (UNVERIFIED, not re-read), § 1798.135(a)(1); only for a "business" (§ 1798.140(d)) | **EXISTS (N/A)** | WeKan does not sell or share personal data for cross-context advertising (no ad/analytics code; Matomo dead). | Sentence in the privacy page template. | - | P3 |
|
||||
|
||||
---
|
||||
|
||||
## Implementation plan (work packages, smallest-first within priority)
|
||||
|
||||
Placement rule: a new Admin Panel pane is added in `models/lib/adminUrls.js`
|
||||
(`ADMIN_PAGES.setting.panes` + `PANE_TITLES`), the menu entry in
|
||||
`client/components/settings/settingBody.js` (the list near line 245 where
|
||||
`accessibility-setting` is), the pane template in `settingBody.jade`, and is
|
||||
pinned by `tests/adminUrls.test.cjs`. **Pane id collision**: the existing
|
||||
Security pane's id is already `privacy-security-setting`
|
||||
(`adminUrls.js:61`), so the new pane must be slug `privacy`, id
|
||||
`privacy-setting`. New strings go into `imports/i18n/data/en.i18n.json` first
|
||||
and are filled for every language per CLAUDE.md. Each feature page gets a
|
||||
`docs/Features/...` page in the house shape. Each pane with a refusal path
|
||||
records attempts via `server/lib/securityLog.js` only when no legitimate user
|
||||
can reach it.
|
||||
|
||||
### P1
|
||||
|
||||
**WP-1 Audit-log completeness** (smallest P1). (Legal basis: [HIPAA] § 164.312(b), § 164.308(a)(1)(ii)(D); [GDPR] Art. 5(2), 32(1); [CRA] Annex I Part I(2)(l) from 2027-12-11.)
|
||||
- Add `anonymizeUser` (and later `exportUserPersonalData`) to `AUDITED_METHODS`
|
||||
in `models/lib/adminAudit.js`.
|
||||
- Server hooks `after.update`/`after.insert` on `Settings`,
|
||||
`AccessibilitySettings`, `AccountSettings`, `LockoutSettings`,
|
||||
`TableVisibilityModeSettings`, `InviteToBoardRolesSettings`,
|
||||
`CustomBoardRoles` in `server/adminAudit.js` recording
|
||||
`{ method: 'settings.update:<collection>', args: auditArgs(changed fields) }`
|
||||
for admin `userId`.
|
||||
- Fix: `removeUser`/`anonymizeUser` self path check `allowUserDelete` and the
|
||||
last-admin rule (`server/models/users.js`, `models/lib/userAnonymization.js`).
|
||||
- Tests: extend `tests/adminAudit.test.cjs`; new negative test scanning
|
||||
`server/**/*.js` (skip `_build/`) for admin-gated `Meteor.methods` that are
|
||||
neither audited nor on a read-only allowlist.
|
||||
- Menu: Admin Panel / People / Audit log (unchanged).
|
||||
|
||||
**WP-2 Login/IP data retention.** (Legal basis: [GDPR] Art. 5(1)(e); [POPIA] s. 14(1); [PIPEDA] Principle 4.5.3; [AUPA] APP 11.2.)
|
||||
- `LOGIN_ADDRESS_RETENTION_DAYS` (default 365, 0 = keep) in
|
||||
`models/lib/loginTally.js` (pure cutoff) + daily claimed job in
|
||||
`server/lib/loginTally.js` (pattern: `claimDailyJob` in `models/eventLog.js`)
|
||||
over `users.loginAddresses.entries`, `loginAddresses`,
|
||||
`shortPasswordLogins`; apply `ADMIN_AUDIT_RETENTION_DAYS` to
|
||||
`impersonatedUsers`.
|
||||
- Admin override in Admin Panel / People / Login (`models/lib/authConfigCatalog.js`).
|
||||
- Tests: `tests/loginAddressRetention.test.cjs` (positive: old entry removed;
|
||||
negative: recent kept, 0 keeps everything).
|
||||
|
||||
**WP-3 Personal-data inventory (foundation for WP-4, WP-5, WP-7).** (Legal basis: [GDPR] Art. 30(1); [LGPD] Art. 37; [PIPL] Art. 51.)
|
||||
- `models/lib/personalDataInventory.js` (pure, CommonJS) classifying all ~170
|
||||
collections: categories, `subjectField(s)`, purpose, retention source,
|
||||
erasure action.
|
||||
- `tests/personalDataInventory.test.cjs`: every `new Mongo.Collection('x')` in
|
||||
`models/` and `server/` is classified (fails on a new unclassified one);
|
||||
every entry with a subject field has an erasure action.
|
||||
- Generated [Data-Inventory.md](Data-Inventory.md) (`releases/compliance/data-inventory.mjs`).
|
||||
- Done in [bfd83d09b6](https://github.com/wekan/wekan/commit/bfd83d09b6): 185 collections, 128 with
|
||||
personal data; the 40 collections nothing erases yet are `KNOWN_WP4_GAPS`
|
||||
in the test, the work list of WP-4. Remaining: the Admin Panel view (WP-6).
|
||||
|
||||
**WP-4 Complete erasure and anonymisation.** (Legal basis: [GDPR] Art. 17(1); [CCPA] § 1798.105(a); [LGPD] Art. 18; [PIPL] Art. 47; [CRA] Annex I Part I(2)(m) from 2027-12-11.)
|
||||
- Extend `buildUserDeletionCleanupPlan` (`models/lib/userDeletionCleanup.js`)
|
||||
from the inventory: remove `workloadAbsences`, `workloadCapacities`,
|
||||
`timeEntries` (or pseudonymise if billing requires keeping), `idleSessions`,
|
||||
`unsaved-edits`, `userPositionHistory`, `savedCardFilters`, `sessiondata`,
|
||||
`orgUser`, notification e-mail jobs, `shortPasswordLogins`; pull the user
|
||||
from `loginAddresses.users.entries`.
|
||||
- Extend `buildAnonymizeUpdate` (`models/lib/userAnonymization.js`) `$unset`:
|
||||
`loginAddresses`, `passkeys`, `sqrl`, `webPushSubscriptions`, `ntfy`,
|
||||
`profile.emailToCard`, `profile.emailBuffer`, `services` except
|
||||
`resume` cleared; rewrite `@username`/`requestedBy`/`assignedBy` with the
|
||||
existing `models/lib/importExportSecurity.js` helpers; apply the same side
|
||||
cleanup as deletion.
|
||||
- Tests: extend `tests/userDeletionCleanup.test.cjs`,
|
||||
`tests/userAnonymization.test.cjs`; negative test that the plan covers
|
||||
every inventory entry flagged `erasure: 'delete'`.
|
||||
- Menu: unchanged (People ⋯, Edit Profile) until WP-6 adds the Member Settings
|
||||
entry.
|
||||
|
||||
**WP-5 Personal-data export (access + portability).** (Legal basis: [GDPR] Art. 15(3), 20(1); [CCPA] § 1798.110(a); [PIPEDA] Principle 4.9; [AUPA] APP 12.1; [HIPAA] § 164.524.)
|
||||
- `server/lib/personalDataExport.js` driven by the inventory; route
|
||||
`GET /api/user/export?authToken=` (pattern of
|
||||
`server/routes/exportAllBoards.js`), ZIP of JSON + CSV; method
|
||||
`exportUserPersonalData(userId)` for admins (audited).
|
||||
- Secrets never exported (password hash, 2FA secret, resume tokens, passkey
|
||||
private material).
|
||||
- Tests: `tests/personalDataExport.test.cjs` (positive: own data, all
|
||||
inventory categories present; negative: another user's id refused for a
|
||||
non-admin, no secret field names in output), Playwright download test.
|
||||
- Menu: Member Settings / **Privacy and my data** / Download my data;
|
||||
Admin Panel / People / People ⋯ / Export personal data.
|
||||
|
||||
**WP-6 Legal pages + privacy contact + Member Settings "Privacy and my data".**
|
||||
- Legal basis: privacy notice [GDPR] Art. 13, [CCPA] § 1798.100(a) and the
|
||||
other rows of 7.1; imprint [DDG5] § 5 DDG, [ECG5] § 5 ECG, [MedienG]
|
||||
§§ 24-25, [ECD] Art. 5, [UKECR6] reg. 6 (row 7.3); cookies [EPD] Art. 5(3),
|
||||
[TDDDG25] § 25, [PECR6] reg. 6 (row 7.4); contacts [GDPR] Art. 13(1)(b),
|
||||
27, 37 (row 7.5).
|
||||
- `models/legalPages.js` (like `models/accessibilitySettings.js`): docs
|
||||
`privacy`, `terms`, `cookies`, `imprint`, each `{ enabled, url?, title,
|
||||
body, version, modifiedAt }`; the `imprint` doc also has structured fields
|
||||
`name`, `legalForm`, `representative`, `address`, `email`, `phoneOrForm`,
|
||||
`register`, `registerNumber`, `vatId`, `supervisoryAuthority`,
|
||||
`professionalRules`, `mediaDisclosure` (AT MedienG § 25), rendered only when
|
||||
filled; `legalNotice` / per-org `orgLegalNotice` stay as the external-URL
|
||||
override of `imprint` for backward compatibility. Settings fields
|
||||
`privacyContact`, `dpoContact`, `euRepresentative`, `securityContact`.
|
||||
- **Imprint is reachable from every page** (§ 5 DDG "unmittelbar erreichbar"
|
||||
and "ständig verfügbar"): login page footer, logged-in Member menu, and the
|
||||
footer of every legal page; not only the login page as today.
|
||||
- Routes `/privacy`, `/terms`, `/cookies`, `/imprint` in `config/router.js` next to
|
||||
`/accessibility` (line 355) with templates beside
|
||||
`client/components/main/accessibility.jade`; default privacy body generated
|
||||
from the inventory + retention values + enabled third parties.
|
||||
- Login page footer (`client/components/main/layouts.jade` around the
|
||||
`legalNoticeDiv`, line 136): links Privacy · Terms · Cookies · Accessibility
|
||||
· Imprint; replace the "By continuing, you accept our legal notice"
|
||||
wording with a neutral link list unless acceptance is required (WP-8).
|
||||
- Member menu (`client/components/users/userHeader.jade`): new entry
|
||||
"Privacy and my data" popup with: legal pages (incl. Imprint), Download my data (WP-5),
|
||||
Delete / Anonymise account (moved from Edit Profile), accepted versions
|
||||
(WP-8), own login history (WP-10).
|
||||
- Admin Panel / Settings / **Privacy** pane (`privacy-setting`): page editors
|
||||
(Privacy, Terms, Cookies, Imprint), contacts, read-only Retention table and Data inventory (from WP-3).
|
||||
- Remove dead Matomo code in `client/lib/utils.js` and its test, or gate it.
|
||||
- Tests: `tests/adminUrls.test.cjs` (new pane), `tests/legalPages.test.cjs`
|
||||
(publication exposes only enabled pages; non-admin cannot write; imprint
|
||||
renders only filled fields; negative test: no page template outside the
|
||||
login layout lacks the footer link when an imprint is set), Playwright:
|
||||
login footer links and the Member-menu Imprint link reach the pages, axe
|
||||
passes on them.
|
||||
|
||||
### P2
|
||||
|
||||
**WP-7 Retention overview + remaining retention knobs.** `ADMIN_AUDIT_RETENTION_DAYS`
|
||||
(`models/lib/adminAudit.js`), `ACTIVITIES_RETENTION_DAYS` (default off; never
|
||||
deletes `changeHistory`), `WORKLOAD_ABSENCE_RETENTION_DAYS` and an "absence
|
||||
type not recorded" switch; Retention table in the Privacy pane listing every
|
||||
inventory entry with its effective value. Menus: Admin Panel / People / Login,
|
||||
Settings / Activities and notifications, Settings / Features (Workload),
|
||||
Settings / Privacy. Tests: pure cutoff tests per knob + inventory test that
|
||||
each `retention.env` is read somewhere.
|
||||
|
||||
**WP-8 Versioned acceptance of terms/privacy.** (Legal basis: [GDPR] Art. 7(1) only where consent is the basis; otherwise contract law.) `users.legalAcceptances`,
|
||||
"require acceptance" setting per page, post-login gate modelled on
|
||||
`server/passwordChangeRequired.js` (methods refused until accepted, allowlist
|
||||
like `ALLOWED_METHODS` in `models/lib/twoFactorRequirement.js`), checkbox on
|
||||
registration. Menu: Admin Panel / Settings / Privacy; user sees accepted
|
||||
versions in Member Settings / Privacy and my data. Tests: pure gate decision,
|
||||
negative test that an un-accepted user cannot call a board method, Playwright
|
||||
accept flow.
|
||||
|
||||
**WP-9 CRA and disclosure items.** (Legal basis: [CRA] Art. 13(8), 13(17), 13(19), Annex I Part II(1), (5), (6), (8), Annex II points 2, 7, 9 - from 2027-12-11; Art. 14 reporting since 2026-09-11; only if WeKan is a manufacturer, see the CRA note. security.txt is [RFC9116], not law. The SBOM must be drawn up; publishing it is optional.) `/.well-known/security.txt` from
|
||||
`securityContact` (handler like `serveAssetLinks` in
|
||||
`server/routes/customHeadAssets.js`); `SECURITY.md` support-period section;
|
||||
CycloneDX SBOM release asset in `.github/workflows/release-all.yml` +
|
||||
link in Admin Panel / Settings / Version; `docs/Security/Compliance/` guide
|
||||
(GDPR, HIPAA, NIS2/ISO/SOC2 mapping, recommended settings, encryption-at-rest
|
||||
guidance, break-glass procedure, DPA/BAA notes). Tests: route test for
|
||||
security.txt fields/Expires; workflow-source test that the SBOM step exists
|
||||
(leave `tests/dockerProvenance.test.cjs` SBOM-off assertion intact - it is
|
||||
about image attestations).
|
||||
|
||||
**WP-10 Exports for access reviews and incidents.** CSV export button on the
|
||||
shared table page (`client/components/settings/tablePage.*`,
|
||||
`models/lib/tablePage.js`) for People, Boards Report, Security report, Audit
|
||||
log (server-side, admin only, streamed); "Boards and roles" view in People ⋯;
|
||||
own login history in Member Settings / Privacy and my data. Tests: admin-only
|
||||
negative test, CSV columns test, no secret columns.
|
||||
|
||||
**WP-11 Data-access log + SIEM output.** Folded "data access" rows for
|
||||
successful exports (`server/routes/exportAllBoards.js`, board export methods,
|
||||
`exportUserPersonalData`) into Audit log tab; `AUDIT_LOG_STDOUT=json` line
|
||||
writer in `server/adminAudit.js` and `server/lib/eventLogFold.js`. Tests: fold
|
||||
keeps one row per user/day; stdout writer emits valid JSON and never a
|
||||
redacted value.
|
||||
|
||||
**WP-12 Compliance checklist pane.** Admin Panel / Problems / **Compliance**
|
||||
(slug `compliance`): read-only rows "2FA required for admins", "idle logout
|
||||
set", "HTTPS/HSTS", "login data retention set", "imprint set (information
|
||||
only)", "audit retention ≥ 2190 days
|
||||
(HIPAA deployments; 6 years is the § 164.316(b)(2)(i) documentation period,
|
||||
used here as a conservative choice for audit records)", "privacy page published", "backups encrypted", each linking to the
|
||||
pane that changes it. Pure `models/lib/complianceChecks.js` + test.
|
||||
|
||||
**WP-13 WCAG 2.2.** (Good practice: [WCAG22]; the legal baseline is [EN301549] V3.2.1 = WCAG 2.1 AA, via [WAD] for public bodies.) Add `wcag22aa` to `TAGS` in
|
||||
`tests/playwright/specs/45-axe-accessibility.e2e.js`, target-size and
|
||||
focus-not-obscured checks, non-drag reorder for lists/swimlanes, default
|
||||
statement template (6.1), docs to "WCAG 2.2 AA" (this is `TODO.md:37-40`).
|
||||
|
||||
**WP-14 Bugs found on the way.** Per-address login delay never applied
|
||||
(`TODO.md`), attachment-retention per-run limit mismatch (`TODO.md`).
|
||||
|
||||
### P3
|
||||
|
||||
- Active-session list with "end this session" (Member Settings) and admin
|
||||
"Log out this user" (People ⋯).
|
||||
- Hash-chained admin audit log verified in Problems / Integrity.
|
||||
- Passphrase encryption of full backups (reuse
|
||||
`server/lib/continuousBackup/encryption.js`); app-level encryption of
|
||||
filesystem attachments.
|
||||
- Optional minimum-age confirmation on registration.
|
||||
- "Security update available" flag in Problems / Summary.
|
||||
- (Imprint link in the logged-in Member menu moved to WP-6.) "Do not record login addresses"
|
||||
switch; delete/anonymise accounts N days after auto-disable.
|
||||
- Emergency-access impersonation category that notifies all admins.
|
||||
|
||||
## Search log (for MISSING claims)
|
||||
|
||||
Repository-wide `grep -rIl -i` excluding `node_modules`, `_build`, `.tools`,
|
||||
`.build`, `.meteor`, `imports/i18n`, `old-CHANGELOG`, for: `gdpr`,
|
||||
`privacy policy|privacyPolicy|privacy-policy`, `terms of service|termsOfService|terms-of-use|acceptTerms|termsAccepted`,
|
||||
`cookie consent|cookieConsent|cookie-banner`, `legalNotice|legal-notice`,
|
||||
`consent`, `anonymi`, `deleteAccount|delete-account|deleteUser|removeUser`,
|
||||
`exportMyData|exportUserData|downloadMyData|my-data|personal data`, `HIPAA`,
|
||||
`NIS2`, `27001`, `SBOM|cyclonedx|spdx`, `accessibility statement`,
|
||||
`skip-link|skip to main|skipLink`, `break.glass|emergency access`,
|
||||
`data processing agreement|DPA`, `DPO|data protection officer`, `retention`,
|
||||
`encrypt.*rest|at-rest|atRest`; plus targeted: `expireAfterSeconds`,
|
||||
`process.env.*(DAYS|RETENTION|KEEP)`, `LoginAddresses.remove`,
|
||||
`document.cookie|Cookies.set|analytics|matomo|plausible|gtag(`,
|
||||
`dateOfBirth|birthdate|minAge|parental`, `well-known`, `security.txt`,
|
||||
`openai|anthropic|ollama|llm|chatgpt|gemini`, `loginTally|loginAddresses` in
|
||||
`client/`, `csv|export|download` in the table page, and the English catalog
|
||||
for `privacy|cookie|terms` keys.
|
||||
|
||||
## Legal sources
|
||||
|
||||
Checked 2026-11-22. Version, HTTP status, application date and quotations:
|
||||
[Sources.md](Sources.md). EUR-Lex links answer
|
||||
HTTP 202 (AWS WAF challenge) to scripts but open in a browser; their text was
|
||||
verified through Pandex and the Publications Office Cellar.
|
||||
|
||||
[GDPR]: https://eur-lex.europa.eu/eli/reg/2016/679/oj "Regulation (EU) 2016/679, consolidated 2016-05-04, applies since 2018-05-25"
|
||||
[EPD]: https://eur-lex.europa.eu/eli/dir/2002/58/oj "Directive 2002/58/EC, consolidated 2009-12-19"
|
||||
[NIS2]: https://eur-lex.europa.eu/eli/dir/2022/2555/oj "Directive (EU) 2022/2555, national measures from 2024-10-18"
|
||||
[CRA]: https://eur-lex.europa.eu/eli/reg/2024/2847/oj "Regulation (EU) 2024/2847, Art. 14 from 2026-09-11, rest from 2027-12-11"
|
||||
[EAA]: https://eur-lex.europa.eu/eli/dir/2019/882/oj "Directive (EU) 2019/882, applies from 2025-06-28"
|
||||
[WAD]: https://eur-lex.europa.eu/eli/dir/2016/2102/oj "Directive (EU) 2016/2102"
|
||||
[DA]: https://eur-lex.europa.eu/eli/reg/2023/2854/oj "Regulation (EU) 2023/2854, applies from 2025-09-12"
|
||||
[ECD]: https://eur-lex.europa.eu/eli/dir/2000/31/oj "Directive 2000/31/EC"
|
||||
[AIA]: https://eur-lex.europa.eu/eli/reg/2024/1689/oj "Regulation (EU) 2024/1689 as amended by (EU) 2026/1744"
|
||||
[DDG5]: https://www.gesetze-im-internet.de/ddg/__5.html "§ 5 DDG, last amended 2026-05-12"
|
||||
[TDDDG25]: https://www.gesetze-im-internet.de/ttdsg/__25.html "§ 25 TDDDG"
|
||||
[BSIG]: https://www.gesetze-im-internet.de/bsig_2025/__30.html "BSIG 2025 § 30 (NIS2 implementation, Germany)"
|
||||
[ECG5]: https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=20001703 "E-Commerce-Gesetz, Fassung vom 22.11.2026"
|
||||
[MedienG]: https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=10000719 "Mediengesetz, Fassung vom 22.11.2026"
|
||||
[UKECR6]: https://www.legislation.gov.uk/uksi/2002/2013/regulation/6 "SI 2002/2013 reg. 6"
|
||||
[PECR6]: https://www.legislation.gov.uk/uksi/2003/2426/regulation/6 "SI 2003/2426 reg. 6, substituted 2026-02-05"
|
||||
[HIPAA]: https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164 "45 CFR Part 164, eCFR up to date 2026-11-19"
|
||||
[COPPA]: https://www.ecfr.gov/current/title-16/chapter-I/subchapter-C/part-312 "16 CFR Part 312"
|
||||
[CCPA]: https://cppa.ca.gov/pdf/20260101_ccpa_statute.pdf "Cal. Civ. Code 1798.100 et seq., effective 2026-01-01 (official host leginfo.legislature.ca.gov answers 403 to scripts)"
|
||||
[LGPD]: https://www.planalto.gov.br/ccivil_03/_ato2015-2018/2018/lei/l13709compilado.htm "Lei 13.709/2018, texto compilado"
|
||||
[PIPEDA]: https://laws-lois.justice.gc.ca/eng/acts/P-8.6/FullText.html "S.C. 2000, c. 5, current to 2026-10-29"
|
||||
[AUPA]: https://www.legislation.gov.au/C2004A03712/latest/text "Privacy Act 1988, compilation C2026C00227 (2026-06-04)"
|
||||
[PIPL]: http://www.npc.gov.cn/npc/c2/c30834/202108/t20210820_313088.html "PIPL, in force 2021-11-01"
|
||||
[DPDP]: https://www.meity.gov.in/static/uploads/2024/06/2bf1f0e9f04e6fb4f8fef35e82c42aa5.pdf "DPDP Act 2023 (No. 22 of 2023); commencement dates UNVERIFIED"
|
||||
[APPI]: https://www.japaneselawtranslation.go.jp/en/laws/view/4241/en "APPI (Act No. 57 of 2003), translation of Act No. 37 of 2021; Japanese text authoritative"
|
||||
[POPIA]: https://www.gov.za/sites/default/files/gcis_document/201409/3706726-11act4of2013popi.pdf "POPIA (Act 4 of 2013) as enacted"
|
||||
[WCAG22]: https://www.w3.org/TR/WCAG22/ "WCAG 2.2, W3C Recommendation 12 December 2024"
|
||||
[EN301549]: https://www.etsi.org/deliver/etsi_en/301500_301599/301549/03.02.01_60/en_301549v030201p.pdf "EN 301 549 V3.2.1 (2021-03)"
|
||||
[ISO27001]: https://www.iso.org/standard/27001 "ISO/IEC 27001:2022 - UNVERIFIED (403, paywalled)"
|
||||
[ISO27701]: https://www.iso.org/standard/27701 "ISO/IEC 27701 - UNVERIFIED (403, paywalled)"
|
||||
[SOC2]: https://www.aicpa-cima.com/resources/download/2017-trust-services-criteria-with-revised-points-of-focus-2022 "AICPA TSC 2017 (rev. 2022) - UNVERIFIED (gated)"
|
||||
[RFC9116]: https://www.rfc-editor.org/rfc/rfc9116.html "RFC 9116"
|
||||
[NIST63B]: https://pages.nist.gov/800-63-4/sp800-63b.html "NIST SP 800-63B-4"
|
||||
[EO14028]: https://www.federalregister.gov/documents/2021/05/17/2021-10460/improving-the-nations-cybersecurity "Executive Order 14028"
|
||||
@@ -0,0 +1,572 @@
|
||||
# WeKan compliance gap analysis - legal sources (checked 2026-11-22)
|
||||
|
||||
Companion to [README.md](README.md). Every legal citation in
|
||||
that report points at an entry below. Each entry gives the official
|
||||
identifier, the official link, what the link answered on 2026-11-22, the
|
||||
version/consolidation that was read, the date the obligation **applies**, and
|
||||
a short quotation of the sentence the report relies on.
|
||||
|
||||
Method, following the lesson of the Pandex HN thread
|
||||
(<https://news.ycombinator.com/item?id=50593481>): no text was taken from
|
||||
memory. Each article was read from an official publisher or from Pandex
|
||||
(<https://www.pandex.io>, MCP endpoint `https://api.pandex.io/mcp`, which
|
||||
serves the Publications Office / national official texts; only law-lookup
|
||||
queries were sent, no repository or personal data). Pandex allows 50
|
||||
anonymous requests per day; when that ran out, EU texts were read from the
|
||||
Publications Office's own Cellar (`publications.europa.eu/resource/celex/...`)
|
||||
and amendments were checked with the Cellar SPARQL endpoint
|
||||
(`cdm:resource_legal_amends_resource_legal`). Link checks used
|
||||
`curl -s -o /dev/null -w '%{http_code}' -L -A 'WeKan-compliance-link-check/1.0'`.
|
||||
**EUR-Lex note.** Every `eur-lex.europa.eu` and `data.europa.eu/eli` link
|
||||
answers **HTTP 202 with an empty body and `x-amzn-waf-action: challenge`**
|
||||
(AWS WAF bot challenge) to any non-browser client. The links are correct and
|
||||
open in a browser; the text behind them was verified through Pandex and
|
||||
Cellar instead, which hold the same Official Journal documents.
|
||||
|
||||
Status words: **VERIFIED** (text read from an official source, quote below),
|
||||
**UNVERIFIED** (could not be confirmed in an official source - reason given;
|
||||
the report does not rely on it as fact).
|
||||
|
||||
---
|
||||
|
||||
## Which obligations apply on 2026-11-22
|
||||
|
||||
| Applies today | Applies later | Not applicable to WeKan as such |
|
||||
|---|---|---|
|
||||
| GDPR (since 2018-05-25); ePrivacy Art. 5(3) as transposed (DE § 25 TDDDG; UK PECR reg. 6 as substituted 2026-02-05); NIS2 national laws (Member State measures from 2024-10-18; DE BSIG 2025 of 2025-12-02) - for operators that are essential/important entities; EAA (since 2025-06-28) - only for in-scope consumer services; Web Accessibility Directive (public-sector sites since 2019/2020, apps since 2021-06-23); Data Act (since 2025-09-12, Chapter VI switching for SaaS/cloud providers); e-Commerce Dir. Art. 5 / § 5 DDG (since 2024-05-14) / § 5 ECG / MedienG § 24-25; **CRA Art. 14 reporting (since 2026-09-11)** and CRA Chapter IV (since 2026-06-11); HIPAA Security Rule (unchanged since 2013); CCPA/CPRA statute (version effective 2026-01-01) and CCPA regulations (effective 2026-01-01); LGPD (sanctions since 2021-08-01); PIPEDA; Australian Privacy Act (compilation C2026C00227, 2026-06-04); PIPL (since 2021-11-01); APPI; POPIA | **CRA in full: 2027-12-11** (Art. 71(2)) - incl. Art. 13 manufacturer duties, Annex I, Art. 24 steward duties; CCPA ADMT regulations: compliance by **2027-01-01** (11 CCR § 7200(b)); HIPAA Privacy Rule amendment to § 164.524 etc.: effective **2027-01-19** (91 FR 74848); EAA Art. 4(8) derogation up to 2027-06-28, service-provider transition to 2030-06-28 (Art. 32); AI Act high-risk chapters 2027-12-02 / 2028-08-02 (as amended by Reg. (EU) 2026/1744); India DPDP core duties (UNVERIFIED date, reported as 2027-05-13); HIPAA Security Rule NPRM of 2025-01-06 (proposed only, not law) | AI Act (no AI system in WeKan); eIDAS (no trust services); EO 14028 (binds US federal agencies/their suppliers, not WeKan); NIS2 directly (it binds entities, not software) |
|
||||
|
||||
---
|
||||
|
||||
## EU instruments
|
||||
|
||||
### [GDPR] Regulation (EU) 2016/679 - VERIFIED
|
||||
- Link: <https://eur-lex.europa.eu/eli/reg/2016/679/oj> (202 WAF challenge; ELI
|
||||
`http://data.europa.eu/eli/reg/2016/679/oj`). CELEX 32016R0679.
|
||||
- Version read: Pandex `eu.legislation:32016R0679`; latest consolidation in
|
||||
Cellar `02016R0679-20160504` (corrigendum). Cellar lists **no amending act**
|
||||
(SPARQL, 2026-11-22).
|
||||
- Applies: from 25 May 2018 (Art. 99(2): "It shall apply from 25 May 2018.").
|
||||
- Quotes:
|
||||
- Art. 5(1)(e): "kept in a form which permits identification of data
|
||||
subjects for no longer than is necessary for the purposes".
|
||||
- Art. 7(1): "the controller shall be able to demonstrate that the data
|
||||
subject has consented".
|
||||
- Art. 8(1): child "at least 16 years old ... Member States may provide by
|
||||
law for a lower age ... not below 13 years."
|
||||
- Art. 9(1)/(2)(b): special categories incl. health; employment-law
|
||||
exception.
|
||||
- Art. 13(1): information "at the time when personal data are obtained";
|
||||
(1)(b) "contact details of the data protection officer"; (2)(a) storage
|
||||
period.
|
||||
- Art. 15(3): "The controller shall provide a copy of the personal data
|
||||
undergoing processing ... in a commonly used electronic form."
|
||||
- Art. 17(1): "the right to obtain from the controller the erasure of
|
||||
personal data concerning him or her without undue delay".
|
||||
- Art. 18(1), Art. 21(1): restriction; objection to Art. 6(1)(e)/(f)
|
||||
processing.
|
||||
- Art. 20(1): data "in a structured, commonly used and machine-readable
|
||||
format".
|
||||
- Art. 22(1): no decision "based solely on automated processing".
|
||||
- Art. 25(2): "by default, only personal data which are necessary for each
|
||||
specific purpose".
|
||||
- Art. 27(1): EU representative where Art. 3(2) applies.
|
||||
- Art. 28: processor contract (the DPA).
|
||||
- Art. 30(1) record of processing; Art. 30(5): not for "fewer than 250
|
||||
persons unless ... not occasional, or ... special categories".
|
||||
- Art. 32(1)(a)-(d): encryption; "ongoing confidentiality, integrity,
|
||||
availability and resilience"; restore availability; regular testing.
|
||||
- Art. 33(1): notify "not later than 72 hours"; Art. 34 data subjects.
|
||||
- Art. 37(1): DPO when public authority / large-scale monitoring /
|
||||
large-scale special categories.
|
||||
- Art. 44-49: transfers (Chapter V); Art. 88: employment context.
|
||||
|
||||
### [EPD] Directive 2002/58/EC (ePrivacy) - VERIFIED
|
||||
- Link: <https://eur-lex.europa.eu/eli/dir/2002/58/oj> (202 WAF). Latest
|
||||
consolidation `02002L0058-20091219` (amended by 2006/24/EC, 2009/136/EC).
|
||||
- Applies: through national law (DE § 25 TDDDG, UK PECR reg. 6, ...).
|
||||
- Art. 5(3): storing or accessing information on the terminal "only allowed
|
||||
on condition that the subscriber or user concerned has given his or her
|
||||
consent ... This shall not prevent any technical storage or access ... as
|
||||
strictly necessary" for a service explicitly requested.
|
||||
|
||||
### [NIS2] Directive (EU) 2022/2555 - VERIFIED
|
||||
- Link: <https://eur-lex.europa.eu/eli/dir/2022/2555/oj> (202 WAF). Latest
|
||||
consolidation `02022L2555-20221227`; no amending act in Cellar.
|
||||
- Applies: national measures "from 18 October 2024" (Art. 41(1)); binds
|
||||
**entities** of Annex I/II that are medium-sized or larger (Art. 2(1)) or
|
||||
listed regardless of size (Art. 2(2)) - i.e. some WeKan **operators**, not
|
||||
WeKan.
|
||||
- Art. 21(2): measures (a) risk analysis ... (b) "incident handling" (c)
|
||||
"business continuity, such as backup management and disaster recovery" (d)
|
||||
supply chain (e) "vulnerability handling and disclosure" (f) effectiveness
|
||||
(g) cyber hygiene/training (h) "cryptography and, where appropriate,
|
||||
encryption" (i) "access control policies and asset management" (j)
|
||||
"multi-factor authentication or continuous authentication".
|
||||
- Art. 23(4): early warning "within 24 hours", notification "within 72 hours".
|
||||
- Art. 12(1): each Member State designates a CSIRT as CVD coordinator - an
|
||||
obligation of Member States, not of software projects.
|
||||
- National example - Germany: [BSIG] BSI-Gesetz 2025 (NIS2UmsuCG,
|
||||
Ausfertigung 02.12.2025, last amended 22.10.2026),
|
||||
<https://www.gesetze-im-internet.de/bsig_2025/__30.html> (200) § 30
|
||||
Risikomanagementmaßnahmen (point 10: "Multi-Faktor-Authentifizierung"),
|
||||
<https://www.gesetze-im-internet.de/bsig_2025/__32.html> (200) § 32
|
||||
Meldepflichten ("spätestens jedoch innerhalb von 24 Stunden").
|
||||
Exact in-force date of BSIG 2025: UNVERIFIED (not shown on the page read).
|
||||
|
||||
### [CRA] Regulation (EU) 2024/2847 (Cyber Resilience Act) - VERIFIED
|
||||
- Link: <https://eur-lex.europa.eu/eli/reg/2024/2847/oj> (202 WAF). CELEX
|
||||
32024R2847, consolidation `02024R2847-20241120`; Cellar lists one amending
|
||||
act, 32025R0327 (European Health Data Space Regulation), not relevant here.
|
||||
- Applies (Art. 71(2)): "This Regulation shall apply from 11 December 2027.
|
||||
However, Article 14 shall apply from 11 September 2026 and Chapter IV
|
||||
(Articles 35 to 51) shall apply from 11 June 2026." Art. 69(3): Art. 14
|
||||
applies also to products "placed on the market before 11 December 2027".
|
||||
- Art. 3(13) manufacturer: "a natural or legal person who develops ... and
|
||||
markets them under its name or trademark, whether for payment,
|
||||
monetisation or free of charge".
|
||||
- Art. 3(14) open-source software steward: "a **legal person**, other than a
|
||||
manufacturer, that has the purpose or objective of systematically providing
|
||||
support on a sustained basis for the development of specific products ...
|
||||
qualifying as free and open-source software and intended for commercial
|
||||
activities".
|
||||
- Art. 3(22) making available on the market: "in the course of a commercial
|
||||
activity, whether in return for payment or free of charge". Art. 3(48) FOSS.
|
||||
- Recital 15: commercial activity may be characterised "by charging a price
|
||||
for technical support services where this does not serve only the
|
||||
recuperation of actual costs, by an intention to monetise, for instance by
|
||||
providing a software platform through which the manufacturer monetises
|
||||
other services ... Accepting donations without the intention of making a
|
||||
profit should not be considered to be a commercial activity."
|
||||
- Recital 18: FOSS "not monetised by their manufacturers should not be
|
||||
considered to be a commercial activity"; "the mere presence of regular
|
||||
releases should not in itself lead to the conclusion" of commercial supply;
|
||||
contributors to projects "not under their responsibility" are out of scope.
|
||||
- Recital 19: stewards are "legal persons", e.g. "certain foundations as well
|
||||
as entities that develop and publish free and open-source software in a
|
||||
business context".
|
||||
- Art. 13(1) Annex I Part I; 13(8) vulnerabilities handled "for the support
|
||||
period"; support period "shall be at least five years" (unless expected
|
||||
use is shorter); 13(9) each security update available "for a minimum of 10
|
||||
years or for the remainder of the support period"; 13(17) "single point of
|
||||
contact"; 13(18) Annex II information; 13(19) support-period end date
|
||||
"including at least the month and the year".
|
||||
- Art. 14(1)-(2): actively exploited vulnerability - early warning "within 24
|
||||
hours", notification "within 72 hours", final report "no later than 14
|
||||
days after a corrective or mitigating measure is available"; 14(3)-(4)
|
||||
severe incidents; 14(8) inform impacted users.
|
||||
- Art. 24(1) steward cybersecurity policy; 24(2) cooperate with market
|
||||
surveillance; 24(3) Art. 14(1) applies to stewards "to the extent that they
|
||||
are involved in the development". Art. 64(10)(b): fines "shall not apply
|
||||
to ... any infringement of this Regulation by open-source software
|
||||
stewards".
|
||||
- Annex I Part I(2): (b) "secure by default configuration"; (d)
|
||||
"authentication, identity or access management systems"; (e) "encrypting
|
||||
relevant data at rest or in transit"; (f) integrity; (g) data
|
||||
minimisation; (l) "recording and monitoring relevant internal activity ...
|
||||
with an opt-out mechanism for the user"; (m) "securely and easily remove on
|
||||
a permanent basis all data and settings".
|
||||
- Annex I Part II: (1) "drawing up a software bill of materials in a commonly
|
||||
used and machine-readable format covering at the very least the top-level
|
||||
dependencies"; (2) remediate without delay, security updates separate from
|
||||
feature updates where feasible; (4) publish fixed vulnerabilities; (5)
|
||||
"policy on coordinated vulnerability disclosure"; (6) "contact address for
|
||||
the reporting"; (7) secure update distribution; (8) disseminate security
|
||||
updates without delay with advisory messages.
|
||||
- Annex II: 2 single point of contact and CVD policy; 7 "the end-date of the
|
||||
support period"; 8(d) "how user data can be securely removed"; 9 "**If the
|
||||
manufacturer decides** to make available the software bill of materials to
|
||||
the user, information on where" - i.e. publishing the SBOM is optional.
|
||||
|
||||
**CRA conclusion for WeKan.**
|
||||
1. *Steward regime (Art. 24) does not fit WeKan.* A steward must be a
|
||||
**legal person** (Art. 3(14), recital 19). WeKan's own commercial-support
|
||||
page (https://wekan.fi/commercial-support/) says "WeKan (VAT
|
||||
Number: FI34047245) is a Finnish Sole Proprietorship" - a natural person
|
||||
trading under a name, not a separate legal person. (That a Finnish
|
||||
toiminimi is not a legal person is general Finnish law and was not read
|
||||
from an official Finnish source here - UNVERIFIED detail.)
|
||||
2. *Is WeKan "made available on the market in the course of a commercial
|
||||
activity"?* The premise "free, non-commercial" is **not supported** by
|
||||
WeKan's own website: the same page offers paid features, fixes and
|
||||
support ("1 Support Case: 100 euro", "Hourly price: 100 euro/h", yearly
|
||||
plans 500-5000 euro) and an "Official SaaS with Admin Panel: 50
|
||||
euro/year". Under recital 15, "charging a price for technical support
|
||||
services where this does not serve only the recuperation of actual costs"
|
||||
or "an intention to monetise" can characterise commercial supply; the page
|
||||
also says "All grants and revenue are dedicated directly to the
|
||||
maintenance and FLOSS development of WeKan", which argues the other way.
|
||||
Recital 18 says regular releases and financial support do not by
|
||||
themselves make it commercial. **Result: a borderline case that the text
|
||||
does not settle. If the paid support/SaaS is treated as monetisation,
|
||||
Lauri Ojansivu is the *manufacturer* (Art. 3(13) includes natural
|
||||
persons, "free of charge" included) with full Art. 13/14 + Annex I/II
|
||||
duties; if not, WeKan is outside the CRA entirely (neither manufacturer
|
||||
nor steward).** The prudent reading is to prepare for manufacturer duties:
|
||||
Art. 14 reporting already applies (since 2026-09-11, also to products
|
||||
placed on the market before 2027-12-11, Art. 69(3)); the rest from
|
||||
2027-12-11. Obtain legal advice; guidance from the Commission on recital
|
||||
15 was not checked here.
|
||||
3. *Organisations that sell or integrate WeKan* (e.g. bundle it in a paid
|
||||
product) are manufacturers of their product and must do due diligence on
|
||||
it as a FOSS component (Art. 13(5)). *Organisations that only self-host
|
||||
WeKan* internally are users, not economic operators; a pure SaaS offering
|
||||
is outside the CRA (the CRA covers products; SaaS falls under NIS2 if the
|
||||
provider is in scope) - the SaaS recital was not re-read here, so that
|
||||
last point is UNVERIFIED.
|
||||
|
||||
### [EAA] Directive (EU) 2019/882 (European Accessibility Act) - VERIFIED
|
||||
- Link: <https://eur-lex.europa.eu/eli/dir/2019/882/oj> (202 WAF); read from
|
||||
Cellar (OJ text, consolidation `02019L0882-20190607`, no amending act).
|
||||
- Applies: national measures "from 28 June 2025" (Art. 31(2)); Art. 4(8)
|
||||
optional to 28 June 2027 (Art. 31(3)); transitional period for services to
|
||||
28 June 2030 (Art. 32(1)).
|
||||
- Scope Art. 2(2): only listed **services provided to consumers** -
|
||||
electronic communications, audiovisual access, passenger transport
|
||||
elements, consumer banking, e-books, "e-commerce services" ("with a view to
|
||||
concluding a consumer contract"). A B2B/internal kanban tool is **not** in
|
||||
that list. Art. 4(5): "Microenterprises providing services shall be exempt".
|
||||
- Art. 4(1) and Annex I: accessibility requirements. Art. 13(2) and
|
||||
**Annex V**: the service provider puts information "in the general terms
|
||||
and conditions, or equivalent document" - this is *not* the public-sector
|
||||
accessibility statement.
|
||||
|
||||
### [WAD] Directive (EU) 2016/2102 (Web Accessibility Directive) - VERIFIED
|
||||
- Link: <https://eur-lex.europa.eu/eli/dir/2016/2102/oj> (202 WAF); read from
|
||||
Cellar (OJ text).
|
||||
- Applies to websites and mobile apps of **public sector bodies** (Art. 1):
|
||||
new websites from 23 Sep 2019, all websites from 23 Sep 2020, mobile apps
|
||||
from 23 June 2021 (Art. 12(3)).
|
||||
- Art. 7(1): "public sector bodies provide and regularly update a detailed,
|
||||
comprehensive and clear accessibility statement". This is the legal basis
|
||||
of WeKan's `/accessibility` page when a public body runs WeKan.
|
||||
|
||||
### [EN301549] EN 301 549 V3.2.1 (2021-03) - VERIFIED (version)
|
||||
- Link: <https://www.etsi.org/deliver/etsi_en/301500_301599/301549/03.02.01_60/en_301549v030201p.pdf> (200).
|
||||
- The PDF is V3.2.1 (2021-03) and its web requirements are written against
|
||||
**WCAG 2.1** (clauses 9.x "WCAG 2.1"). A newer EN 301 549 that references
|
||||
WCAG 2.2, and its citation in the OJ as the harmonised standard, is
|
||||
**UNVERIFIED** (not found in an official source during this check).
|
||||
|
||||
### [DA] Regulation (EU) 2023/2854 (Data Act) - VERIFIED
|
||||
- Link: <https://eur-lex.europa.eu/eli/reg/2023/2854/oj> (202 WAF); read from
|
||||
Cellar (OJ text, consolidation `02023R2854-20231222`, no amending act).
|
||||
- Applies "from 12 September 2025" (Art. 50).
|
||||
- Art. 1(1)(a) / Art. 4: data of **connected products** - not WeKan.
|
||||
- Art. 2(8) "data processing service" (on-demand, scalable computing
|
||||
resources) and Art. 23: "Providers of data processing services shall take
|
||||
the measures provided for in Articles 25, 26, 27, 29 and 30 to enable
|
||||
customers to switch". Relevant to operators selling **WeKan as SaaS**
|
||||
(export of exportable data, switching), not to the software as such.
|
||||
|
||||
### [ECD] Directive 2000/31/EC (e-Commerce) - VERIFIED
|
||||
- Link: <https://eur-lex.europa.eu/eli/dir/2000/31/oj> (202 WAF); Cellar.
|
||||
- Art. 5(1): the service provider renders "easily, directly and permanently
|
||||
accessible ... (a) the name ... (b) the geographic address ... (c) ...
|
||||
electronic mail address". Transposed by every Member State; § 5 DDG and
|
||||
§ 5 ECG below are two of those transpositions.
|
||||
|
||||
### [AIA] Regulation (EU) 2024/1689 (AI Act) - VERIFIED, amended
|
||||
- Link: <https://eur-lex.europa.eu/eli/reg/2024/1689/oj> (202 WAF). Cellar
|
||||
shows **amendment by Regulation (EU) 2026/1744 of 8 July 2026** and
|
||||
consolidation `02024R1689-20260727`.
|
||||
- Art. 113 (consolidated): applies from 2 August 2026; high-risk Annex III
|
||||
systems "2 December 2027", Annex I systems "2 August 2028". Quoting the
|
||||
2024 OJ text ("Article 6(1) ... from 2 August 2027") would now be wrong -
|
||||
the exact failure the Pandex thread warns about.
|
||||
- WeKan contains no AI system, so none of this applies to it.
|
||||
|
||||
### eIDAS - not re-checked
|
||||
- Regulation (EU) No 910/2014 as amended by Regulation (EU) 2024/1183 - the
|
||||
report only says WeKan offers no trust services; no article is relied on.
|
||||
UNVERIFIED (not fetched).
|
||||
|
||||
---
|
||||
|
||||
## National imprint and cookie rules
|
||||
|
||||
### [DDG5] Germany - § 5 Digitale-Dienste-Gesetz (DDG) - VERIFIED
|
||||
- Link: <https://www.gesetze-im-internet.de/ddg/__5.html> (200).
|
||||
- Version: DDG of 6 May 2024 (BGBl. 2024 I Nr. 149), "zuletzt durch Artikel 1
|
||||
des Gesetzes vom 12. Mai 2026 (BGBl. 2026 I Nr. 138) geändert" (site notes
|
||||
that amendment as textually incorporated). The DDG replaced the
|
||||
Telemediengesetz (TMG) and its § 5; the DDG footnote says §§ 1-6 implement
|
||||
Directive 2000/31/EC. In force since 14 May 2024 (date per BGBl.; the
|
||||
gesetze-im-internet.de page shows only Ausfertigung 06.05.2024 - the
|
||||
14 May date itself is UNVERIFIED here).
|
||||
- § 5(1): "Diensteanbieter haben für geschäftsmäßige, in der Regel gegen
|
||||
Entgelt angebotene digitale Dienste folgende Informationen, die leicht
|
||||
erkennbar und unmittelbar erreichbar sein müssen, ständig verfügbar zu
|
||||
halten: 1. den Namen und die Anschrift ... 2. Angaben, die eine schnelle
|
||||
elektronische Kontaktaufnahme ... einschließlich der Adresse für die
|
||||
elektronische Post, ... 4. ... Handelsregister ... 6. ...
|
||||
Umsatzsteueridentifikationsnummer".
|
||||
- Consequence for WeKan: applies to the **operator** of a WeKan instance that
|
||||
is offered "geschäftsmäßig" (commercially, e.g. a hoster or a company's
|
||||
public instance). A purely internal intranet instance is arguably not an
|
||||
offered service - a legal assessment for the operator. "ständig verfügbar"
|
||||
and "unmittelbar erreichbar" mean the link must be reachable from every
|
||||
page, not only the login page.
|
||||
- Editorial/journalistic content: § 18 Medienstaatsvertrag - UNVERIFIED (not
|
||||
fetched).
|
||||
|
||||
### [TDDDG25] Germany - § 25 TDDDG (formerly TTDSG) - VERIFIED
|
||||
- Link: <https://www.gesetze-im-internet.de/ttdsg/__25.html> (200).
|
||||
- § 25(1) storage/access only with consent; § 25(2) Nr. 2 no consent where
|
||||
"unbedingt erforderlich, damit der Anbieter eines digitalen Dienstes einen
|
||||
vom Nutzer ausdrücklich gewünschten digitalen Dienst zur Verfügung stellen
|
||||
kann" - covers `meteor_login_token`.
|
||||
|
||||
### [ECG5] Austria - § 5 E-Commerce-Gesetz (ECG) - VERIFIED
|
||||
- Link: <https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=20001703> (200).
|
||||
- Version: "Fassung vom 22.11.2026", StF BGBl. I Nr. 152/2001.
|
||||
- § 5(1): "Ein Diensteanbieter hat den Nutzern ständig zumindest folgende
|
||||
Informationen leicht und unmittelbar zugänglich zur Verfügung zu stellen:
|
||||
1. seinen Namen oder seine Firma; 2. die geografische Anschrift ... 3.
|
||||
Angaben, auf Grund deren die Nutzer mit ihm rasch und unmittelbar in
|
||||
Verbindung treten können, einschließlich seiner elektronischen
|
||||
Postadresse; 4. sofern vorhanden, die Firmenbuchnummer ...".
|
||||
|
||||
### [MedienG] Austria - §§ 24, 25 Mediengesetz - VERIFIED
|
||||
- Link: <https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=10000719> (200).
|
||||
- Version: "Fassung vom 22.11.2026" (last change BGBl. I Nr. 21/2026).
|
||||
- § 24 is the **Impressum** ("Auf jedem Medienwerk sind der Name oder die
|
||||
Firma des Medieninhabers ... anzugeben"); § 25 is the **Offenlegung**
|
||||
(disclosure): "Auf einer Website sind diese Angaben ständig leicht und
|
||||
unmittelbar auffindbar zur Verfügung zu stellen"; § 25(5) reduced duty
|
||||
(name, Unternehmensgegenstand, Wohnort/Sitz) for sites without
|
||||
opinion-forming content; § 25(1) allows combining with the § 5 ECG data.
|
||||
(The report's earlier "§ 25 MedienG" for the imprint was imprecise: the
|
||||
imprint is § 24, the website disclosure is § 25.)
|
||||
|
||||
### [UKECR6] United Kingdom - Electronic Commerce (EC Directive) Regulations 2002, reg. 6 - VERIFIED
|
||||
- Link: <https://www.legislation.gov.uk/uksi/2002/2013/regulation/6> (200),
|
||||
"Latest available (Revised)".
|
||||
- Reg. 6(1): information "easily, directly and permanently accessible ...
|
||||
(a) the name of the service provider; (b) the geographic address".
|
||||
|
||||
### [PECR6] United Kingdom - PECR 2003, reg. 6 - VERIFIED
|
||||
- Link: <https://www.legislation.gov.uk/uksi/2003/2426/regulation/6> (200).
|
||||
- Reg. 6 **substituted on 5 February 2026** by the Data (Use and Access) Act
|
||||
2025 (c. 18) s. 112(2); now "Subject to Schedule A1, a person must not
|
||||
store information, or gain access to information stored, in the terminal
|
||||
equipment". Exceptions are in the new Schedule A1 (not re-read here).
|
||||
|
||||
### Other imprint equivalents - UNVERIFIED
|
||||
- France (LCEN, loi n° 2004-575, mentions légales), Switzerland (UWG Art. 3
|
||||
Abs. 1 lit. s), Netherlands (BW 3:15d), Luxembourg, Finland: not fetched -
|
||||
the Pandex daily quota ran out before these lookups. They are the national
|
||||
transpositions of [ECD] Art. 5 (CH: not an EU state, own rule), so the
|
||||
data set (name, address, e-mail, register number, VAT ID) is the same core.
|
||||
|
||||
### [UKGDPR] UK GDPR - partly verified
|
||||
- Link: <https://www.legislation.gov.uk/eur/2016/679/contents> (200). The UK
|
||||
GDPR is amended by the Data (Use and Access) Act 2025 (confirmed for PECR
|
||||
above); individual UK GDPR articles were **not** re-read - UNVERIFIED at
|
||||
article level. The report's GDPR article numbers are the EU text.
|
||||
|
||||
---
|
||||
|
||||
## United States
|
||||
|
||||
### [HIPAA] 45 CFR Part 164 - VERIFIED
|
||||
- Link: <https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164> (200);
|
||||
section links `.../subpart-C/section-164.308`, `-164.312`, `-164.316`,
|
||||
`.../subpart-D`, `.../subpart-E/section-164.504`, `-164.524`, `-164.526`
|
||||
(all 200). Text read through the eCFR versioner API, eCFR "up to date as
|
||||
of 2026-11-19".
|
||||
- Security Rule (§§ 164.302-318) unchanged since 78 FR 5694 (25 Jan 2013).
|
||||
The **Security Rule NPRM** "HIPAA Security Rule To Strengthen the
|
||||
Cybersecurity of ePHI" (90 FR, 2025-01-06, doc. 2024-30983,
|
||||
<https://www.federalregister.gov/documents/2025/01/06/2024-30983/hipaa-security-rule-to-strengthen-the-cybersecurity-of-electronic-protected-health-information>, 200)
|
||||
is still only a **Proposed Rule** - nothing in it applies.
|
||||
- **New Privacy Rule final rule** 91 FR 74848, published 2026-11-19, "The
|
||||
final rule is effective on January 19, 2027" (doc. 2026-23429,
|
||||
<https://www.federalregister.gov/documents/2026/11/19/2026-23429/hipaa-privacy-rule-changes-to-support-coordinated-care-and-individual-engagement-and-reduce>, 200).
|
||||
It amends §§ 164.501-164.532 including § 164.524 (access).
|
||||
- Quotes (§ 164.312): (a)(1) access control; (a)(2)(i) "Unique user
|
||||
identification (Required). Assign a unique name and/or number";
|
||||
(a)(2)(ii) "Emergency access procedure (Required)"; (a)(2)(iii)
|
||||
"Automatic logoff (Addressable). Implement electronic procedures that
|
||||
terminate an electronic session after a predetermined time of inactivity";
|
||||
(a)(2)(iv) "Encryption and decryption (Addressable)"; (b) "Audit controls.
|
||||
Implement hardware, software, and/or procedural mechanisms that record and
|
||||
examine activity"; (c)(1) "Integrity ... protect ePHI from improper
|
||||
alteration or destruction"; (d) "Person or entity authentication" (does
|
||||
**not** prescribe MFA); (e)(1) "Transmission security".
|
||||
- § 164.308: (a)(1)(ii)(D) "Information system activity review (Required)
|
||||
... audit logs, access reports"; (a)(3)(ii)(B) "Workforce clearance
|
||||
procedure"; (a)(4) information access management; (a)(7)(ii)(A)/(B) data
|
||||
backup plan / disaster recovery plan (Required).
|
||||
- § 164.316(b)(2)(i): "Retain the documentation required by paragraph (b)(1)
|
||||
... for 6 years from the date of its creation or the date when it last was
|
||||
in effect". (b)(1) covers written policies/procedures and records of an
|
||||
"action, activity or assessment" the subpart requires to be documented -
|
||||
it does **not** literally say "keep audit logs 6 years".
|
||||
- §§ 164.400-414 breach notification; § 164.504(e) business associate
|
||||
contracts; § 164.524 access; § 164.526 amendment.
|
||||
|
||||
### [CCPA] Cal. Civ. Code § 1798.100 et seq. - VERIFIED (via CPPA)
|
||||
- Official statute host leginfo.legislature.ca.gov answers **403**
|
||||
(Cloudflare "Just a moment...") to non-browser clients. Text read from the
|
||||
California Privacy Protection Agency: <https://cppa.ca.gov/pdf/20260101_ccpa_statute.pdf>
|
||||
(200), "effective 01/01/2026 – AB 137, AB 566 update". Regulations: 11 CCR
|
||||
§ 7000 et seq., <https://cppa.ca.gov/regulations/pdf/ccpa_statute_eff_20260101.pdf>
|
||||
(200; despite the file name, "CCPA Regulations ... Effective 1/1/2026").
|
||||
- § 1798.100(a): "at or before the point of collection, inform consumers".
|
||||
- § 1798.105(a): "the right to request that a business delete any personal
|
||||
information about the consumer".
|
||||
- § 1798.106(a) correct; § 1798.110(a) know/access.
|
||||
- § 1798.135(a)(1): link "Do Not Sell or Share My Personal Information".
|
||||
- § 1798.140(d) "Business" means a for-profit entity meeting a threshold
|
||||
("annual gross revenues in excess of twenty-five million dollars ... as
|
||||
adjusted", 100,000 consumers, ...) - many WeKan operators are not
|
||||
"businesses".
|
||||
- ADMT: 11 CCR § 7200(b): "A business that uses ADMT for a significant
|
||||
decision prior to January 1, 2027, must be in compliance ... no later than
|
||||
January 1, 2027." Cybersecurity audits § 7120-7121 phased from 2028.
|
||||
|
||||
### [COPPA] 16 CFR Part 312 - VERIFIED (definition only)
|
||||
- <https://www.ecfr.gov/current/title-16/chapter-I/subchapter-C/part-312> (200);
|
||||
§ 312.2 "Child means an individual under the age of 13." The 2025 COPPA
|
||||
amendments' compliance date was not checked - UNVERIFIED.
|
||||
|
||||
### [EO14028] Executive Order 14028 - checked, not applicable
|
||||
- <https://www.federalregister.gov/documents/2021/05/17/2021-10460/improving-the-nations-cybersecurity> (200).
|
||||
It directs US federal agencies and their software suppliers; it is not a
|
||||
legal duty for WeKan. Kept only as SBOM good-practice context.
|
||||
|
||||
### [NIST63B] NIST SP 800-63B-4 - VERIFIED (guidance, not law)
|
||||
- <https://pages.nist.gov/800-63-4/sp800-63b.html> (200): "Verifiers and CSPs
|
||||
SHALL require passwords that are used as a single-factor authentication
|
||||
mechanism to be a minimum of 15 characters in length."
|
||||
|
||||
---
|
||||
|
||||
## Other jurisdictions
|
||||
|
||||
### [LGPD] Brazil - Lei nº 13.709/2018 - VERIFIED
|
||||
- <https://www.planalto.gov.br/ccivil_03/_ato2015-2018/2018/lei/l13709compilado.htm>
|
||||
(200, but slow: needed > 60 s and HTTP/1.1; a 60 s check returned 000).
|
||||
Compiled version (texto compilado).
|
||||
- Art. 65: in force "24 (vinte e quatro) meses após a data de sua
|
||||
publicação" for most articles; sanctions (arts. 52-54) "1º de agosto de
|
||||
2021".
|
||||
- Art. 8 consent "por escrito ou por outro meio que demonstre a manifestação
|
||||
de vontade"; Art. 9 access to information on processing; Art. 11 sensitive
|
||||
data; Art. 18 data-subject rights; Art. 33 international transfer; Art. 37
|
||||
"manter registro das operações de tratamento"; Art. 41 "indicar
|
||||
encarregado"; Art. 46 security measures; Art. 48 "comunicar à autoridade
|
||||
nacional e ao titular a ocorrência de incidente de segurança".
|
||||
|
||||
### [PIPEDA] Canada - S.C. 2000, c. 5 - VERIFIED
|
||||
- <https://laws-lois.justice.gc.ca/eng/acts/P-8.6/FullText.html> (200); "Act
|
||||
current to 2026-10-29 and last amended on 2025-03-04".
|
||||
- Sch. 1 Principle 4.1 "shall designate an individual or individuals who are
|
||||
accountable"; 4.3 consent; 4.5.3 "no longer required ... should be
|
||||
destroyed, erased, or made anonymous"; 4.8 openness; 4.9 "shall be given
|
||||
access"; s. 10.1(1) report breaches creating "a real risk of significant
|
||||
harm".
|
||||
|
||||
### [AUPA] Australia - Privacy Act 1988 - VERIFIED
|
||||
- <https://www.legislation.gov.au/C2004A03712/latest/text> (200); compilation
|
||||
**C2026C00227 (No. 104), 4 June 2026**.
|
||||
- Sch. 1 APP 1 (open and transparent management), APP 5.1 ("At or before the
|
||||
time ... collects ... must take such steps"), APP 8 cross-border, APP 11.1
|
||||
protect "from unauthorised access, modification or disclosure", APP 11.2
|
||||
destroy or de-identify, APP 12.1 access; Part IIIC notifiable data
|
||||
breaches (s. 26WE "eligible data breach", s. 26WK statement); s. 6D small
|
||||
business "annual turnover ... $3,000,000 or less" is generally exempt.
|
||||
- Automated-decision transparency added to APP 1 by the 2024 amendment Act
|
||||
is not in this compilation (not yet commenced) - its start date is
|
||||
UNVERIFIED.
|
||||
|
||||
### [PIPL] China - 中华人民共和国个人信息保护法 - VERIFIED (Chinese text)
|
||||
- <http://www.npc.gov.cn/npc/c2/c30834/202108/t20210820_313088.html> (200,
|
||||
NPC official; there is no official English text).
|
||||
- 第七十四条 "本法自2021年11月1日起施行" (in force 1 Nov 2021).
|
||||
- Art. 14 consent; Art. 17 notice before processing; Art. 31 under-14s need
|
||||
parental consent; Art. 38 cross-border conditions; Art. 47 deletion;
|
||||
Art. 51 security and classification measures; Art. 52 person in charge of
|
||||
PI protection; Art. 54 "定期 ... 进行合规审计" (**compliance audits**, not
|
||||
records of processing); Art. 55-56 impact assessment; Art. 57 breach
|
||||
remedial measures and notification.
|
||||
|
||||
### [DPDP] India - Digital Personal Data Protection Act, 2023 (No. 22 of 2023) - VERIFIED text, UNVERIFIED dates
|
||||
- <https://www.meity.gov.in/static/uploads/2024/06/2bf1f0e9f04e6fb4f8fef35e82c42aa5.pdf> (200).
|
||||
- s. 1(2): commences on dates notified, "different dates may be appointed".
|
||||
s. 2(f) child = under 18; s. 5 notice; s. 6(1) consent "free, specific,
|
||||
informed, unconditional and unambiguous"; s. 8(5) security safeguards;
|
||||
s. 8(6) breach intimation; s. 8(7) erasure; s. 9(1) verifiable parental
|
||||
consent; s. 11-12 access, correction, erasure; s. 16 transfer restrictions.
|
||||
- Commencement: the DPDP Rules, 2025 and commencement notifications of
|
||||
13 Nov 2025 are reported (secondary sources only) to bring the core duties
|
||||
into force on 13 May 2027. MeitY's page is a JavaScript application that
|
||||
returned no text, so the dates are **UNVERIFIED**.
|
||||
|
||||
### [APPI] Japan - Act on the Protection of Personal Information (Act No. 57 of 2003) - VERIFIED (translation)
|
||||
- English: <https://www.japaneselawtranslation.go.jp/en/laws/view/4241/en> (200),
|
||||
"Last Version: Act No. 37 of 2021" - Japanese Law Translation is an
|
||||
official government service but the translation is **not** authoritative;
|
||||
Japanese text <https://laws.e-gov.go.jp/law/415AC0000000057> (200, a
|
||||
JavaScript page; not read).
|
||||
- Art. 2(3) "sensitive personal information" incl. medical history; Art. 21
|
||||
notify purpose of use; Art. 23 security measures; Art. 26 report leaks;
|
||||
Art. 33 disclosure; Art. 35 cease use / delete.
|
||||
|
||||
### [POPIA] South Africa - Protection of Personal Information Act 4 of 2013 - VERIFIED (as enacted)
|
||||
- <https://www.gov.za/sites/default/files/gcis_document/201409/3706726-11act4of2013popi.pdf>
|
||||
(200; Government Gazette text as enacted - no consolidation found).
|
||||
- s. 11(1) processing grounds (consent "or a competent person where the data
|
||||
subject is a child"); s. 14(1) retention "no longer than is necessary";
|
||||
s. 18(1) notification on collection; s. 19(1) security measures; s. 22(1)
|
||||
notify the Regulator and the data subject of compromises; s. 23 access;
|
||||
s. 26 special personal information; s. 55 Information Officer duties.
|
||||
- Commencement (1 July 2020, grace to 30 June 2021) is UNVERIFIED (the
|
||||
commencement proclamation was not read).
|
||||
|
||||
---
|
||||
|
||||
## Standards and frameworks
|
||||
|
||||
### [WCAG22] WCAG 2.2 - VERIFIED
|
||||
- <https://www.w3.org/TR/WCAG22/> (200): "W3C Recommendation 12 December 2024".
|
||||
- New AA criteria read: 2.4.11 Focus Not Obscured (Minimum) "not entirely
|
||||
hidden"; 2.5.7 Dragging Movements; 2.5.8 Target Size (Minimum) "at least
|
||||
24 by 24 CSS pixels"; 3.2.6 Consistent Help (A); 3.3.7 Redundant Entry
|
||||
(A); 3.3.8 Accessible Authentication (Minimum); 4.1.1 Parsing "Obsolete
|
||||
and removed". Not a law by itself - it becomes binding through EN 301 549
|
||||
/ national law.
|
||||
|
||||
### [ISO27001] ISO/IEC 27001:2022 - UNVERIFIED
|
||||
- <https://www.iso.org/standard/27001> answered **403** (bot protection), also
|
||||
via WebFetch. The standard is paywalled; Annex A control numbers in the
|
||||
report (A.5.7, A.5.9, A.5.15-A.5.18, A.5.34, A.8.2, A.8.5, A.8.8, A.8.9,
|
||||
A.8.13, A.8.15-A.8.17, A.8.24) could not be checked against an official
|
||||
text and whether Amendment 1:2024 is current could not be confirmed.
|
||||
|
||||
### [ISO27701] ISO/IEC 27701 - UNVERIFIED
|
||||
- <https://www.iso.org/standard/27701> answered **403**. The report's clause
|
||||
"7.2.8" is the numbering of ISO/IEC 27701:2019; whether a newer edition
|
||||
with different numbering is current could not be confirmed.
|
||||
|
||||
### [SOC2] AICPA Trust Services Criteria (2017, revised points of focus 2022) - UNVERIFIED
|
||||
- <https://www.aicpa-cima.com/resources/download/2017-trust-services-criteria-with-revised-points-of-focus-2022>
|
||||
(200) is a download page behind an AICPA account; the criteria text (CC6.x,
|
||||
CC7.x, CC8.1, A1.2, C1.2, PI1) was not readable. SOC 2 is an attestation
|
||||
framework, not law.
|
||||
|
||||
### [RFC9116] RFC 9116 security.txt - VERIFIED (not law)
|
||||
- <https://www.rfc-editor.org/rfc/rfc9116.html> (200): file at
|
||||
`/.well-known/security.txt`; "Contact" one or more required; "Expires"
|
||||
"MUST always be present and MUST NOT appear more than once".
|
||||
|
||||
---
|
||||
|
||||
## Link check result (2026-11-22)
|
||||
|
||||
| HTTP | Links |
|
||||
|---|---|
|
||||
| 200 | gesetze-im-internet.de (DDG § 5, TDDDG § 25, BSIG 2025 § 30, § 32), ris.bka.gv.at (ECG, MedienG), legislation.gov.uk (3), ecfr.gov (9), federalregister.gov (3), cppa.ca.gov (2), laws-lois.justice.gc.ca, legislation.gov.au, npc.gov.cn, meity.gov.in PDF, japaneselawtranslation.go.jp, laws.e-gov.go.jp, gov.za PDF, w3.org, etsi.org, aicpa-cima.com (gated page), pages.nist.gov, rfc-editor.org |
|
||||
| 200 (slow) | planalto.gov.br (needs > 60 s, HTTP/1.1) |
|
||||
| 202 | all eur-lex.europa.eu and data.europa.eu/eli links (AWS WAF challenge, valid in a browser; text verified via Pandex/Cellar) |
|
||||
| 403 | leginfo.legislature.ca.gov (Cloudflare challenge), iso.org (2) |
|
||||
@@ -0,0 +1,131 @@
|
||||
# Admin Panel allowed addresses
|
||||
|
||||
## What it is
|
||||
|
||||
A list of the IPv4 and IPv6 addresses, and address ranges such as
|
||||
`192.168.1.0/24` or `2001:db8::/32`, from which the Admin Panel and the admin
|
||||
REST API can be used. It is in **Admin Panel / Settings / Privacy and security
|
||||
/ Allowed addresses**. An empty list - the default - is any address.
|
||||
|
||||
When the list is set, a site administrator at any other address is a member
|
||||
like any other:
|
||||
|
||||
- every admin-only method, publication and REST endpoint refuses them, as it
|
||||
refuses a member;
|
||||
- the Admin Panel's panes are empty, and its tabs say why: *The Admin Panel
|
||||
cannot be used from your address 203.0.113.7.*;
|
||||
- their own boards, cards and everything else a member does keep working.
|
||||
|
||||
Members are not affected at all, from any address.
|
||||
|
||||
## Read more
|
||||
|
||||
- [Cloud Panel](Cloud-Panel.md) - its *Allowed addresses* are the same rules
|
||||
for Cloud Admins signing in at the Cloud Panel's address, and this list
|
||||
shares their code (`models/lib/cloudAddresses.js`).
|
||||
- [Security report](Problems/Security-Report.md) - where refused attempts are counted.
|
||||
- [Settings enforced on the server](Settings-Enforced-On-Server.md).
|
||||
- [Metrics](../General/Metrics.md) - `METRICS_ALLOWED_IP_ADDRESSES` is a separate list
|
||||
for `/metrics` only.
|
||||
|
||||
## How to use it
|
||||
|
||||
1. Open **Admin Panel / Settings / Privacy and security**.
|
||||
2. Under **Allowed addresses**, write the addresses and ranges, one per line
|
||||
(commas and spaces work too):
|
||||
|
||||
```
|
||||
192.168.1.0/24
|
||||
10.8.0.5
|
||||
2001:db8::/32
|
||||
```
|
||||
|
||||
3. **Save**. The page shows *Your address now* - the address the server sees
|
||||
you at - and warns before saving when that address is not in the list. The
|
||||
server refuses such a list too, so you cannot lock yourself out by saving.
|
||||
|
||||
A range is saved with its host bits cleared: `192.168.1.7/24` is saved as
|
||||
`192.168.1.0/24`. At most 200 entries.
|
||||
|
||||
### Behind a reverse proxy
|
||||
|
||||
The address is the one every other WeKan guard uses: the connection's own
|
||||
address, or the `X-Forwarded-For` address that `HTTP_FORWARDED_COUNT` says
|
||||
your proxies add. Set `HTTP_FORWARDED_COUNT` (for example `1` behind one
|
||||
Caddy or nginx), or every user is seen at the proxy's address. Without it a
|
||||
forged `X-Forwarded-For` is ignored.
|
||||
|
||||
### The server's own setting, and the way back in
|
||||
|
||||
The environment variable `ADMIN_PANEL_ALLOWED_IP_ADDRESSES` wins over the
|
||||
Admin Panel list:
|
||||
|
||||
| Value | Effect |
|
||||
| --- | --- |
|
||||
| unset or empty | the Admin Panel list decides |
|
||||
| `192.168.0.0/16,2001:db8::/32` | this list decides, whatever the Admin Panel says |
|
||||
| `any` | no restriction, whatever the Admin Panel says |
|
||||
|
||||
`any` is the way back in when the list no longer has your address (a new
|
||||
office network, a changed VPN): set it, restart WeKan, fix the list in the
|
||||
Admin Panel, and unset it again. An entry that is not an address or a range
|
||||
matches nothing, so a mistyped variable refuses rather than allows; the
|
||||
server log names the entries it could not read.
|
||||
|
||||
It is listed on every platform: Docker and docker-compose (`environment:`),
|
||||
the snap (`sudo snap set wekan admin-panel-allowed-ip-addresses='any'`),
|
||||
`start-wekan.sh` / `start-wekan.bat`, and the Helm chart's `env`.
|
||||
|
||||
## How the numbers are calculated
|
||||
|
||||
An administrator's refused attempt from another address is one row in
|
||||
**Admin Panel / Problems** under *Admin Panel allowed addresses*
|
||||
(`authz.admin-panel-address`), counted once per method call, publication or
|
||||
REST request however many checks it made, with the account and the address
|
||||
in the actor tally. It is recorded when an admin check asked for the caller
|
||||
as an administrator and the list said no, or when one of the audited admin
|
||||
methods (the ones in Admin Panel / People / Audit log) was called. A member's
|
||||
ordinary use is never recorded. The account is never disabled for it: it is
|
||||
the administrator's own account, and their boards still work from there.
|
||||
|
||||
## How it works in WeKan
|
||||
|
||||
- **One place.** Every admin check of WeKan - the methods, the publications,
|
||||
the allow rules of the Admin Panel's collections and the REST API's
|
||||
`Authentication.checkUserId` - decides from the caller's user document, read
|
||||
through `Meteor.users.findOneAsync` (`Meteor.userAsync`,
|
||||
`ReactiveCache.getUser` and the allow rules all end there).
|
||||
`server/adminPanelAddresses.js` applies the list at that read: for a site
|
||||
administrator at an address the list does not have, their own document
|
||||
reads `isAdmin: false`, and a query that asks about `isAdmin` answers as it
|
||||
would for a member. Other administrators read as they are. No admin method
|
||||
has to remember to ask, and a new one cannot forget.
|
||||
- **Who is asking** is the DDP method or publication running (with the
|
||||
connection's address), else the HTTP request running
|
||||
(`server/lib/requestReportContext.js`), with its bearer token, cookie or
|
||||
`?authToken=` login. A request whose login is not known yet reads nobody as
|
||||
an administrator. Server work with no caller - startup, timers, background
|
||||
jobs - is not restricted. Signing in is not an admin action and reads the
|
||||
stored flag, because OIDC and LDAP logins write it back.
|
||||
- **The list** is stored in the settings document and never published. It is
|
||||
read and saved through the site-admin methods
|
||||
`getAdminPanelAllowedAddresses` and `saveAdminPanelAllowedAddresses`; a
|
||||
browser write of the field is denied, so the lockout check cannot be
|
||||
skipped. Saving is in the audit log. Another server of the same database
|
||||
sees a change within five seconds.
|
||||
- **The rules** - IPv4, IPv6, CIDR ranges, an IPv4-mapped IPv6 address
|
||||
(`::ffff:192.168.1.5`) read as the IPv4 address it carries - are the Cloud
|
||||
Panel's, in `models/lib/cloudAddresses.js`; `models/lib/adminPanelAddresses.js`
|
||||
adds the environment override, the lockout check and the query rewrite, and
|
||||
is pure, so the browser's warning and the server's refusal are the same
|
||||
code.
|
||||
- **Tests:** `tests/adminPanelAddresses.test.cjs` - the address and range
|
||||
rules, `HTTP_FORWARDED_COUNT`, the environment override, the lockout, the
|
||||
rewritten queries evaluated against users, and the negative tests: no admin
|
||||
check of the caller reads users through a cursor or the raw collection, no
|
||||
server code reads a user synchronously, the list is never published, and
|
||||
every locale has the strings with `__address__` untouched.
|
||||
|
||||
## Commits
|
||||
|
||||
- [Admin Panel allowed addresses: from any other address the Admin Panel and the admin REST API refuse](https://github.com/wekan/wekan/commit/7f1226454209424d534326e499918a7e26206d74)
|
||||
@@ -60,7 +60,6 @@ OAuth providers and Passwordless login each have their own menu entry.
|
||||
| `/admin/people/email` | Email | `email-setting` |
|
||||
| `/admin/people/notifications` | Notifications | `notify-setting` |
|
||||
| `/admin/people/domains` | Domains | `domains-setting` |
|
||||
| `/admin/people/cloud` | Cloud | `cloud-setting` |
|
||||
| `/admin/people/organizations` | Organizations | `org-setting` |
|
||||
| `/admin/people/teams` | Teams | `team-setting` |
|
||||
| `/admin/people/locked-users` | Locked Users | `locked-users-setting` |
|
||||
@@ -89,12 +88,13 @@ OAuth providers and Passwordless login each have their own menu entry.
|
||||
| `/admin/problems/speed` | Speed | `report-speed` |
|
||||
| `/admin/problems/tests` | Tests | `report-tests` |
|
||||
| `/admin/problems/cpu` | CPU usage | `report-cpu` |
|
||||
| `/admin/problems/ram` | Memory Usage | `report-ram` |
|
||||
| `/admin/problems/ram` | Memory usage | `report-ram` |
|
||||
| `/admin/problems/disk` | Disk usage | `report-disk` |
|
||||
| `/admin/problems/instrumentation` | Instrumentation | `report-instrumentation` |
|
||||
| `/admin/problems/broken-cards` | Broken Cards | `report-broken` |
|
||||
| `/admin/problems/files` | Files Report | `report-files` |
|
||||
| `/admin/problems/rules` | Rules Report | `report-rules` |
|
||||
| `/admin/problems/webhooks` | All webhooks | `report-webhooks` |
|
||||
| `/admin/problems/boards` | Boards Report | `report-boards` |
|
||||
| `/admin/problems/cards` | Cards Report | `report-cards` |
|
||||
| `/admin/problems/recovery` | Recovery | `report-recovery` |
|
||||
@@ -105,8 +105,9 @@ OAuth providers and Passwordless login each have their own menu entry.
|
||||
| `/admin/problems/mail` | Email | `report-mail` |
|
||||
|
||||
Two panes are called Security, and they are different things: the *settings*
|
||||
pane and the *report*. `security` is the settings one, beside `notifications`
|
||||
and `performance`; `security-report` is the report, beside `impersonation`.
|
||||
pane and the *report*. `security` is the settings one, in Settings beside
|
||||
`activities` and `delete`; `security-report` is the report, in Problems beside
|
||||
`impersonation`.
|
||||
|
||||
## Attachments — `/admin/attachments`
|
||||
|
||||
@@ -126,6 +127,28 @@ and `performance`; `security-report` is the report, beside `impersonation`.
|
||||
| `/admin/attachments/webdav` | WebDAV (Nextcloud Files) | `webdav` |
|
||||
| `/admin/attachments/database-migration` | Database migration | `database-migration` |
|
||||
|
||||
## Cloud — `/admin/cloud`
|
||||
|
||||
Only where the server has the `CLOUD` environment variable, at that address,
|
||||
for its Cloud Admins ([Cloud Panel](Cloud-Panel.md)). It is not one of the four
|
||||
pages of `models/lib/adminUrls.js`: its route, `cloud-admin`, is in
|
||||
`config/router.js`, and the tab shows only when the server says this user is a
|
||||
Cloud Admin here. A bare `/admin/cloud` opens Domains; `/cloud` is the same
|
||||
page for customers.
|
||||
|
||||
| URL | Pane |
|
||||
| --- | --- |
|
||||
| `/admin/cloud/domains` | Domains |
|
||||
| `/admin/cloud/invoices` | Invoices |
|
||||
| `/admin/cloud/tickets` | Tickets |
|
||||
| `/admin/cloud/chat` | Chat |
|
||||
| `/admin/cloud/cloudflare` | Cloudflare |
|
||||
| `/admin/cloud/caddy` | Caddy |
|
||||
| `/admin/cloud/allowed-addresses` | Allowed addresses |
|
||||
|
||||
The People pane `/admin/people/cloud` that set the Cloud Panel's domain from
|
||||
the browser is gone: the domain is the `CLOUD` environment variable.
|
||||
|
||||
## The slug is not derived from the pane id
|
||||
|
||||
The pane ids are internal and read like it — `tableVisibilityMode-setting`,
|
||||
@@ -170,8 +193,10 @@ render an empty panel.
|
||||
| Old | Now |
|
||||
| --- | --- |
|
||||
| `/setting` | `/admin/settings/version` |
|
||||
| `/information` | `/settings` — Version, which it used to be a page of |
|
||||
| `/information` | `/admin/settings/version` — Version, which it used to be a page of |
|
||||
| `/translation` | `/admin/settings/translation` |
|
||||
| `/settings`, `/people`, `/admin-reports`, `/attachments` | the tab's default pane, e.g. `/admin/settings/version` |
|
||||
| `/settings/<slug>` and the same for the other three | `/admin/settings/<slug>`, or the default pane when the slug is unknown |
|
||||
|
||||
They redirect with the `redirect` their trigger is handed, never with
|
||||
`FlowRouter.go()` — a `go()` from inside `triggersEnter` runs while that route is
|
||||
@@ -231,3 +256,28 @@ instead of in two places that can disagree.
|
||||
|
||||
- [Left menu](../All-Boards/Left-Menu.md) — the menu these URLs open
|
||||
- [The Table page design](../General/Table.md) — what most of these panes render
|
||||
|
||||
## Commits
|
||||
|
||||
- [Admin Panel: one question per tab, and the moved panes keep their old addresses as redirects](https://github.com/wekan/wekan/commit/e1a053d059191640a63a22ab553c0b0c6b833d8d)
|
||||
- [Password length gets its own URL and title](https://github.com/wekan/wekan/commit/85af731c1bdf33ba3131134c3926fbf5f353c476)
|
||||
- [Audit log gets its own URL and title](https://github.com/wekan/wekan/commit/2017f2871feda219172d446f257994ecac03babd)
|
||||
- [Backup status gets a Problems pane and URL](https://github.com/wekan/wekan/commit/06b7ce994ad193357a20fc6a036060ea04c83947)
|
||||
- [Attachments / Retention gets its URL](https://github.com/wekan/wekan/commit/dcf91e4471814d765c148d1402865089f6e3ad21)
|
||||
- [Memory usage and Disk usage get their URLs](https://github.com/wekan/wekan/commit/b6a3d98736ebf58ef3905613e303d091ef89f65a)
|
||||
- [WebDAV storage gets its URL](https://github.com/wekan/wekan/commit/42340817523e2e62cc55cbd31982bc2eada1a858)
|
||||
- [Shared labels get their URL](https://github.com/wekan/wekan/commit/7595727917d436ea71969d6d74d166b42b38ed4e)
|
||||
- [Problems / Email gets its URL](https://github.com/wekan/wekan/commit/79ac3016751a4633f9efb1eda2102dcb798378b4)
|
||||
- [OAuth2, CAS and Header login panes get their URLs](https://github.com/wekan/wekan/commit/eb49a4b1b6853650823434e924f5d0dc47a4fe5b)
|
||||
- [Continuous backup gets its URL](https://github.com/wekan/wekan/commit/6b9bc496b1b56a54b40f5403341272c33770561a)
|
||||
- [SAML gets its pane and URL](https://github.com/wekan/wekan/commit/05f1f0a032110dcdd06a355f6ffcc7135cc489e4)
|
||||
- [People login settings split into menu entries, Email the default pane](https://github.com/wekan/wekan/commit/ecdae60a8a9d0b069839193c45d6e5c8ee8a9f5d)
|
||||
- [Instrumentation gets its URL](https://github.com/wekan/wekan/commit/23ed8d927fa0ad110b341dc346a4ea11937a2047)
|
||||
- [People / Notifications gets a URL of its own](https://github.com/wekan/wekan/commit/e15f53135240cebb6e9aec8268c326aeab922afa)
|
||||
- [The API report gets its URL](https://github.com/wekan/wekan/commit/6dc2651b48005f26f769feebfffc751d3022bf50)
|
||||
- [The Offices report gets its URL](https://github.com/wekan/wekan/commit/961ff6cb47437c2eaff2ea4354caf64b676ef8af)
|
||||
- [Problems: the route and the template say what the menu says](https://github.com/wekan/wekan/commit/fa289e4a4de8d4411cfbbd984bae4b184d1eb3c7)
|
||||
- [Filesystem integrity gets its URL](https://github.com/wekan/wekan/commit/2cc0d42ddfaa72dcd04ef59abc541503c7703352)
|
||||
- [The Admin Panel moves under /admin, and the title bar names the pane](https://github.com/wekan/wekan/commit/03cb79bdd71b1e20f4b971267d7ca73420ff33ca)
|
||||
- [A URL for every left-menu entry](https://github.com/wekan/wekan/commit/841479774e12c34337712ef26d2b808b49dc4bfc)
|
||||
- [/information and /translation redirect instead of showing the page you came from](https://github.com/wekan/wekan/commit/9f82877492ee735c78607d4370f985bc5264c8b0)
|
||||
@@ -1,8 +1,35 @@
|
||||
# Admin Panel
|
||||
|
||||
Everything an admin can configure or inspect for the whole instance. Open it from
|
||||
your member menu (top right). Site administrators have instance-wide access;
|
||||
Organization administrators have access only to their permitted scope.
|
||||
## What it is
|
||||
|
||||
The Admin Panel is everything an admin can configure or inspect for the whole
|
||||
instance: what WeKan offers and how it looks, who may sign in and what they may
|
||||
do, where files are kept and backed up, and what is going wrong. Site
|
||||
administrators have instance-wide access; Organization administrators have
|
||||
access only to their permitted scope.
|
||||
|
||||
## Read more
|
||||
|
||||
- [System administrator](https://en.wikipedia.org/wiki/System_administrator)
|
||||
on Wikipedia - the role the Admin Panel is for.
|
||||
- [Clean URL](https://en.wikipedia.org/wiki/Clean_URL) and
|
||||
[Slug (web publishing)](https://en.wikipedia.org/wiki/Slug_(web_publishing))
|
||||
on Wikipedia - the `/admin/<tab>/<pane>` addresses.
|
||||
- WeKan: [Who sees and can do what](Who-Sees-What.md),
|
||||
[Settings enforced on the server](Settings-Enforced-On-Server.md),
|
||||
[Admin Panel URLs](Admin-Panel-URLs.md) and the
|
||||
[Validation report](Validation.md).
|
||||
|
||||
## How to use it
|
||||
|
||||
1. Open your member menu (top right) and choose **Admin Panel**. A site
|
||||
administrator lands on **Settings / Version**; an Organization administrator,
|
||||
who has no Settings tab, lands on **People**.
|
||||
2. Choose a tab in the first header bar: **Settings**, **People**,
|
||||
**Attachments** or **Problems** (an Organization administrator sees People
|
||||
and Attachments only).
|
||||
3. Choose a pane from the tab's left menu. The address bar then shows that
|
||||
pane's own address, which can be bookmarked or sent to a colleague.
|
||||
|
||||
**The directory you are in mirrors the menu.** A menu path is a docs path:
|
||||
Admin Panel / Settings / Appearance is
|
||||
@@ -25,7 +52,7 @@ Which setting decides whether somebody sees or may use something - the instance,
|
||||
a feature profile, the board, a role - is explained in one place:
|
||||
[Who sees and can do what](Who-Sees-What.md).
|
||||
|
||||
## Settings
|
||||
### Settings
|
||||
|
||||
Opens on **Version**, so the first thing an admin sees is what this instance is
|
||||
running. [Section index](Settings/README.md).
|
||||
@@ -46,7 +73,7 @@ running. [Section index](Settings/README.md).
|
||||
| Admin Panel / Settings / Global Webhooks | [Global-Webhooks.md](Settings/Global-Webhooks.md) |
|
||||
| Admin Panel / Settings / Shared labels | [Shared-Labels.md](Settings/Shared-Labels.md) |
|
||||
|
||||
## People
|
||||
### People
|
||||
|
||||
Who may sign in, who they belong to, and what they may do.
|
||||
[Section index](People/README.md).
|
||||
@@ -69,13 +96,13 @@ Who may sign in, who they belong to, and what they may do.
|
||||
The People, Teams and Organizations tables also show the
|
||||
[feature profile](Settings/Feature-Profiles.md) that applies.
|
||||
|
||||
## Attachments
|
||||
### Attachments
|
||||
|
||||
Where files are stored, how big they may be, moving them between storages, and
|
||||
backups. [Section index](Attachments/README.md) — it has a heading per menu entry,
|
||||
in menu order, starting with **Backup**, which is also the pane that opens.
|
||||
|
||||
## Problems
|
||||
### Problems
|
||||
|
||||
Instance health: what is broken, what is running, and the paginated report tables.
|
||||
[Section index](Problems/README.md).
|
||||
@@ -88,14 +115,14 @@ Database problems, Filesystem integrity and Email. Every report is one shared
|
||||
[table page](../General/Table.md): a search box, a total, `page X / N` and
|
||||
prev/next.
|
||||
|
||||
## Sandstorm
|
||||
### Sandstorm
|
||||
|
||||
On Sandstorm, authentication (LDAP, passwordless e-mail, SAML, GitHub and Google
|
||||
Auth) and SMTP are handled by Sandstorm itself: you add and remove users there. There
|
||||
is no longer a **Sandstorm** pane in Attachments — see
|
||||
[Attachments](Attachments/README.md#sandstorm--removed-from-the-menu).
|
||||
|
||||
## Panes that moved or are gone
|
||||
### Panes that moved or are gone
|
||||
|
||||
When following an older link or bookmark - every old address redirects:
|
||||
|
||||
@@ -118,6 +145,31 @@ When following an older link or bookmark - every old address redirects:
|
||||
[People / Login](People/Login.md). **Info** is
|
||||
[Settings / Version](Settings/Version.md).
|
||||
|
||||
## How the numbers are calculated
|
||||
|
||||
See the pages above. This index has no numbers of its own; each pane's page
|
||||
says how its counts, limits and defaults are computed.
|
||||
|
||||
## How it works in WeKan
|
||||
|
||||
- **Tabs and panes:** [models/lib/adminUrls.js](../../../models/lib/adminUrls.js)
|
||||
maps every pane's URL slug to its pane id and title, and
|
||||
[config/router.js](../../../config/router.js) builds the four
|
||||
`/admin/<tab>/:pane` routes from it ([Admin Panel URLs](Admin-Panel-URLs.md)).
|
||||
- **The tab bar:** `adminPanelTabs` in
|
||||
[client/components/settings/settingHeader.jade](../../../client/components/settings/settingHeader.jade);
|
||||
Settings and Problems are shown only to a site administrator.
|
||||
- **The member-menu link:** [client/components/users/userHeader.jade](../../../client/components/users/userHeader.jade)
|
||||
sends a site administrator to Settings and an Organization administrator to
|
||||
People.
|
||||
- **Organization administrators:** which panes they keep is decided by
|
||||
[models/lib/tenantAdmin.js](../../../models/lib/tenantAdmin.js).
|
||||
- **Tests:** [tests/adminPanelDocsMatchMenu.test.cjs](../../../tests/adminPanelDocsMatchMenu.test.cjs)
|
||||
keeps this folder in step with the menu,
|
||||
[tests/adminPanelStructure.test.cjs](../../../tests/adminPanelStructure.test.cjs)
|
||||
the tabs and their pages, and
|
||||
[tests/adminUrls.test.cjs](../../../tests/adminUrls.test.cjs) the URLs.
|
||||
|
||||
## Related
|
||||
|
||||
- [Login / Authentication methods](../../README.md#LoginAuth) — LDAP, OAuth2,
|
||||
@@ -131,3 +183,20 @@ When following an older link or bookmark - every old address redirects:
|
||||
|
||||
[Validation report](Validation.md): the panes, backup fixes, test evidence and
|
||||
external-service verification limits.
|
||||
|
||||
## Commits
|
||||
|
||||
- [Admin Panel: one question per tab - Settings gains Appearance, Features, Feature profiles, Security, Activities and Delete](https://github.com/wekan/wekan/commit/e1a053d059191640a63a22ab553c0b0c6b833d8d)
|
||||
- [The docs mirror the Admin Panel and its menus, a page for every menu entry](https://github.com/wekan/wekan/commit/a8fd080bc8ece74157e5f2e9e436fa2dafe76348)
|
||||
- [The docs folders follow the WeKan menus](https://github.com/wekan/wekan/commit/b7589737f5730ce1ba83244946e158519528a783)
|
||||
- [Admin Panel features validated and their audit written](https://github.com/wekan/wekan/commit/58d8563637d1a9badcf2ff5cf0ea6793d7b7d1eb)
|
||||
- [Problems: permanent delete](https://github.com/wekan/wekan/commit/4ab3161b4f58d459c2c1808eac91685d0888ec10)
|
||||
- [The Admin Panel moves under /admin, and the header says where you are](https://github.com/wekan/wekan/commit/03cb79bdd71b1e20f4b971267d7ca73420ff33ca)
|
||||
- [The four tabs become icons in the first header bar](https://github.com/wekan/wekan/commit/f83234f0d81ceaf94eddaa9caa0f8b0ef38ea4cb)
|
||||
- [A URL for every left-menu entry](https://github.com/wekan/wekan/commit/841479774e12c34337712ef26d2b808b49dc4bfc)
|
||||
- [The Attachments / Sandstorm pane is commented out](https://github.com/wekan/wekan/commit/eba25459a33218cb0da97f53e399f96d21f39073)
|
||||
- [The Admin Panel docs mirror the Admin Panel menu](https://github.com/wekan/wekan/commit/1e9e58dab6e4fb62e949d893416263ef15c4dbe9)
|
||||
- [The board-member restriction moves to Organizations and Teams](https://github.com/wekan/wekan/commit/f0ea1601b3f6e2530501873efc5824d48ee79991)
|
||||
- [Organization administrators: the Admin Panel limited to their own Organization](https://github.com/wekan/wekan/commit/36b899b9d643fd428613fa8e7197bafc192a42db)
|
||||
- [The tables fit, every pane has a title, and Version opens first](https://github.com/wekan/wekan/commit/d232194070314bbde9ab80f90cad037a215a90f9)
|
||||
- [The left menu is back on every Admin Panel page](https://github.com/wekan/wekan/commit/d34d281595b9bd10cf7295b4aa216afaf29e8394)
|
||||
@@ -1,5 +1,13 @@
|
||||
# Admin Panel / Attachments / Backup
|
||||
|
||||
## What it is
|
||||
|
||||
Admin Panel / Attachments / Backup takes a backup archive of this WeKan now or
|
||||
on a schedule: the database text data, the attachments and the avatars, each a
|
||||
checkbox. A site admin backs up the whole instance; an Organization's admin
|
||||
backs up only that Organization's boards. The archives can be listed and
|
||||
restored from the same pane.
|
||||
|
||||
Use [Backup and restore](../../../Backup/Backup.md) for the current illustrated
|
||||
guide: immediate and scheduled backups, instance/Organization scope, storage
|
||||
destinations, restore modes and coverage limits. It also explains how to copy
|
||||
@@ -7,3 +15,101 @@ a complete stopped FerretDB/SQLite installation with users and attachments.
|
||||
|
||||
An Admin Panel archive, a raw database backup and a board export contain
|
||||
different data. Choose the method and verify its restore before relying on it.
|
||||
|
||||
## Read more
|
||||
|
||||
- [Backup](https://en.wikipedia.org/wiki/Backup) on Wikipedia.
|
||||
- [ZIP (file format)](https://en.wikipedia.org/wiki/ZIP_(file_format)) on
|
||||
Wikipedia - the archive format.
|
||||
- [Cron](https://en.wikipedia.org/wiki/Cron) on Wikipedia - the idea behind the
|
||||
schedule.
|
||||
- WeKan: [Backup and restore](../../../Backup/Backup.md),
|
||||
[Continuous backup](../../../Backup/Continuous-Backup.md),
|
||||
[Problems / Backup status](../Problems/README.md) and the
|
||||
[Attachments tab](README.md#backup).
|
||||
|
||||
## How to use it
|
||||
|
||||
**Take a backup now:**
|
||||
|
||||
1. Open your member menu (top right) → **Admin Panel** → **Attachments** →
|
||||
**Backup** (it is the pane that opens).
|
||||
2. Under **Backup scope**, choose *Whole instance* or one Organization.
|
||||
3. Tick what to include: **Attachments**, **Avatars**, **Data (text)**. A
|
||||
complete backup needs all three and *Whole instance*.
|
||||
4. Choose **Save to storage**, then press **Backup now**. *Backup completed* is
|
||||
shown when it is done.
|
||||
|
||||
**Schedule backups:**
|
||||
|
||||
1. In **Scheduled backups**, choose a **Frequency**: Off, Daily, Weekly or
|
||||
Monthly.
|
||||
2. For Weekly pick the day of the week, for Monthly the day of the month, and
|
||||
set the time.
|
||||
3. Press **Save**.
|
||||
|
||||
**Restore:**
|
||||
|
||||
1. Press **List backups**.
|
||||
2. Choose the **Restore** mode: *Add missing data only* or *Replace all data*,
|
||||
and restore the archive you want.
|
||||
|
||||
## How the numbers are calculated
|
||||
|
||||
From [models/lib/backupPaths.js](../../../../models/lib/backupPaths.js) and
|
||||
[models/lib/backupRuns.js](../../../../models/lib/backupRuns.js):
|
||||
|
||||
- **Schedule time** - `HH:MM`, 00:00 to 23:59, default 04:00. Weekly defaults to
|
||||
Sunday. **Day of the month** is 1 to 28, so every month has that day.
|
||||
- **Overdue** - a scheduled instance backup is overdue when its last success is
|
||||
older than the period plus a 2-hour grace: 26 hours for Daily, 7 days 2 hours
|
||||
for Weekly, 31 days 2 hours for Monthly.
|
||||
- **A run still "running" after 24 hours** counts as failed (`STALE_RUNNING_MS`).
|
||||
- **History** - run records older than 400 days are removed when a new run
|
||||
starts; the backup history (Problems / Backup) shows the 30 most recent.
|
||||
- **BACKUP_KEEP_DAYS** - a whole number of days from 1 to 3650; anything else
|
||||
is 0, which keeps every backup. After a successful backup, local archives
|
||||
older than that many days are deleted.
|
||||
- A scheduled backup that finds another backup still running is recorded as
|
||||
failed with "skipped: another backup was still running".
|
||||
|
||||
## How it works in WeKan
|
||||
|
||||
- **Client:** [client/components/settings/attachments.jade](../../../../client/components/settings/attachments.jade)
|
||||
and `attachments.js` beside it.
|
||||
- **Server methods:** [server/methods/backup.js](../../../../server/methods/backup.js) -
|
||||
backup, list and restore, the `BackupSettings` schedule document
|
||||
(`_id: 'schedule'`) and the synced-cron job "WeKan Scheduled Backup". Site
|
||||
admins only for the whole instance; an Organization admin only for the
|
||||
Organizations they administer.
|
||||
- **Whole-instance archive:** [server/lib/fullBackup.js](../../../../server/lib/fullBackup.js),
|
||||
a versioned BSON/file-stream format with a manifest of payload hashes.
|
||||
- **Organization archive:** [models/lib/tenantBackup.js](../../../../models/lib/tenantBackup.js),
|
||||
which decides the collections and the ownership guard on restore.
|
||||
- **Run history:** the `BackupRuns` collection, written by
|
||||
[server/lib/backupRuns.js](../../../../server/lib/backupRuns.js); pruning by
|
||||
[server/lib/backupPrune.js](../../../../server/lib/backupPrune.js).
|
||||
- **Archive paths and ZipBleed guard:** `safeEntryPath` and
|
||||
`symlinkOnRestorePath` in `models/lib/backupPaths.js`.
|
||||
- **Tests:** [tests/backupPaths.test.cjs](../../../../tests/backupPaths.test.cjs),
|
||||
[tests/backupRuns.test.cjs](../../../../tests/backupRuns.test.cjs),
|
||||
[tests/backupCron.test.cjs](../../../../tests/backupCron.test.cjs),
|
||||
[tests/backupValidation.test.cjs](../../../../tests/backupValidation.test.cjs),
|
||||
[tests/tenantBackup.test.cjs](../../../../tests/tenantBackup.test.cjs),
|
||||
[tests/zipbleed.test.cjs](../../../../tests/zipbleed.test.cjs),
|
||||
[tests/backupRestoreSymlink.test.cjs](../../../../tests/backupRestoreSymlink.test.cjs)
|
||||
and the browser spec
|
||||
[tests/playwright/specs/admin-full-backup.e2e.js](../../../../tests/playwright/specs/admin-full-backup.e2e.js).
|
||||
|
||||
## Commits
|
||||
|
||||
- [Backups in S3 can be encrypted at rest](https://github.com/wekan/wekan/commit/482c2c29f47a5279c43e0033547e35da5013e8d5)
|
||||
- [Every backup run recorded, failures and overdue backups shown, old local backups pruned](https://github.com/wekan/wekan/commit/06b7ce994ad193357a20fc6a036060ea04c83947)
|
||||
- [Refuse to restore a backup file through a symlink](https://github.com/wekan/wekan/commit/0dd33ef806f974ee7666a324cd2d8853b76ae1a9)
|
||||
- [Scheduled full-instance backups start, and the archive holds every collection and file](https://github.com/wekan/wekan/commit/58d8563637d1a9badcf2ff5cf0ea6793d7b7d1eb)
|
||||
- [The schedule's day is picked from buttons](https://github.com/wekan/wekan/commit/7f01afdc20a61f946b8b0ee02d7a0b87e7bbbce1)
|
||||
- [Backup and restore of one Organization](https://github.com/wekan/wekan/commit/36b899b9d643fd428613fa8e7197bafc192a42db)
|
||||
- [ZipBleed: a restored archive cannot write outside the files directory](https://github.com/wekan/wekan/commit/f1c89548e05bb869f4ac8d55240b26ff96f23b19)
|
||||
- [The scheduled backup cron no longer crashes at server startup](https://github.com/wekan/wekan/commit/011c172c8ca844b33d45861acb1b34307cc6a1b2)
|
||||
- [Low-memory streaming archives with archiver and unzipper](https://github.com/wekan/wekan/commit/e39dcd4ebf19c4280cc8f48352e91b547c5ff673)
|
||||
- [Scheduled backups of attachments, avatars and data, with list and restore](https://github.com/wekan/wekan/commit/c7c8a200ff551f979fe6eeb30266d7c435cd7fa4)
|
||||
@@ -1,23 +1,52 @@
|
||||
# Admin Panel / Attachments
|
||||
|
||||
Where files live, how big they may be, moving them between storages, and backups. One
|
||||
heading per menu entry, in menu order. **Backup** is first and is the pane that
|
||||
opens; arriving there also asks once whether a backup is already running, so an
|
||||
in-progress backup shows its status.
|
||||
## What it is
|
||||
|
||||
## Backup
|
||||
The Attachments tab of the Admin Panel says where files live, how big they may
|
||||
be, how they move between storages, and how they are backed up. Attachments are
|
||||
the files added to cards; avatars are the users' pictures; both can be kept in
|
||||
the filesystem, in MongoDB GridFS or in cloud storage (S3/MinIO, Azure Blob,
|
||||
Google Cloud Storage, WebDAV). One heading per menu entry below, in menu order.
|
||||
**Backup** is first and is the pane that opens; arriving there also asks once
|
||||
whether a backup is already running, so an in-progress backup shows its status.
|
||||
|
||||
## Read more
|
||||
|
||||
- [Backup](https://en.wikipedia.org/wiki/Backup) and
|
||||
[Point-in-time recovery](https://en.wikipedia.org/wiki/Point-in-time_recovery)
|
||||
on Wikipedia.
|
||||
- [Object storage](https://en.wikipedia.org/wiki/Object_storage),
|
||||
[Amazon S3](https://en.wikipedia.org/wiki/Amazon_S3) and
|
||||
[WebDAV](https://en.wikipedia.org/wiki/WebDAV) on Wikipedia.
|
||||
- [GridFS](https://www.mongodb.com/docs/manual/core/gridfs/) in the MongoDB
|
||||
manual, and [Meteor-Files](https://github.com/veliovgroup/Meteor-Files), the
|
||||
file library WeKan stores attachments with.
|
||||
- [Data retention](https://en.wikipedia.org/wiki/Data_retention) on Wikipedia.
|
||||
- WeKan: [Backup and restore](../../../Backup/Backup.md),
|
||||
[Continuous backup](../../../Backup/Continuous-Backup.md) and
|
||||
[Attachments (cards)](../../Cards/Attachments/Attachments.md).
|
||||
|
||||
## How to use it
|
||||
|
||||
Open your member menu (top right) → **Admin Panel** → **Attachments**, then pick
|
||||
a pane from the left menu. Every pane has its own address,
|
||||
`/admin/attachments/<slug>` (the table at the end). A site admin sees every
|
||||
pane; an Organization's own admin sees only **Backup**, scoped to their
|
||||
Organizations. On Sandstorm, **Database migration** is not in the menu.
|
||||
|
||||
### Backup
|
||||
|
||||
See [Backup.md](Backup.md) for screenshots, restore steps and coverage limits.
|
||||
|
||||
Take a backup now — attachments, avatars and the database, each a checkbox — choose
|
||||
where it is written, and schedule it (daily, weekly on a chosen day, or monthly on a
|
||||
chosen date, at a chosen time). **List backups** shows what exists; a backup can be
|
||||
chosen day from 1 to 28, at a chosen time). **List backups** shows what exists; a backup can be
|
||||
restored, either adding only what is missing or replacing.
|
||||
|
||||
A restored archive is checked entry by entry: an entry that resolves outside the
|
||||
directory it belongs in is skipped and reported, never written (ZipBleed).
|
||||
|
||||
### Scope: the whole instance, or one Organization
|
||||
#### Scope: the whole instance, or one Organization
|
||||
|
||||
**Backup scope** chooses what is backed up. A site admin sees *Whole instance* plus
|
||||
every Organization; an Organization's own admin sees only the Organizations they
|
||||
@@ -43,7 +72,7 @@ you may restore. See
|
||||
The **schedule** is instance-wide, and stays with the site admin: one cron, one archive
|
||||
of everything.
|
||||
|
||||
## Continuous backup
|
||||
### Continuous backup
|
||||
|
||||
Beside Backup: where Backup makes a whole archive at intervals, this streams every
|
||||
change - database, attachments, avatars and logs - to a directory within seconds,
|
||||
@@ -52,31 +81,32 @@ so a restore can return to any moment. Site administrators only. The settings
|
||||
the status, the restore points and the restore are described in
|
||||
[Continuous-Backup.md](../../../Backup/Continuous-Backup.md).
|
||||
|
||||
## Move attachment
|
||||
### Move attachment
|
||||
|
||||
Move attachments and/or avatars between storages: choose the scope (attachments,
|
||||
avatars, both), the source (all, or one specific storage) and the destination. The
|
||||
last move is reported, and **Repair file locations** re-scans files whose recorded
|
||||
location no longer matches where they actually are.
|
||||
|
||||
## Default save storage
|
||||
### Default save storage
|
||||
|
||||
Which storage new files go to.
|
||||
|
||||
## Limits
|
||||
### Limits
|
||||
|
||||
Upload and download size limits, for attachments and for the API, each with a unit;
|
||||
and whether avatar uploads are blocked entirely.
|
||||
|
||||
## Retention
|
||||
### Retention
|
||||
|
||||
Delete card attachments after a number of days, optionally only on cards nobody
|
||||
works on any more, and remove deleted attachments for good after another number
|
||||
of days. Each field overrides an `ATTACHMENTS_RETENTION_*` environment variable;
|
||||
an empty field falls back to it. Off unless set. See
|
||||
of days. Each field overrides its environment variable (`ATTACHMENTS_RETENTION_*`,
|
||||
and `ATTACHMENTS_PURGE_DELETED_AFTER_DAYS` for the purge); an empty field falls
|
||||
back to it. Off unless set. See
|
||||
[Attachments.md](../../Cards/Attachments/Attachments.md#retention-removing-old-attachments-automatically).
|
||||
|
||||
## MongoDB GridFS storage · Filesystem storage · S3 / MinIO storage · Azure Blob Storage · Google Cloud Storage · WebDAV
|
||||
### MongoDB GridFS storage · Filesystem storage · S3 / MinIO storage · Azure Blob Storage · Google Cloud Storage · WebDAV
|
||||
|
||||
One pane per backend, each with its own read / write switches and its own settings —
|
||||
paths for the filesystem, bucket and credentials for S3 / MinIO, account and
|
||||
@@ -85,11 +115,77 @@ container for Azure, bucket and service-account permissions for GCS, and for Web
|
||||
app password made for WeKan. Every pane says which environment variable or console
|
||||
path each field corresponds to.
|
||||
|
||||
## Database migration
|
||||
### Database migration
|
||||
|
||||
The MongoDB ↔ FerretDB v1 (SQLite) text-data migration, with the progress dashboard.
|
||||
See [Problems / Migrations](../Problems/Migrations.md).
|
||||
|
||||
## How the numbers are calculated
|
||||
|
||||
- **Limits** - each size limit is stored in bytes; the unit beside it (GB, MB or
|
||||
bytes) only converts what is shown: 1 MB = 1024 × 1024 bytes and
|
||||
1 GB = 1024 × 1024 × 1024 bytes
|
||||
([client/components/settings/attachments.js](../../../../client/components/settings/attachments.js)).
|
||||
0 means no limit of its own. A new settings document takes its starting
|
||||
values from `ATTACHMENTS_UPLOAD_MAX_SIZE`, `ATTACHMENT_API_MAX_UPLOAD_BYTES`
|
||||
and `ATTACHMENT_API_MAX_DOWNLOAD_BYTES`, else 0
|
||||
([server/models/attachmentStorageSettings.js](../../../../server/models/attachmentStorageSettings.js)).
|
||||
- **Retention** - from
|
||||
[models/lib/attachmentRetention.js](../../../../models/lib/attachmentRetention.js)
|
||||
and the form's fields in
|
||||
[models/lib/authConfigCatalog.js](../../../../models/lib/authConfigCatalog.js):
|
||||
- *Delete after* (`ATTACHMENTS_RETENTION_DAYS`) and *Purge deleted after*
|
||||
(`ATTACHMENTS_PURGE_DELETED_AFTER_DAYS`) are whole days from 1 to 36500;
|
||||
anything else is 0, which is off. An attachment is expired when it was
|
||||
uploaded at least that many days ago (24 hours a day), and in the
|
||||
`card-inactive` mode also its card has had no activity for that long.
|
||||
- The mode is `uploaded` unless `card-inactive` is chosen.
|
||||
- *Dry run* (`ATTACHMENTS_RETENTION_DRY_RUN`) is on for `true`, `1`, `yes`
|
||||
or `on`.
|
||||
- *At most per run* (`ATTACHMENTS_RETENTION_MAX_PER_RUN`) defaults to 1000.
|
||||
The form accepts up to 1,000,000, but the job itself caps the value at
|
||||
100,000.
|
||||
- **Backup** - the schedule, overdue rule, history and `BACKUP_KEEP_DAYS` are
|
||||
on [Backup.md](Backup.md#how-the-numbers-are-calculated).
|
||||
- **Storage panes** - **Calculate file counts** counts the files of each kind
|
||||
(attachments, avatars) in each storage, CollectionFS and Meteor-Files
|
||||
included; the GridFS count is only of files really stored in GridFS.
|
||||
|
||||
## How it works in WeKan
|
||||
|
||||
- **Client:** [client/components/settings/attachments.jade](../../../../client/components/settings/attachments.jade)
|
||||
and [attachments.js](../../../../client/components/settings/attachments.js):
|
||||
`attachmentsMenu()` builds the left menu, drops the Sandstorm-hidden panes
|
||||
([models/lib/sandstormSlim.js](../../../../models/lib/sandstormSlim.js)) and,
|
||||
for an Organization admin, keeps only Backup
|
||||
(`tenantAdminAttachmentsMenu` in
|
||||
[models/lib/tenantAdmin.js](../../../../models/lib/tenantAdmin.js)).
|
||||
- **Settings document:** `AttachmentStorageSettings`
|
||||
([models/attachmentStorageSettings.js](../../../../models/attachmentStorageSettings.js),
|
||||
[server/models/attachmentStorageSettings.js](../../../../server/models/attachmentStorageSettings.js)) -
|
||||
default storage, `limitSettings`, the backends' read/write switches and
|
||||
their settings; secrets are kept when the field is left blank.
|
||||
- **Backends:** [models/lib/fileStoreStrategy.js](../../../../models/lib/fileStoreStrategy.js)
|
||||
(filesystem and GridFS), [models/lib/cloudStorage.js](../../../../models/lib/cloudStorage.js)
|
||||
(S3, Azure, GCS) and [server/lib/webdavAdapter.js](../../../../server/lib/webdavAdapter.js).
|
||||
- **Move attachment:** [server/attachmentBulkMove.js](../../../../server/attachmentBulkMove.js).
|
||||
- **Retention:** the nightly job [server/attachmentRetention.js](../../../../server/attachmentRetention.js).
|
||||
- **Backup:** [server/methods/backup.js](../../../../server/methods/backup.js);
|
||||
continuous backup: [server/continuousBackup.js](../../../../server/continuousBackup.js).
|
||||
- **Database migration:** [server/methods/migrateTextDatabase.js](../../../../server/methods/migrateTextDatabase.js).
|
||||
- **URLs:** the slugs are in [models/lib/adminUrls.js](../../../../models/lib/adminUrls.js),
|
||||
and [tests/adminPanelDocsMatchMenu.test.cjs](../../../../tests/adminPanelDocsMatchMenu.test.cjs)
|
||||
checks the table at the end of this page against it.
|
||||
- **Tests:** [tests/attachmentRetention.test.cjs](../../../../tests/attachmentRetention.test.cjs),
|
||||
[tests/webdavStorage.test.cjs](../../../../tests/webdavStorage.test.cjs),
|
||||
[tests/attachmentStoragePath.test.cjs](../../../../tests/attachmentStoragePath.test.cjs),
|
||||
[tests/tenantBackup.test.cjs](../../../../tests/tenantBackup.test.cjs),
|
||||
[tests/continuousBackup.test.cjs](../../../../tests/continuousBackup.test.cjs)
|
||||
and the browser specs
|
||||
[admin-attachment-retention.e2e.js](../../../../tests/playwright/specs/admin-attachment-retention.e2e.js),
|
||||
[admin-continuous-backup.e2e.js](../../../../tests/playwright/specs/admin-continuous-backup.e2e.js)
|
||||
and [admin-full-backup.e2e.js](../../../../tests/playwright/specs/admin-full-backup.e2e.js).
|
||||
|
||||
## Sandstorm — removed from the menu
|
||||
|
||||
There is no Sandstorm pane any more. It only had content inside a Sandstorm grain —
|
||||
@@ -129,6 +225,29 @@ the address uses: `/admin/attachments/<slug>`.
|
||||
| Attachments / WebDAV (Nextcloud Files) | `webdav` | — |
|
||||
| Attachments / Database migration | `database-migration` | — |
|
||||
|
||||
10 of these 12 panes have no page of its own yet. A dash is a
|
||||
10 of these 13 panes has no page of its own yet. A dash is a
|
||||
gap to fill, not a pane that does nothing - what the pane shows is described in
|
||||
this README until somebody writes it up.
|
||||
|
||||
## Commits
|
||||
|
||||
- [Attachments, avatars and backups in S3 can be encrypted at rest](https://github.com/wekan/wekan/commit/482c2c29f47a5279c43e0033547e35da5013e8d5)
|
||||
- [Backup status and history, and old local backups pruned](https://github.com/wekan/wekan/commit/06b7ce994ad193357a20fc6a036060ea04c83947)
|
||||
- [Retention: delete card attachments after N days, purge deleted ones after M days](https://github.com/wekan/wekan/commit/dcf91e4471814d765c148d1402865089f6e3ad21)
|
||||
- [WebDAV attachment storage, for Nextcloud Files or any WebDAV server](https://github.com/wekan/wekan/commit/42340817523e2e62cc55cbd31982bc2eada1a858)
|
||||
- [Files moved to or from the old CollectionFS storage are streamed](https://github.com/wekan/wekan/commit/cd054f99640509718cd9b24eee047ac635a0f80b)
|
||||
- [Continuous backup: encryption at rest and cloud upload](https://github.com/wekan/wekan/commit/5ef5757c716cfa33ff30154a1baa1cd66c1b822c)
|
||||
- [Continuous backup pane: stream every change, restore to a moment](https://github.com/wekan/wekan/commit/6b9bc496b1b56a54b40f5403341272c33770561a)
|
||||
- [Scheduled full-instance backups fixed and the Admin Panel validated](https://github.com/wekan/wekan/commit/58d8563637d1a9badcf2ff5cf0ea6793d7b7d1eb)
|
||||
- [Attachment migration keeps a binary two records share](https://github.com/wekan/wekan/commit/146a5184d90028b3ccf917069b3007ef520fcb59)
|
||||
- [A URL for every left-menu entry](https://github.com/wekan/wekan/commit/841479774e12c34337712ef26d2b808b49dc4bfc)
|
||||
- [The Sandstorm pane is commented out](https://github.com/wekan/wekan/commit/eba25459a33218cb0da97f53e399f96d21f39073)
|
||||
- [The page opens on Backup, its first menu entry](https://github.com/wekan/wekan/commit/a9680fa3d3ab3b76ab34865af8622010828c7924)
|
||||
- [Organization backups and the Backup-only menu for an Organization admin](https://github.com/wekan/wekan/commit/36b899b9d643fd428613fa8e7197bafc192a42db)
|
||||
- [The side menu is rendered from the shared left menu](https://github.com/wekan/wekan/commit/1c1aefbd16c2be4a21d5a9f339f618da01bdb2b4)
|
||||
- [Attachments missing after the MongoDB to FerretDB migration fixed](https://github.com/wekan/wekan/commit/65bf215cbe747e0d5ad2f713aaa73bd558b0163d)
|
||||
- [Scheduled backups of attachments, avatars and data, with list and restore](https://github.com/wekan/wekan/commit/c7c8a200ff551f979fe6eeb30266d7c435cd7fa4)
|
||||
- [Database migration between MongoDB and FerretDB v1 (SQLite), both directions](https://github.com/wekan/wekan/commit/84fee7b660e365d900e1ac355d97fcccf3debc25)
|
||||
- [A setting to block avatar uploads](https://github.com/wekan/wekan/commit/8e2dacd856cef46728f0341eeafcb03fd0f453fa)
|
||||
- [Move Attachment moves attachments and avatars from any storage to any storage](https://github.com/wekan/wekan/commit/d30803276d6d06db44f65ee1fb583cc11aac8b7b)
|
||||
- [Attachment storage options moved from the board to the Admin Panel](https://github.com/wekan/wekan/commit/fc92b342ceedcf38dbd614a0f7b50d6dc2b22eb8)
|
||||
@@ -2,30 +2,53 @@
|
||||
|
||||
The Cloud Panel is the hosting operator's page for many WeKan customer
|
||||
domains: `customer1.wekan.team`, `wekan.customer.com`, ... It is on a domain of
|
||||
its own, the **Cloud Panel Domain** (for example `cloud.wekan.fi`), and it looks
|
||||
like the Admin Panel: a left menu and a pane beside it.
|
||||
its own (for example `cloud.wekan.fi`), and it looks like the Admin Panel: a
|
||||
left menu and a pane beside it.
|
||||
|
||||
[Weddy](https://github.com/wekan/weddy) has the same Cloud Panel, in Go
|
||||
(caddy-wekan-plugin): the same place to turn it on, the same SuperAdmin and the
|
||||
same Domains columns, so the two read alike.
|
||||
[Weddy](https://github.com/wekan/weddy) has a Cloud Panel too, in Go
|
||||
(caddy-wekan-plugin), with the same Domains columns, so the two read alike.
|
||||
|
||||
## Turning it on
|
||||
## Turning it on: the CLOUD environment variable
|
||||
|
||||
**Admin Panel / People / Cloud** (`/admin/people/cloud`), for site
|
||||
administrators:
|
||||
The Cloud Panel exists **only** where the server has the environment variable
|
||||
`CLOUD` set to the panel's domain:
|
||||
|
||||
- **Cloud Panel Domain** - the panel's own domain;
|
||||
- **SuperAdmin Username** - the existing WeKan administrator who keeps the
|
||||
panel, by username or e-mail address.
|
||||
```
|
||||
CLOUD=cloud.wekan.fi
|
||||
```
|
||||
|
||||
Then point the Cloud Panel Domain at this WeKan (the Caddy pane below writes
|
||||
that route too). At `https://<Cloud Panel Domain>/cloud` - and on its front
|
||||
page - the SuperAdmin has the panel. Anybody else there, or anybody at another
|
||||
domain, gets *The Cloud Panel is only for the SuperAdmin, at the Cloud Panel
|
||||
Domain*. Every method checks the host again on the server, so a customer
|
||||
domain never shows the panel, whoever is signed in.
|
||||
There is no other way to turn it on. Its domain is not a setting in the
|
||||
browser, in the database or in the REST API, and it cannot be added or changed
|
||||
from any of them. Without `CLOUD` - the case of every ordinary WeKan - there is
|
||||
no Cloud tab, no Cloud page, and every `cloudPanel*` method is refused and the
|
||||
attempt is recorded in **Admin Panel / Problems** (CloudPanelBleed, below).
|
||||
|
||||
## The SuperAdmin's menu
|
||||
The panel keeps the database passwords of the customers' WeKan containers and
|
||||
connects to those databases, so it is typically a **WeKan container of its
|
||||
own**, whose purpose is exactly that: to manage the customers' WeKan
|
||||
containers. Point the `CLOUD` domain at that container (the Caddy pane below
|
||||
writes that route too).
|
||||
|
||||
Until 2026-11-22 the panel's domain and its SuperAdmin were set in **Admin
|
||||
Panel / People / Cloud** by any site administrator. A customer is the
|
||||
administrator of their own WeKan, so a customer could turn the panel on in
|
||||
their own container and make its server connect to MongoDB servers on the
|
||||
internal network, with credentials they chose. That pane is gone; a domain
|
||||
stored there then is read by nothing.
|
||||
|
||||
## The Cloud Admins
|
||||
|
||||
In the Cloud Panel's container, the **site administrators are the Cloud
|
||||
Admins** - and the first account registered there is a site administrator, as
|
||||
in every WeKan. So: start the container with `CLOUD`, register, and you are its
|
||||
Cloud Admin. A disabled account is no Cloud Admin, and neither is a customer's
|
||||
account (below), whatever it says about itself.
|
||||
|
||||
At the `CLOUD` address a Cloud Admin has **Admin Panel / Cloud**
|
||||
(`/admin/cloud/domains`): a tab beside Settings, People, Attachments and
|
||||
Problems, shown only when `CLOUD` is set and only to a Cloud Admin at that
|
||||
address. The front page `/` opens it. Every method checks the host again on the
|
||||
server, so a customer domain never shows the panel, whoever is signed in.
|
||||
|
||||
### Domains
|
||||
|
||||
@@ -45,6 +68,10 @@ and TLS. A database without a password is fine. The password is written on the
|
||||
server and never shown again; leaving it empty on an edit keeps it.
|
||||
**Test connection** counts the database's users, boards and cards.
|
||||
|
||||
**Customers who sign in here** lists the usernames (and the customer e-mail
|
||||
address) of the customer's own WeKan that may sign in to the panel - see
|
||||
*The customer login* below.
|
||||
|
||||
**Import into this WeKan** turns ten containers and ten databases into one:
|
||||
it reads the domain's own WeKan database and copies its boards, lists,
|
||||
swimlanes, cards, comments, checklists, custom fields, activities, rules,
|
||||
@@ -68,15 +95,46 @@ domain's Organization, and the domain then shares this WeKan.
|
||||
|
||||
The hosting invoices of each domain: number, date, due date, amount and
|
||||
currency, open, paid (and when) or void, a description and a link to the
|
||||
invoice itself. The SuperAdmin records them - also the ones from before the
|
||||
panel.
|
||||
invoice itself. A Cloud Admin records them - also the ones from before the
|
||||
panel. They are kept in the `cloudInvoices` collection.
|
||||
|
||||
### Chat
|
||||
### Tickets and Chat: the support board
|
||||
|
||||
A conversation per domain between its customer and the SuperAdmin. **Import
|
||||
earlier conversations** brings in a Rocket.Chat export (`.zip`, from "Download
|
||||
my data" or the CSV importer's zip) or a Sandstorm SandChat grain backup
|
||||
(`.zip`), with each message's room, author and time - the same readers the
|
||||
Each customer domain has a **support board**, an ordinary WeKan board called
|
||||
`Support: <domain>`, made when a Cloud Admin saves the domain or when its
|
||||
customer first signs in:
|
||||
|
||||
| List | What it holds |
|
||||
| --- | --- |
|
||||
| **Open**, **In progress**, **Done** | the support **tickets**, one card each |
|
||||
| **Chat** | one card, whose comments are the **support chat** |
|
||||
|
||||
**Tickets** shows the three lists side by side, as Board View / Lists shows a
|
||||
board; a customer adds a ticket (it goes into Open), and a Cloud Admin moves it
|
||||
on. **Chat** shows the chat card's comments - the same messages Board View /
|
||||
Chat shows on the board itself, where a card is a channel and its comments are
|
||||
the messages. Both panes have **Open the support board**, which opens the
|
||||
board in WeKan, with all its views.
|
||||
|
||||
Who is on the board, and as what:
|
||||
|
||||
| Who | Role | Why |
|
||||
| --- | --- | --- |
|
||||
| the Cloud Admins | **Board admin** | everything |
|
||||
| the domain's customers | **Comment only** | they read every ticket and comment and write in the chat; they cannot create, edit, move, archive or delete a card, nor manage the board |
|
||||
|
||||
*Comment only* is the strongest of the nine roles
|
||||
([Roles](../Board-Sidebar/Members/Roles.md)) that cannot delete, archive or
|
||||
move a card: *Normal* could archive and move the tickets, a *Worker* could move
|
||||
them. Adding a ticket is the one write a customer makes, and the panel's own
|
||||
method makes it for them - one card, into Open. A customer the domain no
|
||||
longer lists is no longer a member.
|
||||
|
||||
The chat of the earlier panel (`cloudChatMessages`) is moved once into the
|
||||
chat card, with each message's time, and marked as moved. **Import earlier
|
||||
conversations** brings in a Rocket.Chat export (`.zip`, from "Download my data"
|
||||
or the CSV importer's zip) or a Sandstorm SandChat grain backup (`.zip`) into
|
||||
the chat card, with each message's room, author and time - the same readers the
|
||||
board import uses.
|
||||
|
||||
### CloudFlare
|
||||
@@ -91,24 +149,124 @@ is reported.
|
||||
|
||||
### Caddy
|
||||
|
||||
The Caddyfile of the panel and every domain: the Cloud Panel Domain and each
|
||||
The Caddyfile of the panel and every domain: the `CLOUD` domain and each
|
||||
shared domain to this WeKan, each domain with its own database to its
|
||||
container, only within its dates. **Show Caddyfile** shows it; **Load into
|
||||
Caddy** sends it to Caddy's admin API (`http://caddy:2019/load`).
|
||||
|
||||
## A customer's menu
|
||||
### Allowed addresses
|
||||
|
||||
A WeKan user whose e-mail address is a domain's Customer or Billing email
|
||||
address - or who is named among its customers - signs in at the Cloud Panel
|
||||
Domain and sees **Invoices** (their own, and whether and when each was paid)
|
||||
and **Chat** with the SuperAdmin. Nothing of another domain.
|
||||
The IPv4 and IPv6 addresses, and address ranges such as `203.0.113.0/24` or
|
||||
`2001:db8::/32`, from which a Cloud Admin may sign in at the `CLOUD` address,
|
||||
one per line. **Empty: any address.**
|
||||
|
||||
When the list is set, a Cloud Admin's login from any other address is refused -
|
||||
every kind of login, so an earlier session is refused too when it reconnects -
|
||||
and every Cloud Admin method called from elsewhere is refused. Each refused
|
||||
login is recorded in Admin Panel / Problems. Customers are not limited by it.
|
||||
|
||||
The address is the client's, as every other login guard of WeKan reads it: the
|
||||
connection's own address, and `X-Forwarded-For` only as far as
|
||||
`HTTP_FORWARDED_COUNT` says how many proxies to trust. Behind Caddy, set
|
||||
`HTTP_FORWARDED_COUNT=1`. An IPv4 client of a dual-stack socket
|
||||
(`::ffff:203.0.113.7`) is its IPv4 address.
|
||||
|
||||
The pane shows **your address now**, warns while you type a list that does not
|
||||
have it, and the server **refuses to save** such a list: saving it would lock
|
||||
you out at once.
|
||||
|
||||
**Locked out anyway** (your address changed): restart the container with
|
||||
`CLOUD_ADMIN_ANY_ADDRESS=true`, which sets the list aside, sign in, fix the
|
||||
list, and restart without it. Or clear the list in the database:
|
||||
|
||||
```
|
||||
mongosh wekan --eval 'db.cloudSettings.updateOne({ _id: "cloud" }, { $unset: { allowedAddresses: "" } })'
|
||||
```
|
||||
|
||||
## The customer login
|
||||
|
||||
A customer whose domain has **its own WeKan and database** signs in at the
|
||||
`CLOUD` address with the **password they have in their own WeKan**, and as the
|
||||
name **`username_customerdomain`** - their username there, an underscore, and
|
||||
their domain, for example `anna_customer1.example.com`. So the same username at
|
||||
two domains is two customers: the part after the last underscore picks the
|
||||
domain, and only that domain's database is asked about the username before it.
|
||||
The panel's account for them has the same name. A bare username (or the
|
||||
customer e-mail address) also works while exactly one domain lists it. The panel checks the password directly against that
|
||||
customer's database - the password hash in `users.services.password`, with the
|
||||
same bcrypt or Argon2 that Meteor's accounts-password uses there, and the
|
||||
customer's two-factor code when their account has one.
|
||||
|
||||
It does that only:
|
||||
|
||||
- when `CLOUD` is set, at the `CLOUD` address;
|
||||
- for a name the domain lists - **Customers who sign in here**, or its
|
||||
customer e-mail address. A name no domain lists is not looked up anywhere: no
|
||||
customer's database is ever searched for a stranger, and a bare name two
|
||||
domains list is refused rather than guessed - `username_customerdomain`
|
||||
says which one;
|
||||
- when no account of the panel's own has that name. A Cloud Admin always signs
|
||||
in with the panel's own password, and no customer database can stand in for
|
||||
it;
|
||||
- for an account that is not disabled in the customer's own WeKan and has a
|
||||
password there (an LDAP or OAuth account has none, and is refused).
|
||||
|
||||
On success the customer has an account at the panel, made the first time: not
|
||||
an administrator, with **no password of its own** (every login asks the
|
||||
customer's database again), marked `services.cloudCustomer` with the domain and
|
||||
their account there. With it they see exactly their own domain - never another
|
||||
domain that lists a name like theirs:
|
||||
|
||||
- **Info** - the domain, its customer name, Start and End Date, and its kind;
|
||||
- **Invoices** - their own, and whether and when each was paid;
|
||||
- **Tickets** and **Chat** - their domain's support board.
|
||||
|
||||
A customer of a domain that **shares this WeKan** has an account here already,
|
||||
and signs in with it; a domain lists them by username or by its Customer or
|
||||
Billing e-mail address.
|
||||
|
||||
## No REST API at the CLOUD address
|
||||
|
||||
At the `CLOUD` address there is no REST API for anybody who is not signed in:
|
||||
|
||||
- `POST /users/login` and `/users/register` are not there at all - signed in or
|
||||
not, since both are ways of getting a login;
|
||||
- every other `/api/...` and `/users/...` request without a login is answered
|
||||
*404 There is no REST API at this address*, and recorded in Admin Panel /
|
||||
Problems.
|
||||
|
||||
So the panel has no sign-in but its own page, with its brute-force brakes and
|
||||
its allowed addresses. A signed-in Cloud Admin's own exports, which carry their
|
||||
login, still work. Every other host name of the container - and every WeKan
|
||||
without `CLOUD` - is unchanged.
|
||||
|
||||
The inbound email and bounce webhooks are `/api/` addresses too, and they are
|
||||
not at the `CLOUD` address either: the panel turns no email into cards and
|
||||
sends nothing that bounces. A mail provider that must post to this container
|
||||
posts to another host name of it.
|
||||
|
||||
## CloudPanelBleed: what Admin Panel / Problems shows
|
||||
|
||||
| Key | When |
|
||||
| --- | --- |
|
||||
| `authz.cloud-panel-off` | a Cloud Panel method called on a WeKan without `CLOUD` |
|
||||
| `authz.cloud-panel-access` | a Cloud Admin method called at the `CLOUD` address by somebody who is not a Cloud Admin there, or the old domain setting asked for |
|
||||
| `authn.cloud-admin-address` | a Cloud Admin login from an address not in the allowed addresses |
|
||||
| `authn.cloud-rest-off` | the REST API at the `CLOUD` address without a login |
|
||||
|
||||
None of them disables the account: the call is refused, and the record is
|
||||
there for the administrator to see. Asking whether there is a panel at all
|
||||
(`cloudPanelWhoAmI`, which every page load asks) is not an attempt and is not
|
||||
recorded.
|
||||
|
||||
## Code
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
| `models/lib/cloudPanel.js` | the rules, as pure functions: settings, domains, databases, who is who, the Caddyfile, the DNS plan, invoices, chat, the import's accounts and ids |
|
||||
| `models/lib/cloudPanel.js` | the rules, as pure functions: the CLOUD gate, domains, databases, who is who, the customer login's decisions, the support board's members, the REST gate, the Caddyfile, the DNS plan, invoices, chat, the import's accounts and ids |
|
||||
| `models/lib/cloudAddresses.js` | the allowed addresses: IPv4, IPv6, CIDR |
|
||||
| `models/cloudPanel.js` | the collections `cloudSettings`, `cloudDomains`, `cloudInvoices`, `cloudChatMessages` - no client writes, no publications |
|
||||
| `server/cloudPanel.js` | the methods, with who may call them, on which host |
|
||||
| `client/components/cloud/cloudPanel.*` | the panel, and the Admin Panel / People / Cloud pane |
|
||||
| `tests/cloudPanel.test.cjs` | the rules; `tests/cloudPanelAccess.test.cjs` who may do what, the import, CloudFlare, Caddy and the chat import |
|
||||
| `server/cloudPanel.js` | the methods, with who may call them, on which host; the customer login handler; the allowed-addresses login check |
|
||||
| `server/apiMiddleware.js` | `cloudHostRestGate`: no REST API at the CLOUD address without a login |
|
||||
| `client/components/cloud/cloudPanel.*` | Admin Panel / Cloud and the customers' /cloud |
|
||||
| `tests/cloudPanel.test.cjs` | the rules; `tests/cloudAddresses.test.cjs` the addresses; `tests/cloudPanelAccess.test.cjs` who may do what, the customer login, the support boards, the import, CloudFlare, Caddy and the chat import; `tests/cloudPanelGate.test.cjs` that the only MongoClient built from data that is not the environment is behind the gate; `server/lib/tests/cloudPanel.security.tests.js` the real server without CLOUD; `tests/playwright/specs/cloud-panel.e2e.js` the browser |
|
||||
@@ -1,22 +1,98 @@
|
||||
# People / Audit log
|
||||
|
||||
## What it is
|
||||
|
||||
`/admin/people/audit-log`, site administrators only.
|
||||
|
||||
Every administrative action of a site administrator, newest first, one row
|
||||
each: when, who, which action, whether it succeeded (a refused call is shown
|
||||
too, with its error), its arguments and the address it came from. The search
|
||||
box matches the administrator, the action and the arguments.
|
||||
The audit log is the trail of what site administrators did: every
|
||||
administrative action, newest first, one row each - when, who, which action,
|
||||
whether it succeeded (a refused call is shown too, with its error), its
|
||||
arguments and the address it came from. It answers "who changed this, and
|
||||
when" for people, login, storage and backup changes.
|
||||
|
||||
## Read more
|
||||
|
||||
- [Audit trail](https://en.wikipedia.org/wiki/Audit_trail) on Wikipedia.
|
||||
- [Logging (computing)](https://en.wikipedia.org/wiki/Logging_(computing)) on
|
||||
Wikipedia.
|
||||
- [Security settings](../../../Security/Security-Settings.md) - attacks WeKan
|
||||
refused are in Admin Panel / Problems, not here.
|
||||
- [Security report](../Problems/Security-Report.md) in Admin Panel / Problems.
|
||||
|
||||
## How to use it
|
||||
|
||||
**Read the trail**
|
||||
|
||||
1. Sign in as a site administrator.
|
||||
2. Open **Admin Panel**, then **People**, then **Audit log** in the left menu
|
||||
(`/admin/people/audit-log`).
|
||||
3. The table shows **When**, **Administrator**, **Action**, **Details** (the
|
||||
recorded arguments) and **IP**. A failed call is marked and its error is
|
||||
shown beside the action.
|
||||
4. Use the **‹** and **›** buttons under the table to move between pages; the
|
||||
line between them shows `page / pages (total)`.
|
||||
|
||||
**Search it**
|
||||
|
||||
1. Type into the search box above the table.
|
||||
2. The rows are narrowed to the ones whose administrator, action or arguments
|
||||
contain the text (case does not matter).
|
||||
|
||||
## How the numbers are calculated
|
||||
|
||||
From [server/adminAudit.js](../../../../server/adminAudit.js) and
|
||||
[models/lib/adminAudit.js](../../../../models/lib/adminAudit.js):
|
||||
|
||||
- **Rows per page**: 50 (`PER_PAGE`), sorted by time, newest first.
|
||||
- **Page**: at least 1; **pages** is the total divided by 50, rounded up.
|
||||
- **Total**: the number of entries matching the search, counted on the server.
|
||||
- **Search**: at most the first 100 characters of what is typed are used.
|
||||
- **Kept for**: 365 days (`AUDIT_KEEP_DAYS`). Older entries are removed by a
|
||||
prune that runs once when WeKan starts and then once a day.
|
||||
- **Recorded arguments**: each string is cut to 200 characters, an array or an
|
||||
object to its first 20 items (the rest shown as `[+N]`), nesting to 4
|
||||
levels, and the whole summary to 2000 characters.
|
||||
- **Error text**: cut to 200 characters.
|
||||
- **IP**: the client address, taking `HTTP_FORWARDED_COUNT` trusted proxies
|
||||
into account, the same way the login throttle reads it.
|
||||
|
||||
## How it works in WeKan
|
||||
|
||||
What is recorded: changes to people (Add user, Set password, username, email,
|
||||
admin and active flags, removing a user, impersonation, unlocking), to
|
||||
organizations and teams, to login and site settings, to attachment storage,
|
||||
and backups, restores and data repairs. An administrator editing cards is a
|
||||
member editing cards and is not recorded. The list of actions is
|
||||
`AUDITED_METHODS` in `models/lib/adminAudit.js`.
|
||||
`AUDITED_METHODS` in [models/lib/adminAudit.js](../../../../models/lib/adminAudit.js).
|
||||
|
||||
The Admin Panel's switches that are saved straight from the browser - Settings
|
||||
/ Appearance and Features, Announcement, Accessibility, Translation, Locked
|
||||
users, Account settings, the table visibility modes, the invite roles and the
|
||||
attachment storage settings - are recorded too, as the collection write they
|
||||
are (for example `/settings/update`, with the changed fields), and so is
|
||||
anonymising a user (`anonymizeUser`).
|
||||
|
||||
A password or a secret is never recorded: values under a credential-named key,
|
||||
the arguments that are a password by position and a password inside a URL are
|
||||
shown as `[redacted]`.
|
||||
|
||||
Entries are kept for a year and then removed. Attacks WeKan refused are in
|
||||
Admin Panel / Problems instead; see [Security settings](../../../Security/Security-Settings.md).
|
||||
- [server/adminAudit.js](../../../../server/adminAudit.js) wraps each audited
|
||||
Meteor method at startup (and again after the other startup hooks). The
|
||||
wrapper looks up the caller BEFORE the call, so removing one's own admin
|
||||
rights is recorded too. Only a caller whose `isAdmin` is `true` is
|
||||
recorded; the method's result and error are passed through unchanged, and a
|
||||
failure to write the log never changes what the method did.
|
||||
- Entries are documents in the `adminAuditLog` collection: `at`, `actorId`,
|
||||
`actorUsername`, `method`, `args` (the redacted summary), `ok`, `error`,
|
||||
`ip`, with an index on `at`.
|
||||
- The `adminAuditLogPage` method serves one page; it refuses anybody who is not
|
||||
an active site administrator (`error-notAuthorized`).
|
||||
- The pane is [client/components/settings/adminAuditLog.jade](../../../../client/components/settings/adminAuditLog.jade)
|
||||
and [adminAuditLog.js](../../../../client/components/settings/adminAuditLog.js),
|
||||
shown from [peopleBody.jade](../../../../client/components/settings/peopleBody.jade).
|
||||
- Pinned by [tests/adminAudit.test.cjs](../../../../tests/adminAudit.test.cjs).
|
||||
|
||||
## Commits
|
||||
|
||||
- [Sign-up and every method pass audit-argument-checks again with the audit wrapper](https://github.com/wekan/wekan/commit/508484ef1e195a1db7a7e795faf1f20d6c5a387a)
|
||||
- [Add the Audit log pane: what site administrators did](https://github.com/wekan/wekan/commit/4d5b83249959242169861b64227198e420d90d77)
|
||||
@@ -1,5 +1,7 @@
|
||||
# Admin Panel / People / Domains
|
||||
|
||||
## What it is
|
||||
|
||||
Every e-mail domain in use across the instance, with the number of users on it. A
|
||||
read-only [table page](../../General/Table.md): search on Enter, a total,
|
||||
`page X / N`, prev/next, one page at a time from the server.
|
||||
@@ -7,6 +9,67 @@ read-only [table page](../../General/Table.md): search on Enter, a total,
|
||||
It answers "who is on this instance, by organization" without reading the user list,
|
||||
and is the quickest way to spot an unexpected domain.
|
||||
|
||||
Related, but different: the invite-domain field in [E-mail](E-mail.md), and
|
||||
per-organization automatic membership by domain (Organizations / *auto add users
|
||||
with domain name*).
|
||||
## Read more
|
||||
|
||||
- [Domain name](https://en.wikipedia.org/wiki/Domain_name) and
|
||||
[Email address](https://en.wikipedia.org/wiki/Email_address) on Wikipedia -
|
||||
the domain is the part of an address after the `@`.
|
||||
- Related, but different: the invite-domain field in [E-mail](E-mail.md), and
|
||||
per-organization automatic membership by domain (Organizations / *auto add
|
||||
users with domain name*, see [Organizations](Organizations.md)).
|
||||
|
||||
## How to use it
|
||||
|
||||
1. Sign in as a site administrator.
|
||||
2. Open **Admin Panel**, **People**, then **Domains** in the left menu
|
||||
(`/admin/people/domains`). It sits beside **E-mail** and **Notifications**.
|
||||
3. Read the table: one row per domain, with how many users have it.
|
||||
4. To find one domain, type part of it into the search box and press Enter.
|
||||
5. Move between pages with the previous / next buttons; the total and
|
||||
`page X / N` are shown with them.
|
||||
|
||||
## How the numbers are calculated
|
||||
|
||||
From `getDomainsWithUserCountsPage` in
|
||||
[server/models/users.js](../../../../server/models/users.js) and
|
||||
[models/lib/domainTablePage.js](../../../../models/lib/domainTablePage.js):
|
||||
|
||||
- **A user's domain**: the text after the LAST `@` of the user's FIRST e-mail
|
||||
address, trimmed and lower-cased. A user without an address, or without an
|
||||
`@` in it, is not counted. Other addresses of the same user are not counted.
|
||||
- **Count per domain**: the number of users whose first address has that
|
||||
domain. Every user is counted, active or not.
|
||||
- **Search**: a case-insensitive substring match on the domain.
|
||||
- **Order**: by domain, ascending, compared case-insensitively and with
|
||||
numbers in natural order (`a2` before `a10`). Clicking a column header does
|
||||
not sort.
|
||||
- **Rows per page**: 10 (`PER_PAGE_DEFAULT`, the same number as every other
|
||||
table page); the server accepts at most 200.
|
||||
- **Total**: the number of domains that match the search; **pages** is the
|
||||
total divided by the rows per page, rounded up, at least 1. A page number
|
||||
past the end is moved to the last page, so a stale page is never empty.
|
||||
|
||||
## How it works in WeKan
|
||||
|
||||
- The pane is the `domainGeneral` template in
|
||||
[peopleBody.jade](../../../../client/components/settings/peopleBody.jade),
|
||||
drawn by the shared table page; its data comes from the
|
||||
`getDomainsWithUserCountsPage` method, called from
|
||||
[peopleBody.js](../../../../client/components/settings/peopleBody.js).
|
||||
- The method is for site administrators only (`isAdmin`); anybody else gets
|
||||
`not-authorized`. It reads the `emails` of every user, groups them by
|
||||
domain and hands the rows to `paginateDomains`, a pure function that
|
||||
filters, sorts and returns one page plus the total.
|
||||
- Nothing is stored: the table is computed on every request.
|
||||
- Pinned by [tests/domainTablePage.test.cjs](../../../../tests/domainTablePage.test.cjs)
|
||||
and [tests/tablePage.test.cjs](../../../../tests/tablePage.test.cjs), which
|
||||
keeps the 10 rows per page the same as the shared table page.
|
||||
|
||||
## Commits
|
||||
|
||||
- [Paginate the admin lists honestly: one page of ten](https://github.com/wekan/wekan/commit/c1add5bc5e5537e3cc8f96076164ebdf4328b0e8)
|
||||
- [Render the Domains pane through the shared table page](https://github.com/wekan/wekan/commit/4eab5ffe9f41433ae3ad268eb22395673a1407d4)
|
||||
- [Remove clickable column-header sorting from the Domains table](https://github.com/wekan/wekan/commit/6d3c550d8d462fa92984fd6dee644642706569b1)
|
||||
- [Server-side pagination and search for the Domains table](https://github.com/wekan/wekan/commit/b2da9ac8d47e7986198ba4be34c5fdccce45526e)
|
||||
- [REST API for the Domains list](https://github.com/wekan/wekan/commit/dbaa27dd67d88e87db9cdac286029bd208bbc008)
|
||||
- [Add the Domains pane: e-mail domains with a user count each](https://github.com/wekan/wekan/commit/8849b015dd3debdca4445fbf097e289c5be08128)
|
||||
@@ -1,30 +1,126 @@
|
||||
# Admin Panel / People / E-mail
|
||||
|
||||
Outgoing email and two account settings.
|
||||
## What it is
|
||||
|
||||
- **Enable below email settings** — opt in to configuring outgoing email here.
|
||||
When enabled, choose either custom **SMTP** or one of the many built-in
|
||||
Nodemailer providers, including Gmail, Gmail Workspace, Outlook 365, Proton,
|
||||
SendGrid, Mailgun, Postmark, Resend and AWS SES regions. Enter the selected
|
||||
provider's username, password and From address; custom SMTP also asks for
|
||||
host, port and TLS. Each provider retains its own configuration.
|
||||
- When **Enable below email settings** is disabled, WeKan continues to use the
|
||||
installation's `MAIL_URL` and `MAIL_FROM` environment settings. This preserves
|
||||
existing Snap, Docker, bundle and source configurations until an administrator
|
||||
explicitly enables the Admin Panel transport.
|
||||
- **Email domain allowed to invite people, when self-registration is disabled**
|
||||
(`mailDomainName`) — this does **not** limit who may sign in. A **non-admin** whose
|
||||
address ends with this domain may send board invitations, and only while
|
||||
self-registration is off (admins may always invite). It is a plain suffix match, so
|
||||
write it as `@example.com`; `example.com` alone would also match
|
||||
`user@notexample.com`.
|
||||
- **Allow Email Change** — whether a user may change their own e-mail address.
|
||||
Outgoing email and two account settings: how WeKan sends mail (its own
|
||||
`MAIL_URL` environment setting, or a provider configured here), which e-mail
|
||||
domain may invite people when self-registration is off, and whether users may
|
||||
change their own address. The same pane also holds what WeKan does with mail
|
||||
that bounces, and the optional templates of the invite and activity e-mails.
|
||||
It is the pane Admin Panel / People opens on (`/admin/people/email`).
|
||||
|
||||
Use the **Save** button directly below the provider fields. **Send SMTP test
|
||||
email** sends one to your own address using the active transport and reports
|
||||
what happened.
|
||||
|
||||
## Related
|
||||
## Read more
|
||||
|
||||
- [Simple Mail Transfer Protocol](https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol)
|
||||
and [Bounce message](https://en.wikipedia.org/wiki/Bounce_message) on
|
||||
Wikipedia.
|
||||
- [Nodemailer well-known services](https://nodemailer.com/smtp/well-known-services) -
|
||||
the provider list the **Email service** choice comes from.
|
||||
- [E-mail troubleshooting](../../General/Email/Troubleshooting-Mail.md)
|
||||
- [Bounces](../../General/Email/Bounces.md) - the bounce settings in detail.
|
||||
- [Domains](Domains.md) — which domains are actually in use.
|
||||
- [Invite People](../../Member-Settings/Invite-People.md)
|
||||
|
||||
## How to use it
|
||||
|
||||
**Send mail through a provider configured here**
|
||||
|
||||
1. Open **Admin Panel**, **People**, **E-mail**.
|
||||
2. Tick **Enable below email settings** — opt in to configuring outgoing email
|
||||
here.
|
||||
3. In **Email service**, choose either custom **SMTP** or one of the many
|
||||
built-in Nodemailer providers, including Gmail, Gmail Workspace, Outlook
|
||||
365, Proton, SendGrid, Mailgun, Postmark, Resend and AWS SES regions.
|
||||
4. Enter the selected provider's **Username**, **Password** and **From**
|
||||
address; custom SMTP also asks for **SMTP Host**, **SMTP Port** and
|
||||
**Enable TLS support for SMTP server**. Each provider retains its own
|
||||
configuration. A password that is already saved is kept when the field is
|
||||
left blank ("A password is saved. Leave blank to keep it.").
|
||||
5. Use the **Save** button directly below the provider fields.
|
||||
6. Click **Send a test email to yourself** at the top of the pane. It sends
|
||||
one to your own address using the active transport and reports what
|
||||
happened.
|
||||
|
||||
When **Enable below email settings** is disabled, WeKan continues to use the
|
||||
installation's `MAIL_URL` and `MAIL_FROM` environment settings. This preserves
|
||||
existing Snap, Docker, bundle and source configurations until an administrator
|
||||
explicitly enables the Admin Panel transport.
|
||||
|
||||
**Let people of one domain invite, and allow e-mail changes**
|
||||
|
||||
1. At the bottom of the pane, fill in **Email domain allowed to invite people,
|
||||
when self-registration is disabled** (`mailDomainName`) — this does **not**
|
||||
limit who may sign in. A **non-admin** whose address ends with this domain
|
||||
may send board invitations, and only while self-registration is off (admins
|
||||
may always invite). It is a plain suffix match, so write it as
|
||||
`@example.com`; `example.com` alone would also match `user@notexample.com`.
|
||||
2. Tick or untick **Allow Email Change** — whether a user may change their own
|
||||
e-mail address.
|
||||
3. Click the **Save** under these two settings.
|
||||
|
||||
**Bounces and e-mail templates**
|
||||
|
||||
1. Under **Bounces**, tick **Handle bounces in WeKan** to act on mail that comes
|
||||
back, choose an action per category and **After how many**, and save; see
|
||||
[Bounces](../../General/Email/Bounces.md).
|
||||
2. Under **Email Templates**, fill in **Invite email subject**, **Invite email
|
||||
body**, **Activity notification email subject** and **Activity
|
||||
notification email body**, and click **Save**. A field left empty keeps the
|
||||
built-in e-mail. The invite templates may use `{email} {inviter} {user}
|
||||
{icode} {url}`; the activity templates `{board} {card} {list} {username}
|
||||
{url} {comment} {action}`.
|
||||
|
||||
## How the numbers are calculated
|
||||
|
||||
- **Email service choices**: 87 - `SMTP` plus the 86 Nodemailer services in
|
||||
[models/lib/mailServices.js](../../../../models/lib/mailServices.js).
|
||||
- **SMTP Port**: free text; the placeholder suggests `587`.
|
||||
- **Bounce threshold**: a whole number from 1 to 100 per category - how many
|
||||
bounces of that kind before the action is taken (see
|
||||
[Bounces](../../General/Email/Bounces.md)).
|
||||
- The invite domain is not a number: it is an `endsWith` test of each of the
|
||||
inviter's addresses (`isNonAdminAllowedToSendMail` in
|
||||
[server/models/settings.js](../../../../server/models/settings.js)).
|
||||
|
||||
## How it works in WeKan
|
||||
|
||||
- The pane is the `email` template in
|
||||
[client/components/settings/settingBody.jade](../../../../client/components/settings/settingBody.jade)
|
||||
(it moved to People from Settings; Blaze templates are global, so it is
|
||||
still defined there) and is drawn by
|
||||
[peopleBody.jade](../../../../client/components/settings/peopleBody.jade).
|
||||
- `saveAdminMailSettings` in
|
||||
[server/models/settings.js](../../../../server/models/settings.js) is
|
||||
admin-only. It checks the service against the list, requires a host for
|
||||
SMTP and a From address when the transport is enabled, stores each
|
||||
service's configuration under `mailServer.configurations.<service>` and its
|
||||
password under `mailServer.passwords.<service>` (never sent back to the
|
||||
browser - only `passwordSet`), and then installs the Admin Panel transport,
|
||||
or puts the `MAIL_URL` transport back when it is disabled.
|
||||
- `sendSMTPTestEmail` is admin-only and sends to the administrator's first
|
||||
e-mail address.
|
||||
- The invite domain and **Allow Email Change** are fields of the `settings`
|
||||
document (`mailDomainName`) and of the account settings.
|
||||
- On Sandstorm this pane is not shown: a grain sends its mail through
|
||||
Sandstorm.
|
||||
- Every save is recorded in the [Audit log](Audit-Log.md)
|
||||
(`saveAdminMailSettings`, `saveEmailBounceSettings`).
|
||||
- Pinned by [tests/adminMailSettings.test.cjs](../../../../tests/adminMailSettings.test.cjs),
|
||||
[tests/smtpDeadline.test.cjs](../../../../tests/smtpDeadline.test.cjs),
|
||||
[tests/emailBounce.test.cjs](../../../../tests/emailBounce.test.cjs),
|
||||
[tests/emailTemplatesCustomization.test.cjs](../../../../tests/emailTemplatesCustomization.test.cjs),
|
||||
[tests/loginEmailPanesMoved.test.cjs](../../../../tests/loginEmailPanesMoved.test.cjs)
|
||||
and the browser test
|
||||
[tests/playwright/specs/46-admin-email-services.e2e.js](../../../../tests/playwright/specs/46-admin-email-services.e2e.js).
|
||||
|
||||
## Commits
|
||||
|
||||
- [Email bounces from Mailgun, SendGrid, Postmark, Brevo and more](https://github.com/wekan/wekan/commit/57e05c4304ea34a082e88326c8221cc5cc768dee)
|
||||
- [Email bounces with Amazon SES](https://github.com/wekan/wekan/commit/79ac3016751a4633f9efb1eda2102dcb798378b4)
|
||||
- [Bound SMTP connection phases and idle waits](https://github.com/wekan/wekan/commit/9758886cfaea1ef0463e3bca4c0f4b0a378515f3)
|
||||
- [Add the Email Templates settings](https://github.com/wekan/wekan/commit/f6e98f1205e7b9ddeba094f8e5ceb2ac36eb2621)
|
||||
- [Add the Nodemailer service settings](https://github.com/wekan/wekan/commit/395f10e030e573ba3362e46a5916f1ea75651501)
|
||||
- [Allow Email Change becomes a checkbox](https://github.com/wekan/wekan/commit/362b14c3d9f89a74a29146f4dcee09fa5568e04a)
|
||||
- [The Save saves, and the invite domain field says what it does](https://github.com/wekan/wekan/commit/f15b37e4e013814ced8165f905eb6540d61bb90f)
|
||||
- [Login and E-mail move from Settings to People](https://github.com/wekan/wekan/commit/47b03ef89404c446dbaf0fc94c7271abaf82e5ef)
|
||||
- [Move the e-mail domain field out of Settings / Layout](https://github.com/wekan/wekan/commit/1bedcf9eb000850de6fd74c158fdcd0d36b6ec59)
|
||||
@@ -1,14 +1,129 @@
|
||||
# Admin Panel / People / Locked Users
|
||||
|
||||
Brute-force protection: how many failed sign-in attempts lock an account, for how
|
||||
long, and the list of who is locked out right now.
|
||||
## What it is
|
||||
|
||||
Separate limits are kept for **known users** (an existing account) and **unknown
|
||||
users** (an address with no account), so guessing usernames cannot lock out real
|
||||
people faster than it is worth.
|
||||
Brute-force protection: how many failed sign-in attempts lock an account out,
|
||||
for how long, and within which time window the failures are counted. The pane
|
||||
is titled **Brute Force Protection Settings**.
|
||||
|
||||
**Unlock all users** is one of the actions in [People](People.md).
|
||||
Separate limits are kept for **known users** (an existing account: correct
|
||||
username, wrong password) and **unknown users** (a username with no account),
|
||||
so guessing usernames cannot lock out real people faster than it is worth.
|
||||
|
||||
## Related
|
||||
Who is locked out right now is shown in [People](People.md): a red lock in the
|
||||
**Status** column, and the **Locked Users Only** choice of its **Show:**
|
||||
filter. **Unlock All** is one of the actions in [People](People.md). (This
|
||||
pane itself shows only the settings; it no longer lists the locked accounts.)
|
||||
|
||||
## Read more
|
||||
|
||||
- [Brute-force attack](https://en.wikipedia.org/wiki/Brute-force_attack) and
|
||||
[Password cracking](https://en.wikipedia.org/wiki/Password_cracking) on
|
||||
Wikipedia.
|
||||
- [OWASP: Blocking brute force attacks](https://owasp.org/www-community/controls/Blocking_Brute_Force_Attacks)
|
||||
- [Brute-force protection](../../../Security/brute-force-protection.md)
|
||||
- [Accounts lockout](../../Login-Page/Accounts-Lockout.md)
|
||||
- [Login problems](../Problems/Login-Problems.md) - a lockout that fires is
|
||||
shown in Admin Panel / Problems.
|
||||
|
||||
## How to use it
|
||||
|
||||
**Change the limits**
|
||||
|
||||
1. Open **Admin Panel**, **People**, **Locked Users**
|
||||
(`/admin/people/locked-users`).
|
||||
2. Under **Settings for known users (correct username, wrong password)** and
|
||||
under **Settings for unknown users (non-existent username)**, fill in
|
||||
**Failures before lockout**, **Lockout period (seconds)** and **Failure
|
||||
window (seconds)**.
|
||||
3. Click **Save**. The new values apply at once ("Brute force protection
|
||||
settings have been updated"); no restart is needed.
|
||||
|
||||
**See and release locked accounts**
|
||||
|
||||
1. Open **Admin Panel**, **People**, **People**.
|
||||
2. In **Show:**, choose **Locked Users Only**.
|
||||
3. Click a red lock in the **Status** column to unlock that account, or click
|
||||
**Unlock All** to unlock every locked account.
|
||||
|
||||
## How the numbers are calculated
|
||||
|
||||
From [packages/wekan-accounts-lockout/src/lockoutDecision.js](../../../../packages/wekan-accounts-lockout/src/lockoutDecision.js),
|
||||
[server/accounts-lockout-config.js](../../../../server/accounts-lockout-config.js)
|
||||
and [models/lib/accountLockout.js](../../../../models/lib/accountLockout.js):
|
||||
|
||||
| Field | Default | Form range |
|
||||
| --- | --- | --- |
|
||||
| Failures before lockout | 3 | 1 to 10 |
|
||||
| Lockout period (seconds) | 60 | 10 to 600 |
|
||||
| Failure window (seconds) | 15 | 1 to 60 |
|
||||
|
||||
The defaults are the same for known and unknown users. An empty, zero or
|
||||
unreadable value falls back to its default, so a broken setting never leaves
|
||||
WeKan without a lockout.
|
||||
|
||||
- **The counter** is per account AND per source address (GHSA-rf3w-rj48-jxcc):
|
||||
an attacker locks out the address they attack from, not the account's owner.
|
||||
- **Each wrong password** adds 1 to that address's counter. When more than
|
||||
**Failure window** seconds have passed since the first failure of the run,
|
||||
the count starts again at 1.
|
||||
- **When the count reaches Failures before lockout**, that address is locked
|
||||
for **Lockout period** seconds. Wrong passwords during the lock do not extend
|
||||
it.
|
||||
- **A correct password** is always allowed, even during a lock, and clears that
|
||||
address's counter.
|
||||
- **Increasing delays**: the decision module can make each further wrong
|
||||
password wait longer (a base that doubles each time, up to a maximum:
|
||||
`loginDelayBase` and `loginDelayMax`). The settings WeKan builds at startup
|
||||
and on Save do not include these two values, so no delay is applied unless
|
||||
`Meteor.settings['accounts-lockout'].knownUsers` sets them.
|
||||
- **Locked, in People**: an account counts as locked while any of its
|
||||
addresses has an unlock time in the future. The remaining time is the
|
||||
longest of them, rounded up to whole seconds.
|
||||
|
||||
## How it works in WeKan
|
||||
|
||||
- The settings are documents of the `lockoutSettings` collection,
|
||||
[models/lockoutSettings.js](../../../../models/lockoutSettings.js), with ids
|
||||
`known-failuresBeforeLockout`, `known-lockoutPeriod`, `known-failureWindow`
|
||||
and the same three with `unknown-`.
|
||||
- The pane is the `lockedUsersGeneral` template in
|
||||
[peopleBody.jade](../../../../client/components/settings/peopleBody.jade)
|
||||
and [lockedUsersBody.js](../../../../client/components/settings/lockedUsersBody.js).
|
||||
Save writes the six documents and then calls `reloadAccountsLockout`
|
||||
([server/methods/lockoutSettings.js](../../../../server/methods/lockoutSettings.js)),
|
||||
which is admin-only and restarts the lockout with the new values.
|
||||
- At startup, [server/accounts-lockout-config.js](../../../../server/accounts-lockout-config.js)
|
||||
reads the same settings and starts the `wekan-accounts-lockout` package,
|
||||
which hooks into Meteor's `Accounts.validateLoginAttempt`. A lockout that
|
||||
fires is reported to Admin Panel / Problems
|
||||
([server/lib/lockoutReporter.js](../../../../server/lib/lockoutReporter.js)).
|
||||
- `getLockedUsers`, `unlockUser` and `unlockAllUsers`
|
||||
([server/methods/lockedUsers.js](../../../../server/methods/lockedUsers.js))
|
||||
are admin-only; unlocking is recorded in the [Audit log](Audit-Log.md).
|
||||
- The lock state of a user is `services.accounts-lockout.byAddress`; the
|
||||
`lockedUntil` field beside it is for the People screen only and is never read
|
||||
by the lockout decision.
|
||||
- The Sandstorm package is built without password login, so it has no lockout.
|
||||
- Pinned by [tests/lockoutSettings.test.cjs](../../../../tests/lockoutSettings.test.cjs),
|
||||
[tests/lockoutPerSourceAddress.test.cjs](../../../../tests/lockoutPerSourceAddress.test.cjs),
|
||||
[tests/lockoutConfigFailsClosed.test.cjs](../../../../tests/lockoutConfigFailsClosed.test.cjs),
|
||||
[tests/loginFailureDecision.test.cjs](../../../../tests/loginFailureDecision.test.cjs),
|
||||
[tests/accountLoginDelay.test.cjs](../../../../tests/accountLoginDelay.test.cjs)
|
||||
and the browser test
|
||||
[tests/playwright/specs/corsican-lockout-settings.e2e.js](../../../../tests/playwright/specs/corsican-lockout-settings.e2e.js).
|
||||
|
||||
## Commits
|
||||
|
||||
- [Brute-force lockout starts when Meteor.settings configures it](https://github.com/wekan/wekan/commit/7f9fc2e9573b0854eec90b37147861a8293a1566)
|
||||
- [Leave the lockout out of the Sandstorm package](https://github.com/wekan/wekan/commit/e413cd4720274d50c6c02cf78dbdf56adada4684)
|
||||
- [Brake password guessing per account without locking the owner out](https://github.com/wekan/wekan/commit/fd8b51464f1c88a29ef69390e284bb51a08579ab)
|
||||
- [Start the lockout even when a setting cannot be read](https://github.com/wekan/wekan/commit/3156dec7bc37f989dd58a40362958653ebd62779)
|
||||
- [A lockout never disables the account being guessed](https://github.com/wekan/wekan/commit/c49d9d8d3e29bffeb419ffcfc291f0655c3eaa5c)
|
||||
- [The lockout package is server-only](https://github.com/wekan/wekan/commit/5ce9f181ca4632b87b729245361b012c46f43268)
|
||||
- [Increasing delays after a wrong password, per source address](https://github.com/wekan/wekan/commit/9476cdc0fe6e377c451a19909ee970d14ae9d741)
|
||||
- [People shows who is locked again, and why](https://github.com/wekan/wekan/commit/6e208c6152d9b236c95df3893bc0da6ba4798c14)
|
||||
- [A lockout that fires is visible in Problems](https://github.com/wekan/wekan/commit/c3299c49019053f4e1bfd2f8442b85e2e46993ac)
|
||||
- [JamBleed: the lockout no longer counts an attacker's failures against the victim](https://github.com/wekan/wekan/commit/78478c39d05af52c7b74a09166b8098a5eba552a)
|
||||
- [Migrate the lockout server files to async for Meteor 3](https://github.com/wekan/wekan/commit/b431600d32c0e501b1377fa8063e8da8e7da587b)
|
||||
- [Add the brute-force protection settings, the People filter and Unlock All](https://github.com/wekan/wekan/commit/ae0d059b6feb38a438ca21aa154c63b410641763)
|
||||
Loaded 100 of 1022 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user