feat: add the admin columns and the frontend permissions table

- users.permissions and users.last_seen as additive columns
- golem15_user_frontend_permissions (code, label, tab, comment)
- User gains LastSeen, read-only CreatedAt and UpdatedAt and the
  filterByGroup list scope; none of them is serialized
- migration tests roll back by position past the three new steps
This commit is contained in:
Jakub Zych
2026-10-05 12:51:41 +02:00
parent 0fe5b91b63
commit e22f7660f3
9 changed files with 238 additions and 11 deletions

View File

@@ -45,7 +45,10 @@ func TestCreateOrganisationsMigration(t *testing.T) {
"202609220006_create_user_throttle",
"202609220007_create_jwt_blacklist",
"202610020001_create_user_groups",
"202610040001_add_users_permissions",
"202610040001_create_user_api_tokens",
"202610040002_add_users_last_seen",
"202610040003_create_frontend_permissions",
}
if len(ids) != len(want) {
t.Fatalf("history = %v", ids)
@@ -56,8 +59,9 @@ func TestCreateOrganisationsMigration(t *testing.T) {
}
}
// API tokens, user groups, jwt blacklist, throttle, extend-users, then organisations.
for range 6 {
// The three admin migrations, API tokens, user groups, jwt blacklist,
// throttle, extend-users, then organisations.
for range 9 {
if err := m.RollbackLast(); err != nil {
t.Fatal(err)
}