Skip to content

Commit 838f00c

Browse files
committed
fix
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
1 parent 4aeb65d commit 838f00c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

app/controlplane/internal/service/organization.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,11 @@ func (s *OrganizationService) UpdateMembership(ctx context.Context, req *pb.Orga
215215

216216
func (s *OrganizationService) canCreateOrganization(ctx context.Context) (bool, error) {
217217
// Restricted org creation is disabled, allow creation only to users
218-
if !s.authz.RestrictOrgCreation && entities.CurrentMembership(ctx) != nil {
219-
return true, nil
218+
if !s.authz.RestrictOrgCreation {
219+
if entities.CurrentMembership(ctx) != nil {
220+
return true, nil
221+
}
222+
return false, nil
220223
}
221224

222225
// otherwise, check for permissions

0 commit comments

Comments
 (0)