Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: short circuit old permission checks (#10323)

p0nyc05a394945b5
diff --git a/backend/api/v1/acl.go b/backend/api/v1/acl.go
index 99732312aa..d123aaa57c 100644
--- a/backend/api/v1/acl.go
+++ b/backend/api/v1/acl.go
@@ -111,6 +111,10 @@ func (s overrideStream) Context() context.Context {
}
func (in *ACLInterceptor) aclInterceptorDo(ctx context.Context, fullMethod string, request any, user *store.UserMessage) error {
+ if in.profile.DevelopmentIAM {
+ return in.checkIAMPermission(ctx, fullMethod, request, user)
+ }
+
if isOwnerAndDBAMethod(fullMethod) {
return status.Errorf(codes.PermissionDenied, "only workspace owner and DBA can access method %q", fullMethod)
}
@@ -147,10 +151,6 @@ func (in *ACLInterceptor) aclInterceptorDo(ctx context.Context, fullMethod strin
}
}
- if in.profile.DevelopmentIAM {
- return in.checkIAMPermission(ctx, fullMethod, request, user)
- }
-
return nil
}