headscale/hscontrol/types
Ryan Malloy 32ea1c1c84 oidc groups: fix post-merge compile and migration issues
Bugs found by running the real test suite after merging upstream:

- types/types_clone.go, types/types_view.go: extend the regeneration
  guard struct literals to include the new Groups field, and add a
  UserView.Groups() accessor. Generated files normally rebuilt via
  cloner / viewer; touched by hand here pending make generate.
- db/db.go: the migration adding the groups column ran after
  202505141324, which calls ListUsers() through the User struct that
  now includes Groups. Move the column-add to 202505141323 so the
  schema is in place before any migration loads users. Register the
  new ID in the FK-disabled migration list.
- db/db.go: 202507021200 recreates all tables from inline SQL during
  the SQLite schema migration; add groups to both the CREATE TABLE
  users statement and the INSERT INTO users ... SELECT FROM users_old
  so the column survives the recreation. Also fix a copy-paste bug
  in the Rollback closure that referenced tx instead of db.
- db/schema.sql: add the groups column to the canonical schema so
  squibble.Validate accepts databases produced by the new migration
  chain. Verified against all 7 historical sqlite dumps in
  hscontrol/db/testdata/sqlite.
- types/users_test.go: the casby-oidc-claim case now exercises group
  storage; update the want to include the JSON-encoded groups column.
- integration/oidc_groups_test.go: replace the aspirational draft
  (which referenced assertNoErr, scenario.usernames, hsic.WithTLS and
  other symbols that do not exist) with a focused test that follows
  the auth_oidc_test.go pattern. Verifies the groups column directly
  via sqlite3 inside the headscale container since the gRPC User
  message does not expose Groups.
2026-05-21 21:14:08 -06:00
..
change all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
testcapture all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
testdata Restore support for "Override local DNS" (#2438) 2025-04-17 17:16:59 +02:00
api_key.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
common.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
common_test.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
config.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
config_test.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
const.go improve testing of route failover logic 2024-04-15 12:31:53 +02:00
debug_routes.go types: move DebugRoutes from routes to types 2026-04-29 18:08:39 +01:00
main_test.go all: fix test flakiness and improve test infrastructure 2026-03-14 02:52:28 -07:00
node.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
node_benchmark_test.go types: avoid NodeView clone in CanAccess 2026-02-26 19:15:07 -08:00
node_tags_test.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
node_test.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
policy.go feat: implements apis for managing headscale policy (#1792) 2024-07-18 07:38:25 +02:00
preauth_key.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
preauth_key_test.go all: upgrade to Go 1.26rc2 and modernize codebase 2026-02-08 12:35:23 +01:00
registration.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
routes.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
slices.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
testlog.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
types_clone.go oidc groups: fix post-merge compile and migration issues 2026-05-21 21:14:08 -06:00
types_view.go oidc groups: fix post-merge compile and migration issues 2026-05-21 21:14:08 -06:00
users.go Merge remote-tracking branch 'origin/main' 2026-05-21 17:58:02 -06:00
users_test.go oidc groups: fix post-merge compile and migration issues 2026-05-21 21:14:08 -06:00
version.go all: apply formatter changes 2026-04-13 17:23:47 +01:00