Junie: TOTP flow update and db migrations.
This commit is contained in:
@@ -150,12 +150,12 @@ func TestGetUserPermissions(t *testing.T) {
|
||||
t.Errorf("AuthorizationService.GetUserPermissions() error = %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
// Admin should have 4 permissions
|
||||
if len(permissions) != 4 {
|
||||
t.Errorf("Admin should have 4 permissions, got %d", len(permissions))
|
||||
}
|
||||
|
||||
|
||||
// Check for specific permissions
|
||||
hasDBRead := false
|
||||
hasDBWrite := false
|
||||
@@ -167,7 +167,7 @@ func TestGetUserPermissions(t *testing.T) {
|
||||
hasDBWrite = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if !hasDBRead {
|
||||
t.Errorf("Admin should have database_credentials:read permission")
|
||||
}
|
||||
@@ -182,12 +182,12 @@ func TestGetUserPermissions(t *testing.T) {
|
||||
t.Errorf("AuthorizationService.GetUserPermissions() error = %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
// DB Operator should have 1 permission
|
||||
if len(permissions) != 1 {
|
||||
t.Errorf("DB Operator should have 1 permission, got %d", len(permissions))
|
||||
}
|
||||
|
||||
|
||||
// Check for specific permissions
|
||||
hasDBRead := false
|
||||
hasDBWrite := false
|
||||
@@ -199,7 +199,7 @@ func TestGetUserPermissions(t *testing.T) {
|
||||
hasDBWrite = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if !hasDBRead {
|
||||
t.Errorf("DB Operator should have database_credentials:read permission")
|
||||
}
|
||||
@@ -214,10 +214,10 @@ func TestGetUserPermissions(t *testing.T) {
|
||||
t.Errorf("AuthorizationService.GetUserPermissions() error = %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
// Regular user should have 0 permissions
|
||||
if len(permissions) != 0 {
|
||||
t.Errorf("Regular user should have 0 permissions, got %d", len(permissions))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user