feat: own shared user API tokens

This commit is contained in:
Jakub Zych
2026-10-04 22:15:57 +02:00
parent 8a658903ed
commit 0fe5b91b63
17 changed files with 926 additions and 35 deletions

View File

@@ -47,8 +47,8 @@ func TestExtendUsersMigration(t *testing.T) {
if !row.HasSelfSetPassword || row.IsActivated || row.MarketingConsent || row.IsOnboarded {
t.Fatalf("defaults = %+v", row)
}
// user groups, jwt blacklist, throttle, then extend-users.
for range 4 {
// API tokens, user groups, jwt blacklist, throttle, then extend-users.
for range 5 {
if err := m.RollbackLast(); err != nil {
t.Fatal(err)
}
@@ -87,8 +87,8 @@ func TestCreateUserThrottleMigration(t *testing.T) {
t.Fatalf("missing column %s", col)
}
}
// user groups, jwt blacklist, then throttle.
for range 3 {
// API tokens, user groups, jwt blacklist, then throttle.
for range 4 {
if err := m.RollbackLast(); err != nil {
t.Fatal(err)
}
@@ -119,8 +119,8 @@ func TestCreateJwtBlacklistMigration(t *testing.T) {
t.Fatalf("missing column %s", col)
}
}
// user groups, then jwt blacklist.
for range 2 {
// API tokens, user groups, then jwt blacklist.
for range 3 {
if err := m.RollbackLast(); err != nil {
t.Fatal(err)
}