feat(09-11): add permissioned admin metadata and settings

This commit is contained in:
Jakub Zych
2026-09-26 23:06:22 +02:00
parent 8b02fff028
commit 10ca7a02e3
12 changed files with 947 additions and 7 deletions

View File

@@ -394,13 +394,14 @@ func hookFixture(t *testing.T) (CRUDService, *service, *CompiledController, *gor
func principalCtx(hooks *hookController, principal *bouncer.Principal) context.Context {
ctx := context.WithValue(context.Background(), hookSinkKey{}, hooks.log)
if principal != nil {
principal.Backend = true
ctx = bouncer.WithUser(ctx, principal)
}
return ctx
}
func superUser() *bouncer.Principal {
return &bouncer.Principal{ID: 1, IsSuperuser: true}
return &bouncer.Principal{ID: 1, Backend: true, IsSuperuser: true}
}
func crudCall(svc *service, method, id string, body []byte, ctx context.Context) *httptest.ResponseRecorder {