Commit Graph

28 Commits

Author SHA1 Message Date
Jakub Zych
d80d7990f6 feat: carry the register input on RegisterEvent and export the registration steps
- RegisterEvent.Payload: a copy of the register input without password and
  password_confirmation (Winter's golem15.user.register data array)
- RegisterUser, RegisterOptions, FireRegisterEvent, IssueToken and APIArray:
  the steps POST /register runs, now called by Register itself; its status
  codes and bodies are unchanged
- README documents the exports and Payload
2026-10-03 07:12:00 +02:00
Jakub Zych
c258e9fade test: cover user group codes and the small class helpers
- UserGroupCodes and HasGroupCode against Postgres: id order, code-less
  groups skipped, membership by code, a missing handle and a failing query
  reported as errors
- mail locale resolution, hook registration (a failing hook stops the
  chain), the code lifetimes and throttle settings carried on the context,
  constant-time code comparison, JWT secret loading and the principal
  lookup without an app or a gorm handle
2026-10-02 16:19:06 +02:00
Jakub Zych
86970074b7 feat: add Winter user groups
- user_groups (seeded with the guest and registered groups) and the
  users_groups pivot, folded from the PHP v1.1.1 and v2.8.0 migrations
  into migration 202610020001_create_user_groups
- models.UserGroup and a User.Groups relation that is never serialized
- classes.UserGroupCodes and classes.HasGroupCode for server-side checks
  such as the site-admin group code admin
- additive only: no route, payload or existing column changes; the user
  payload still answers "groups":[]
2026-10-02 11:44:01 +02:00
Jakub Zych
c65ab3cdac build: require golang.org/x/image v0.46.0
The framework now registers the x/image webp decoder; tidy the module so
its go.sum matches the workspace build.
2026-10-02 11:35:06 +02:00
Jakub Zych
44f3c4c986 docs: describe the user plugin 2026-10-02 10:57:49 +02:00
Jakub Zych
1f2ea57a97 build: tidy go.mod for standalone module mode
GOWORK=off go mod tidy records the framework's transitive tidwall/*
requirements as indirect and adds the missing go.sum lines. No direct
requirement changes.
2026-10-02 10:56:12 +02:00
Jakub Zych
02ba1f0666 refactor: rename module to git.golem15.com/golem15/sm-user-plugin
Prefix replacement of the old application-nested module path in go.mod
and every import. No identifier, string, table, migration ID, config key
or comment changes.
2026-10-02 10:56:06 +02:00
Jakub Zych
2004678506 chore(11-01): pick up the framework job queue tables and River dependency
- go mod tidy in the app and plugin modules for River v0.47.0
- allow-list summer_jobs and the River v7 tables in the schema diff
- expect summer_migrations_summercms_conga among the history tables
2026-09-29 15:02:08 +02:00
Jakub Zych
af976e789f refactor(10.2-01): use nested framework modules
- Rewrite application and plugin framework imports
2026-09-28 02:21:38 +02:00
Jakub Zych
96bf78845d refactor(10.2-01): use nested festival module
- Point user event test at modules/festival
2026-09-28 02:16:45 +02:00
Jakub Zych
7cdcb7cf89 test(08-07): add failing RED anchor for fonoteka:oauth-client command
- TestPhase8RedOAuthClientCommand drives the not-implemented command
  stub's create path and fails with PHASE8_RED:oauth-command until the
  real create/update/list behavior lands (D-19)
- oauth_client.go stub declares the exact PHP-parity flag/argument
  contract (name, --redirect-uri=*, --scope=*, --auth-method,
  --client-id, --list) so the RED test exercises the real command shape
- user/console_test.go's emailArg gains Flags(string) []string: bonfire's
  Input interface (summercms.go) grew this method for D-19's repeatable
  flags, and emailArg must satisfy it to keep building
2026-09-23 21:54:54 +02:00
Jakub Zych
d4066a8c3f test(07-07): cover already-activated activate and 22-ported corpus counts
Unit tests now expect Winter 500 HTML when the target user is already
active, and the inventory assertions match 169/22/147.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 23:57:10 +02:00
Jakub Zych
d94634d5d8 feat(07-07): replay the 15 user-api routes and both nuxt auth flows
Match PHP payloads, already-activated Winter 500 HTML, and direct-DB
seeding so the corpus can flip those routes to ported without onboarding.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 23:57:00 +02:00
Jakub Zych
d5ec97c6f3 feat(07-06): cover the session sequence and each token scope
Register through logout is one in-process flow, and token mint accepts read, write, ai, and the two-scope combination.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 19:20:13 +02:00
Jakub Zych
63d6d049b7 feat(07-03): add avatars, mail templates, and password-change command
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 16:43:44 +02:00
Jakub Zych
5c1f857d54 feat(07-03): update profile, change password, and marketing consent
Changing a password invalidates older tokens and leaves the token that made the call signed in.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 16:32:05 +02:00
Jakub Zych
cb50d673c6 feat(07-03): add password reset and account activation
Reset and activation codes expire on a TTL, and a missing issued-at still accepts a cutover code. Forgot-password always returns the same 200 body.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 16:30:22 +02:00
Jakub Zych
97a39dc34c feat(07-02): register accounts and extend the user payload
Registration follows activate_mode and hides a disabled or throttled cause in production. Fonoteka adds organisation fields through GetApiArrayEvent.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 15:11:14 +02:00
Jakub Zych
6bceb8167c feat(07-02): serve login, logout, fetch, and refresh
Wire the user API session loop to the JWT blacklist and a pre-password throttle gate so a logged-out token cannot be fetched again.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 14:40:18 +02:00
Jakub Zych
00e6c51abd feat(07-02): throttle failed logins and pick mail template locale
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 14:03:31 +02:00
Jakub Zych
1311bd6cad feat(07-02): add user session schema, throttle table, and jwt config
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 13:53:16 +02:00
Jakub Zych
79e8373560 test(07-02): add failing tests for user session migrations
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 13:48:51 +02:00
Jakub Zych
232d454913 feat(06-01): implement inv_token guard, inv.scope, and registry wiring
- Verify inv_ tokens against ApiToken hash, expiry, revocation, last-used
- InvScope writes PHP TokenScope 401/403 bodies and gates on HasScope
- Register jwt and inv_token on the shared bouncer.Registry at plugin Boot
2026-09-19 19:11:12 +02:00
Jakub Zych
feb09823bf fix(05): CR-03 hide User password and require secret columns in Hidden() 2026-09-18 23:45:55 +02:00
Jakub Zych
8d1248c328 feat(05-03): add user-plugin organisations table (structure only)
- create_organisations folds PHP v3.2.0; no users-table ALTER this phase
- Organisation model is an FK target; app.key placeholder in config
2026-09-18 19:37:41 +02:00
Jakub Zych
2d4245681e feat(05-01): restructure fonoteka plugins into Winter directories
- Move models, classes, controllers, middleware, and updates into subpackages
- Add self-registering models/updates/classes registries so later plans add files
- Keep the genres route and shipped migration SQL unchanged
2026-09-18 18:43:31 +02:00
Jakub Zych
5530fa4ebf feat(03-01): serve seeded genres behind JWT middleware
golem15.user registers jwt.auth, golem15.fonoteka mounts GET /_fonoteka/api/v1/genres
through that guard, and a smoke test reads the 15 migrated rows with a test-only token.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-17 20:04:18 +02:00
Jakub Zych
f975ad94bb feat(03-01): initialize fonoteka workspace with user and genre migrations
Add compiled golem15.user and golem15.fonoteka plugins, squash schema
to the genre slice tables, and seed the 15 canonical genres on ICU pl-PL.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-17 19:55:36 +02:00