diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-30 23:26:09 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-30 23:26:09 +0300 |
| commit | badc2543eaa319657ecc97453fbdca58679ecb87 (patch) | |
| tree | e09c0244bf6c4b8e446a266d615984c5b00725d3 /internal/api/handlers_more_test.go | |
| parent | c866dc4c539d72134ea690c7c44318a58ec27fd2 (diff) | |
fix: permissions matrix UI now returns proper shape from backend
The frontend admin.js expects {sets, users, permissions} but
ListPermissions returned a flat []SetPermission slice.
- Add PermissionsMatrix struct with JSON tags
- Update AdminService.ListPermissions to return *PermissionsMatrix
- Update mocks and all call sites to match new signature
- Update tests to assert the new matrix shape
Diffstat (limited to 'internal/api/handlers_more_test.go')
| -rw-r--r-- | internal/api/handlers_more_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/api/handlers_more_test.go b/internal/api/handlers_more_test.go index 13c57cf..b162fa8 100644 --- a/internal/api/handlers_more_test.go +++ b/internal/api/handlers_more_test.go @@ -1583,7 +1583,7 @@ func TestServer_AdminListPermissions(t *testing.T) { var as service.AdminService if !tt.svcNil { as = &service.MockAdminService{ - ListPermissionsFunc: func(ctx context.Context) ([]model.SetPermission, error) { return nil, tt.svcErr }, + ListPermissionsFunc: func(ctx context.Context) (*service.PermissionsMatrix, error) { return nil, tt.svcErr }, } } srv := newTestServer(t, store, nil, sm, cfg, nil, as, nil, nil) |
