Skip to content

Commit 6436a15

Browse files
committed
fix message
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
1 parent e96c362 commit 6436a15

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/controlplane/internal/service/organization.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (s *OrganizationService) Delete(ctx context.Context, req *pb.OrganizationSe
116116
// Check if user has permission to delete this specific organization
117117
// Force RBAC to ensure only owners can delete, even if they have admin privileges elsewhere
118118
if err := s.authorizeResource(ctx, authz.PolicyOrganizationDelete, authz.ResourceTypeOrganization, orgUUID, withForceRBAC()); err != nil {
119-
return nil, err
119+
return nil, errors.Forbidden("forbidden", "only organization owners can delete the organization")
120120
}
121121

122122
if err := s.orgUC.Delete(ctx, orgUUID.String()); err != nil {

0 commit comments

Comments
 (0)