Commit Graph

1831 Commits

Author SHA1 Message Date
Jakub Zych
461cb21b3e fix(cabana): enforce the 4-character password minimum on the Administrators form
The form's min:4 rule never applied: the model validator skips string
min and max. storePassword now refuses a typed password under 4
characters with a 422 on the field, next to the 72-byte check (D-11).
Found by TestAdministratorsPasswordAndIdentity.
2026-10-22 12:00:18 +02:00
Jakub Zych
536ea8c1bf test(19.6.1-03): screens test env and the superuser flag rule over HTTP
- administrators_harness_test.go: newScreensEnv with extra plugins, seedAdmin,
  seedRole, login, isolateSuperusers, row snapshots and error decoders; the
  harness moved out of backend_screens_smoke_test.go and gained cleanup
- export_test.go: SuperuserLockKey for the last-superuser race
- TestAdministratorsSuperuserFlag (D-05) through the assembled handler
2026-10-22 11:54:48 +02:00
Jakub Zych
1aaa8a444c docs(phase-19.6.1): update tracking after wave 2 2026-10-22 11:46:16 +02:00
Jakub Zych
47db9666dd docs(19.6.1-02): complete SPA trigger and record permission locks plan 2026-10-22 11:45:07 +02:00
Jakub Zych
7091d09699 feat(19.6.1-02): field trigger and admin build
- fields.yaml trigger (action disable|hide, field, condition checked|unchecked) compiled to FormField.Trigger
- boot errors for malformed triggers, controlling fields that are not a switch or checkbox, and triggers in repeater rows, settings and relation forms
- Administrators permissions overrides are disabled while Superuser is on (D-06)
- SPA: trigger.ts (triggerState, applyTriggers), FORM_TRIGGER_NOTES, the trigger note in FormField, FormView tabs/banner/payload after triggers, PreviewView hide only
- regenerated admin OpenAPI and schema.d.ts; rebuilt modules/boardwalk/dist; docs and README
2026-10-22 11:43:58 +02:00
Jakub Zych
705f94d9e5 feat(19.6.1-02): per-record locked permission values
- cabana.PermissionRecordLock and the optional PermissionRecordLockProvider
- RecordMeta.PermissionLocks (meta.permissionLocks) on show and save responses, notes localized
- save rule: a record-locked code keeps its stored value, a differing present value is 403
- Roles lock code-declared grants (locked_by_code); Administrators lock every override on your own record (locked_self)
- SPA: FORM_PERMISSION_LOCKS, locked codes never sent, record-locked rows in the permission editor
- regenerated admin OpenAPI and schema.d.ts; docs and README
2026-10-22 11:29:25 +02:00
Jakub Zych
e2525d4956 docs(phase-19.6.1): update tracking after wave 1 2026-10-22 11:20:59 +02:00
Jakub Zych
3a772fabb1 docs(19.6.1-01): complete backend administrators server-side plan 2026-10-22 11:19:46 +02:00
Jakub Zych
653307de0c feat(19.6.1-01): Roles screen
- Settings -> System -> Roles (summercms.cabana.roles, backend.manage_roles,
  order 110): name, code slugged from the name, description, checkbox
  permission editor with the editor's ceiling
- system roles (is_system or code-declared grants) keep their code and
  cannot be deleted; a role any admin holds (deleted ones included) cannot
  be deleted, the refusal names the role and the count
- role codes unique among roles
2026-10-22 11:18:30 +02:00
Jakub Zych
530b02af9c feat(19.6.1-01): administrator lifecycle and last-superuser protection
- activate, deactivate and restore as record and bulk actions; delete is
  the soft delete through deleted_at, never a hard delete
- deleted admins listed and opened (unscoped), deleted/deactivated row
  states, Deleted filter (hide / only), preview status hint
- deactivate and delete bump tokens_valid_after; activate and restore do not
- self delete and self deactivate refused; outranking and last active
  superuser guarded on delete, deactivate and bulk rows (whole selection
  rolls back)
2026-10-22 11:13:26 +02:00
Jakub Zych
88401737c9 feat(19.6.1-01): administrator form with server-side privilege rules
- create and edit administrators: password (min 4, max 72 bytes, bcrypt
  at admin.password.bcrypt_cost), role picker, radio permission overrides,
  superuser switch; no mail on create
- superusers hidden from non-superusers in list, lookups and schemas;
  is_superuser projected to superusers so an untouched save keeps it
- save-path rules: superuser-only switch, role and permission ceilings,
  no outranking, no own role/flag/overrides/password change, last active
  superuser not demoted (advisory lock + count in the write tx)
- password set for another admin bumps tokens_valid_after
- role, superuser, activation and last sign-in list filters
2026-10-22 11:08:12 +02:00
Jakub Zych
7340241f22 feat(19.6.1-01): Administrators screen and cross-controller record actions
- pact.HasAdminActionExtensions / AdminActionExtension: plugins add record
  actions to any admin controller by ID, merged at boot before permission
  validation (unknown target, no preview, duplicate name stop the boot)
- internal summercms.cabana pseudo-plugin, appended only when some plugin
  registers admin controllers: Administrators list and preview, settings
  link under System, backend.manage_users and backend.manage_roles with no
  role grants
- backend::lang user, user.role and permissions copy (en, pl)
- smoke tests: compile-time seam and settings, Postgres list/preview/action
2026-10-22 10:59:23 +02:00
Jakub Zych
88ec4df2b3 docs(todo): user logout fix released in sm-user-plugin v0.1.8 2026-10-22 10:45:14 +02:00
Jakub Zych
ee5b8844bf docs(todo): user logout bug confirmed, fixed in the plugin and the demo frontend v0.4.3 2026-10-22 04:57:09 +02:00
Jakub Zych
1e9927fa4b docs(19.8): map phase and its todos to g15office tasks 2026-10-22 04:41:51 +02:00
Jakub Zych
6267edb7c5 test(19.8): persist human verification items as UAT 2026-10-22 04:41:10 +02:00
Jakub Zych
eaeb2347c0 docs(19.8): re-verification, gaps closed (57/57) 2026-10-22 04:41:10 +02:00
Jakub Zych
4141cd916f docs(quick-261022-4z8): Fix the open 19.8 re-review findings (WR-09..WR-14, IN-14, IN-15) 2026-10-22 04:31:34 +02:00
Jakub Zych
b1fba7e24c docs(19.8): WR-12 disposition names the Status rework (139f5e3) 2026-10-22 04:30:41 +02:00
Jakub Zych
139f5e3942 fix(lagoon): keep Status plugin-only; migrate:status adds the framework sets itself (WR-12)
57a849d made lagoon.Status read migrationSets, which changed its result
for consumers: the framework sets came first and a plugin with no
migrations lost its row. Status is back to its pre-57a849d behaviour.
migrate:status (table and --json) now reads the unexported setStatus,
which lists the framework sets and the plugins from migrationSets, so it
still agrees with migrate --pretend. Both share historyRows.

- TestStatusPluginRows pins Status: plugin rows only, an empty row for a
  plugin with no migrations or no history table, none without HasMigrations
- TestMigrateStatusJSON also checks the table lists the framework sets
- TestTwoPluginMigrationSetsIsolated and TestDocsMigrate are back to the
  plugin-only rows
2026-10-22 04:30:36 +02:00
Jakub Zych
f5e9ee508b docs(todo): user plugin logout leaves the session cookie valid 2026-10-22 04:21:27 +02:00
Jakub Zych
a48afbd11e docs(19.8): re-review fixes recorded, IN-10..IN-13 and the exit-130 suggestion deferred 2026-10-22 04:10:42 +02:00
Jakub Zych
0691d26f1f fix(lagoon): warn instead of failing when the re-read after a successful migrate fails (WR-13) 2026-10-22 04:04:32 +02:00
Jakub Zych
57a849d114 fix(lagoon): migrate:status reads the sets migrate applies (WR-12) 2026-10-22 04:03:19 +02:00
Jakub Zych
17c722da46 fix(summer): mask secret flag values in a delegate's error (WR-10) 2026-10-22 04:00:57 +02:00
Jakub Zych
707372bf65 fix(bonfire): mask secret flag values that start with a dash (WR-11) 2026-10-22 03:57:55 +02:00
Jakub Zych
fce232d7c3 fix(bonfire): end a live view when its context is cancelled and print later lines plainly (WR-09) 2026-10-22 03:56:37 +02:00
Jakub Zych
1ac75ad59a fix(bonfire): claim the live view slot before building the program (IN-15) 2026-10-22 03:53:29 +02:00
Jakub Zych
48e13f9b57 fix(bonfire): strip control characters from Process's plain item lines and the view's label (WR-14) 2026-10-22 03:52:37 +02:00
Jakub Zych
7c1509581b docs(bonfire): the ErrReported comment names the WithExitCode code (IN-14) 2026-10-22 03:51:55 +02:00
Jakub Zych
a28957f7d0 docs(quick-261022-2zy): plan and summary for the user and sociallogin plugin security fixes 2026-10-22 03:38:47 +02:00
Jakub Zych
36e2240891 docs(19.8): phase verification, three gaps from the re-review 2026-10-22 03:34:48 +02:00
Jakub Zych
9516a2b36f feat(cabana): ClearOnChange clears dependent columns when a relation changes a foreign key
RelationContract (hasMany) and FieldRelationContract (belongsTo) accept
ClearOnChange, a list of nullable columns set to NULL whenever the relation
changes the foreign key: a hasMany link and unlink (deferred ones included)
clear them on the child, and a form save that moves a belongsTo key to
another record or to none clears them on the record unless the same save
writes the column through its own field. Boot refuses the option on a
belongsToMany and for a missing, non-nullable, foreign-key or primary-key
column. The zero value changes nothing.
2026-10-22 03:30:35 +02:00
Jakub Zych
9563bc836a docs(19.8): record code review disposition 2026-10-22 03:19:33 +02:00
Jakub Zych
28ad561481 docs(19.8): re-review of the code review fixes 2026-10-22 03:19:15 +02:00
Jakub Zych
0ebed687a0 docs(19.8-06): roadmap progress 6/6 plans 2026-10-22 03:07:14 +02:00
Jakub Zych
349e2f810b docs(19.8-06): v0.4.2 released, demo roadmap synced, phase gate green 2026-10-22 03:07:14 +02:00
Jakub Zych
ead8e42211 docs(19.8-06): record the go-ahead: release v0.4.2 v0.4.2 2026-10-22 02:53:07 +02:00
Jakub Zych
cf061857a9 docs(19.8-06): release proposal for v0.4.2, awaiting go-ahead 2026-10-22 02:51:35 +02:00
Jakub Zych
8020b177ff docs(19.8-05): roadmap progress 5/6 plans 2026-10-22 02:46:02 +02:00
Jakub Zych
89c8325ac4 docs(19.8-05): complete review fixes plan 2026-10-22 02:45:15 +02:00
Jakub Zych
d311d029c3 docs(19.8): review fixes recorded, info findings captured as a todo
- CR-01..CR-03 and WR-01..WR-08 fixed with their commits (19.8-05)
- IN-01..IN-09 deferred to one pending todo (minor, framework)
2026-10-22 02:43:48 +02:00
Jakub Zych
1bf64b009f test(19.8): gate requires the review fixes' tests
- diary, bonfire, dev, summer and the Docker lagoon lists name the
  pinning tests of CR-01..CR-03 and WR-01..WR-08 under a Plan 05 comment
2026-10-22 02:38:33 +02:00
Jakub Zych
020fe838ea fix(lagoon): one migration set list for Migrate and PendingMigrations
- Migrate iterates migrationSets, so the startup summary, --pretend, the
  production question, the applied lines and migrate:status --json read
  the same list; each set keeps its error wording through a label
- migrate reports pending-before minus pending-after as its applied
  lines and result line, also when Migrate fails partway (then it prints
  what was applied and returns the error)
- TestMigrateAppliedLines (Docker) pins both (WR-07)
2026-10-22 02:36:19 +02:00
Jakub Zych
a9025c0d12 fix(bonfire): strip control characters from error blocks, process views and tables
- bonfire.Sanitize (additive), moved from diary's console channel: tab
  kept, CR and LF to a space, every other control character dropped
- applied before styling to every error-block line (message,
  explanation, Try lines, -v chain), process-view item names and errors,
  the current item of spinner and progress, failure lines, and table
  headers and cells in both layouts
- diary's console handler calls bonfire.Sanitize; README and the
  writing-commands page say so (WR-05)
2026-10-22 02:31:55 +02:00
Jakub Zych
39677f1819 fix(diary): retire replaced daily writers and serialise ApplyGlobals
- install and Reset retire the channels they replace: a retired daily
  writer appends a late record and closes the file again, so no record is
  lost and no descriptor stays open; diary.Close keeps reopening the
  installed writers on the next record
- ApplyGlobals holds the setup lock for its whole run (lock-free
  installLocked and setVerbosityLocked), so concurrent calls rebuild the
  channels once (WR-06)
2026-10-22 02:27:39 +02:00
Jakub Zych
c586c6f8a9 fix(diary): retry a daily file that failed to open
- a failed open no longer disables the writer for good: it skips records
  and tries again one minute later by its clock, or at the first record of
  a new date, whichever comes first
- the warning (still 'daily log file disabled') appears once per date
- README and the logging page describe the retry (WR-04)
2026-10-22 02:25:18 +02:00
Jakub Zych
9b62285654 fix(bonfire): mask secret flag values in the wrong-directory hint
- the Try line replaces the value of every long flag whose name contains
  password, passwd, secret, token or key with ***, in the --flag value and
  --flag=value forms; other arguments are unchanged
- README and the writing-commands page say so (WR-08)
2026-10-22 02:22:40 +02:00
Jakub Zych
fc7706dfff fix(dev): give serve the full shutdown grace before killing it
- dev.ShutdownGrace (internal, 15 seconds, longer than serve's 10-second
  drain) is the grace child.stop waits after SIGTERM, instead of 2 seconds
- summer's delegates use the same constant (appShutdownGrace)
- scaffolding docs say summer dev waits for serve's shutdown report (WR-03)
2026-10-22 02:20:47 +02:00
Jakub Zych
9c89705747 fix(summer): give delegated commands the terminal and keep their stderr apart
- appStreams hands the app binary summer's own stdout and stderr on a
  terminal, so it asks the production question, prints styled summaries
  and animates its widgets
- off a terminal the binary's stdout goes through summer's Output and its
  stderr to summer's stderr, so --json and -q output carry no log lines
- newAppCmd (unexported) takes the two writers; docs say the streams stay
  apart (CR-03)
2026-10-22 02:19:01 +02:00