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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user