From 7326b6cc83c4d3d6d29a96896ea3a222001bfc38 Mon Sep 17 00:00:00 2001 From: Irena Rindos Date: Fri, 26 Apr 2024 11:55:30 -0400 Subject: [PATCH] bug(scopes): scopes list returns 500 without perms (#4731) --- internal/daemon/controller/handlers/scopes/scope_service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/daemon/controller/handlers/scopes/scope_service.go b/internal/daemon/controller/handlers/scopes/scope_service.go index 267b0d589a..73d481a748 100644 --- a/internal/daemon/controller/handlers/scopes/scope_service.go +++ b/internal/daemon/controller/handlers/scopes/scope_service.go @@ -1122,7 +1122,7 @@ func newOutputOpts(ctx context.Context, item *iam.Scope, authResults auth.Verify authorizedActions := authResults.FetchActionSetForId(ctx, item.GetPublicId(), idActionsById(item.GetPublicId()), auth.WithResource(&res)).Strings() if len(authorizedActions) == 0 { - return nil, true, nil + return nil, false, nil } outputFields := authResults.FetchOutputFields(res, action.List).SelfOrDefaults(authResults.UserId)