mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 10:48:06 -05:00
v11.21
9
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
4ab3161b4f |
Add permanent delete to Admin Panel Problems.
The Delete pane sits above Notifications and exposes the existing, default-off enablePermanentDelete gate for Global Admins. It has its own URL, documentation, and regression coverage for menu order, rendering and the setting handler. Thanks to xet7 ! |
||
|
|
6dc2651b48 |
Admin Panel / Problems / API: who called which endpoint, and how often.
Every other pane under Problems answers what went WRONG. This one answers what is being DONE: `POST /api/boards` called 34 times by alice last month, 812 times yesterday by nobody with an account. Without it the only record of REST API use is whatever the reverse proxy happens to keep, and most instances keep none. The table is username, endpoint, calls, the window they fall in, and the addresses - sorted by calls, because a usage report's question is "what is used most" where a problem report's is "what happened last". THE NAME IS THE ROUTE PATTERN, NOT THE PATH. `/api/boards/:boardId/lists` is one endpoint; `/api/boards/abc123/lists` and ten thousand of its siblings are that one endpoint being used. Naming rows after paths would put a row per board in the collection - the one-row-per-event cost this whole page exists to remove - and a request that matched NO route is counted under a single "(no route)" name rather than under the path it invented, because a 404 sweep is an attacker walking a wordlist and a row per guess would let them fill the database. ONE ROW PER ACCOUNT AND ENDPOINT, which makes the account part of a row's identity - the one deliberate exception to the rule every other stream follows. For those the question is "what is happening" and the caller would multiply the rows; here "who called what" IS the report, and the cardinality is bounded by real accounts times real endpoints. The account is stored by ID, so a rename does not split its history in two. NOTHING PER REQUEST. Ordinary API traffic is not rare the way a guard firing is rare, so calls are counted in memory and folded on a timer - a thousand requests become one write. A few seconds of counts are lost if the process stops between flushes, which is acceptable here and nowhere else on this page: this report decides nothing and nothing is protected by it. The tracked pairs are capped and the rest counted, not dropped. Counting hooks the middleware chain, not the routes, so a route cannot be added without being counted - and it counts on the response's `finish` event, which is where Express has filled req.route.path and authentication has run. The pane is the SHARED event-stream report with a different column list, not a second table page. The API stream is deliberately NOT in EVENT_STREAMS: it is usage, not a problem, and an instance serving its API would otherwise report thousands of new problems. AND THE IPv4/IPv6 SPLIT IS FINISHED WHILE HERE. The summary rows have had ipv4 and ipv6 fields since the summaries were written, and not one of the four loggers ever filled them - so the columns the design asked for could not have worked. The fold splits the address now, once, for every stream, and the two columns are one shared pair used by both reports rather than a copy each. They fall back to classifying the stored `ip`, so rows written before today display correctly instead of showing two empty columns for all of history. Seven i18n keys in 239 language files, in en.i18n.json's order, English as the placeholder where nothing is translated yet. Thanks to xet7 ! |
||
|
|
961ff6cb47 |
Admin Panel / Problems / Offices: where people log in from, grouped.
A new pane at /admin/problems/office, through the shared table page like every
other report here (docs/Features/Page/Table.md) - same layout, same search, same
paginator - so it needed no design of its own.
The columns are what an admin actually asks:
Location the country flag and the city: "London", not 100.100.100.100. An
admin recognises their own offices at a glance, and the flag says
WHICH London. Empty when nothing in front of WeKan resolved it.
Address the IPv4 or IPv6 it really is
People each account as its INITIALS, or its avatar where it has one, with
its own login count beside it - the same way the board sidebar and
a card show a member, and for the same reason: a column of avatars
fits where a column of usernames does not. Clicking one opens the
existing Edit user popup.
Logins how many, and the first-seen / last-seen window they fall in
Two additions to the shared table page rather than a second table: a cell that
holds SEVERAL people, and a leading flag kept apart from the cell's text so it
is not searched or sorted as text. Both are available to every other report now.
The pane is registered the way the others are - slug, title, menu entry,
reactive var, helper, reset and menu branch - and three guards caught the pieces
I would otherwise have missed: adminUrls wanted the URL in the design doc,
adminPanelDocsMatchMenu wanted the pane in the Problems README with its gap
count updated, and tablePage wanted the third paginator handler explained rather
than merely allowed. Ten strings in en.i18n.json, in key order, and appended to
238 language files as English placeholders for the fill rules to replace.
Thanks to xet7 !
|
||
|
|
fa289e4a4d |
Admin Panel Problems: the route and the template say what the menu says.
The pane is called Problems in the menu, its address is /admin/problems, and
docs/Features/Admin-Panel/Problems is where it is documented. Two things still
called it Reports, from before it was renamed:
* the route NAME was 'admin-reports', where its three siblings are 'setting',
'people' and 'attachments' - the bare page key. So the one route whose name
did not match its own address;
* the template, and its three files, were adminReports.
Both are 'problems' / adminProblems now, across 41 files.
What did NOT change is `legacyBase: '/admin-reports'`. That is an address people
have bookmarked and it still redirects here - the point of the rename is that
the code agrees with the menu, not that an old link should break. The CHANGELOG
entries describing the old addresses are left alone too: a released section is a
record of what shipped.
Thanks to xet7 !
|
||
|
|
daaf563910 |
Docs: implemented designs move to docs/Features, filed the way the menu is.
A design that describes what WeKan already DOES belongs with the feature it describes, not in the folder for things being proposed. Fifteen docs move: Design/Accessibility.md -> Features/Accessibility/Accessibility-Improvements.md Design/Original-Positions.md -> Features/Board/Original-Positions.md Design/Page/* -> Features/Page/* (thirteen pages that exist) Design/AdminPanelProblems.md -> Features/Admin-Panel/Problems/Design.md What stays in docs/Design is what the folder is for: the principles (Design-Principles, Monkey-Proof-Software), the comparisons, the roadmap (Multiverse), and the proposals not yet built (Multitenancy, Autoupdate). The Admin Panel Problems design is new and covers six changes - summaries, the per-actor tally, IPv4/IPv6 columns, an API report, a per-address login tally, and blocking with increasing delays. Three are shipped and three are planned; it is filed under the feature because the pane exists, with each planned item marked so it can become plain description as it lands. Every reference in the repository is rewritten - 152 files, including the CSS comments that point at the table-page design, which a first pass over .md and .js alone missed. Two suites asserted the old paths and now assert the new ones. A moved doc whose links nobody fixed is worse than one nobody moved. Thanks to xet7 ! |
||
|
|
2cc0d42ddf |
Filesystem integrity: is that still the file WeKan stored, and did this server stop cleanly?
Attachments and avatars are files under WRITABLE_PATH, and the database holds one document per file. NOTHING checked that the two still agree. A file can be replaced, truncated, back-dated or deleted by anything that reaches the filesystem - a bad restore, a sync tool, a container rebuild, a shell on the volume - and WeKan would keep serving whatever is there now, silently. A baseline is recorded per file in the existing WeKan database (no new files under WRITABLE_PATH): path, size, modification time, and md5, sha256 AND sha512. Three digests, because they answer different questions. md5 is what other tools print, so an admin can compare against a backup with what they already have - it is never alone, its collision resistance is gone. sha256 is the working digest. sha512 earns its place on the day the two DISAGREE: two digests over the same bytes cannot, so when they do, the bytes were not read the same way twice - a failing disk, a partial write, a truncated copy - which is a different problem from a substitution and is its own critical finding. ed25519 is the fourth check and it is NOT a hash - it is a signature, and it answers the one thing three digests cannot: who says these are the right hashes? Anybody who can rewrite a file can rewrite a row of hashes. Each entry is signed over a canonical line (fixed field order, no JSON, whose escaping is not guaranteed stable) and verified on every scan. A record that does not match its signature is critical and is NEVER explained away by an ordinary edit. The key comes from WEKAN_INTEGRITY_PRIVATE_KEY, which WeKan never stores - that is the configuration that means something against an attacker who reaches the database too - or is generated and kept in the database, which detects filesystem-only tampering and is honest about being no more than that. A MALFORMED supplied key is reported rather than silently replaced by a generated one, which would look like it was working while checking nothing the operator meant. The scan is paced by policy, not by hope: once a day, checked hourly; nothing starts or continues at or above 60% CPU; 50 ms between files plus 20 ms per megabyte; a fifteen-minute budget, after which it stops and continues tomorrow; and ONE read per file for all three digests. A run that stopped early does not report the files it never reached as missing. The finding is a change WITH NO RECORD SAYING WHY. Files change when people use WeKan, and those changes are accounted for, reported once at info and re-baselined so they do not repeat daily. A change with nothing to explain it is at least medium and is deliberately NOT re-baselined, so it keeps showing until somebody looks. A modification time that moved BACKWARDS is called out separately: nothing does that by accident. Crashes and downtime, in the same stream, because a crash leaves nothing behind: the process is gone, so it cannot write a message about being gone. A heartbeat every minute is the only thing that works, and the NEXT start reads it. A first run and a clean stop record nothing - reporting every deliberate restart is how a Problems page becomes one nobody opens. A short gap with no clean-shutdown mark is a note; a long one is a high-severity "it stopped without shutting down cleanly, and here is how long it was down". Uncaught exceptions and unhandled rejections land here too, with their cause, before the process goes. Admin Panel / Problems / Filesystem integrity is the new stream, with the Username / IP address / Attempts columns. The baseline itself is never published and never client-writable: it is a map of every file on the server, and the key document is a private key. tests/fileIntegrity.test.cjs, 34 checks: every digest case including same-size substitution and disagreeing digests, the ed25519 forgery attempt, the canonical line, explained vs unexplained, and the pacing - including that an unreadable clock does not start a scan, which it did until the test said so. Thanks to xet7 ! |
||
|
|
03cb79bdd7 |
Admin Panel under /admin, and a header that says where you are.
The four pages sat at the TOP level - /settings, /people, /attachments - as if they were pages of the app rather than of the Admin Panel, and /attachments is also the path the file server serves attachments from (server/routes/universalFileServer.js), so the panel and the files were claiming one address. They are under /admin now: /admin/settings/version, /admin/people/login, /admin/problems/database, /admin/attachments/backup. The default pane is named too. It used to be left implicit in a bare page URL - /settings rather than /settings/version - so the address of "Settings" and the address of "Settings showing Version" were one string. The address is meant to say where you are, and the first pane is somewhere too. The bare /admin/settings still resolves; it redirects to the pane's own address rather than being a second name for it. Every path the panel used to answer on redirects - the bare old address, the old one with a pane in it, and /setting, /information, /translation. They are built from the same map the URLs are, so a page cannot be given an address without also being given its redirect, and a bookmarked /settings/global-webhooks keeps its pane instead of landing on the top of the panel. The title beside the house icon names the same three things: Admin Panel / Settings / Version. The page's words are the tab's own key and the pane's words are the menu row's own label, so the title, the tab that is marked active, and the row that opened the pane cannot say different things about one place. The pane title is read from the URL rather than from the page, because the header is a separate Blaze instance from the Admin Panel's pages and must not import them - doing that once ran a page module before its own template was registered, and the throw aborted every module after it. That makes ADMIN_PANE_TITLES a second copy of the menus' labels, and a guard checks every entry of it against the real menu entry for that pane. The button of the page you are ON keeps the hover background, permanently and a shade darker. The tabs had marked themselves .active all along, but the only rule that drew it was scoped to #header-main-bar - the second bar, which those tabs no longer live in - so the state had been computed and invisible since they moved. Darker than the hover rather than equal to it: hovering the tab you are already on must still look like a hover. --wekan-header-height measured #header - the SECOND bar - from when every page had one. Most pages have none now, so on those the variable was 0 and everything laid out against it started at the top of the WINDOW, underneath the first bar: the All Boards sidebar covered it. It measures both bars now, as the BOTTOM of the lowest rather than a sum of heights, so any margin between them counts and a bar that is absent contributes nothing without a special case - and each bar has its own ResizeObserver, because the first one wrapping to a second row is a resize of that element and of nothing else. A divider after the notification bell. Everything before it belongs to the page - its controls, its view menu, the panel's tabs; everything after belongs to you - help, your account, the sidebar toggle. Without it the run of icons reads as one list of unrelated things. The URLs went through a hyphenated shape - /admin-settings-version, /allboards-starred - before xet7 asked for the slash form instead. All Boards is back to exactly what it was; only the Admin Panel moved. Guards: tests/adminUrls.test.cjs pins the /admin prefix, that every pane is named in its URL including the default, that each page records the path it used to answer on, that the three redirect shapes exist and carry the pane along, and that every pane title matches the real menu entry's label - both directions, and a translation key has to be a real one. tests/headerBars pins the divider and the darker active mark; tests/sidebarBelowHeader pins that the height covers both bars. tests/adminOldUrlRedirect's route-body helper now understands a route whose path is an expression, since the panel's four take theirs from adminRoutePath(page) so the route and the links cannot disagree. Thanks to xet7 ! |
||
|
|
f83234f0d8 |
Admin Panel: its four tabs are icons in the first header bar.
Fifth of the header restructure, and the answer to the question I had left open: the panel's tabs are navigation BETWEEN its four pages rather than controls of one, so they do not belong in a right sidebar with a page's controls. They belong where you can always see which of the four you are on - the first header bar, immediately left of the notification bell. Icon only, each named by a translated tooltip, because that bar is a single row shared with the logo, the starred boards, the notification bell and the user menu; four labelled buttons would not fit beside them. They link by route NAME, as they did. The tab bar goes with them, and its four route references. "Admin Panel" is already what the first bar says on all four routes - models/lib/pageTitles.js has mapped them since the first step - so the panel is named once, there, rather than by an h1 of its own. Which routes ARE the Admin Panel is read from the one place that already lists them, adminUrls.js, rather than spelled out again in the header. Three guards followed. The same mistake as last time was caught by the same guard: settingHeader.js still registered onCreated, onDestroyed and helpers on a template that no longer existed, which throws at module load and aborts every module after it - they are on adminPanelTabs now. The security-log guard checked for a `.setting-header-btn.problems`, and the multitenancy guard checked that Settings and Problems sit behind the site-admin check; both properties are unchanged and both now read the markup where it is. Remaining: the board's own second header bar, which is the last one with controls in it. Thanks to xet7 ! |
||
|
|
841479774e |
Admin Panel: a URL for every left-menu entry.
The panel was four addresses - /setting, /people, /admin-reports, /attachments - each opening whichever pane its page happened to open first. Which pane you were looking at was ReactiveVar state and nothing else, so a pane could not be linked to a colleague, bookmarked, opened in a second tab or reached with the back button, and /setting always landed on Version even if you had just been in Global Webhooks. Every entry has its own now: /settings/visibility, /settings/global-webhooks, /people/roles, /admin-reports/cpu, /attachments/s3. Lowercase, words separated by -, and the DEFAULT pane keeps the bare page URL - /settings, not /settings/version - so there is one address for "the Settings page" rather than two that show the same thing. The Settings path is plural: /setting was the odd one out beside /people, /attachments and /admin-reports, and it still resolves, as a redirect. The slug is NOT derived from the pane id. The ids are internal and read like it - tableVisibilityMode-setting, layout-setting, report-cpu - while a URL is something a person types and pastes into a chat, and a name derived from another name is wrong the moment the two spellings differ, which is what allBoardsMultiselectionSidebar was. So models/lib/adminUrls.js is an explicit map, and the guard checks it against the real menus in BOTH directions: every slug names a pane the page has, and every menu entry has a slug. Neither failure shows up until somebody clicks that row. A slug that is not one falls back to the page's default rather than rendering an empty panel, because a URL is typed. The route resolves the slug and hands the pane id to the page, which reads it in an autorun - reactive, not a one-shot read, because following a link to another pane while the page is open runs the route action again WITHOUT re-creating the template. A menu click does the same in reverse: open the pane, then go to its URL. go, not replace, so Back returns to the previous pane instead of leaving the Admin Panel, and only when the path would actually change. Each page now has ONE function that opens a pane by id, used by both the URL and the click. /information and /translation redirected to /setting and handed their pane over in a Session value the page consumed once. They redirect to the pane's own address now. Two guards pinned that Session mechanism and now pin the URLs, each saying why it changed. Writing the map turned up that the Settings page's pane list still named registration-setting, the Login pane that moved to People - which its own guard caught, correctly. Written down in docs/Design/Page/Admin-Panel-URLs.md, with every URL listed. Thanks to xet7 ! |