mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Count can happen with only list permissions (#2441)
This commit is contained in:
parent
4d0b19d8fb
commit
9b19e3ace6
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue