feat(09-11): add permissioned admin metadata and settings
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user