diff --git a/server/service/hosts.go b/server/service/hosts.go index 515604b98b..840a7fb57c 100644 --- a/server/service/hosts.go +++ b/server/service/hosts.go @@ -102,7 +102,7 @@ func countHostsEndpoint(ctx context.Context, request interface{}, svc fleet.Serv } func (svc Service) CountHosts(ctx context.Context, labelID *uint, opts fleet.HostListOptions) (int, error) { - if err := svc.authz.Authorize(ctx, &fleet.Host{}, fleet.ActionRead); err != nil { + if err := svc.authz.Authorize(ctx, &fleet.Host{}, fleet.ActionList); err != nil { return 0, err }