From 16d23fa55f6915b388f23c2dbc5a673249ba8823 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 736382ba1a..fd5d249da0 100644 --- a/internal/daemon/controller/handlers/scopes/scope_service.go +++ b/internal/daemon/controller/handlers/scopes/scope_service.go @@ -1124,7 +1124,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)