mirror of
https://github.com/juanfont/headscale.git
synced 2026-01-22 18:18:00 +00:00
Refactor the RequestTags migration (202601121700-migrate-hostinfo-request-tags) to use PolicyManager.NodeCanHaveTag() instead of reimplementing tag validation. Changes: - NewHeadscaleDatabase now accepts *types.Config to allow migrations access to policy configuration - Add loadPolicyBytes helper to load policy from file or DB based on config - Add standalone GetPolicy(tx *gorm.DB) for use during migrations - Replace custom tag validation logic with PolicyManager Benefits: - Full HuJSON parsing support (not just JSON) - Proper group expansion via PolicyManager - Support for nested tags and autogroups - Works with both file and database policy modes - Single source of truth for tag validation Co-Authored-By: Shourya Gautam <shouryamgautam@gmail.com> |
||
|---|---|---|
| .. | ||
| sqliteconfig | ||
| testdata/sqlite | ||
| api_key.go | ||
| api_key_test.go | ||
| db.go | ||
| db_test.go | ||
| ephemeral_garbage_collector_test.go | ||
| ip.go | ||
| ip_test.go | ||
| node.go | ||
| node_test.go | ||
| policy.go | ||
| preauth_keys.go | ||
| preauth_keys_test.go | ||
| schema.sql | ||
| suite_test.go | ||
| text_serialiser.go | ||
| user_update_test.go | ||
| users.go | ||
| users_test.go | ||