Skip to content

Commit 408f623

Browse files
authored
fix: return empty list of memberships instead of error (#984)
Signed-off-by: Miguel Martinez Trivino <[email protected]>
1 parent 964b730 commit 408f623

File tree

1 file changed

+2
-2
lines changed
  • app/controlplane/internal/server

1 file changed

+2
-2
lines changed

app/controlplane/internal/server/grpc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ func requireRobotAccountMatcher() selector.MatchFunc {
245245

246246
// Matches all operations that require to have a current organization
247247
func requireAllButOrganizationOperationsMatcher() selector.MatchFunc {
248-
const skipMatcher = "/controlplane.v1.OrganizationService/Create"
248+
const skipRegexp = "/controlplane.v1.OrganizationService/Create|/controlplane.v1.UserService/ListMemberships"
249249
return func(ctx context.Context, operation string) bool {
250-
r := regexp.MustCompile(skipMatcher)
250+
r := regexp.MustCompile(skipRegexp)
251251
return !r.MatchString(operation)
252252
}
253253
}

0 commit comments

Comments
 (0)