mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Bug 10631: Updated SearchHost authorization action (#10655)
Updated authorization on 'host/search' endpoint so that logged in users can list hosts.
This commit is contained in:
parent
f30fe7e4a9
commit
5c465549e7
2 changed files with 2 additions and 1 deletions
1
changes/10631-updated-action-on-host-search
Normal file
1
changes/10631-updated-action-on-host-search
Normal file
|
|
@ -0,0 +1 @@
|
|||
Bug: Updated authorization action used on host/search endpoint
|
||||
|
|
@ -324,7 +324,7 @@ func searchHostsEndpoint(ctx context.Context, request interface{}, svc fleet.Ser
|
|||
}
|
||||
|
||||
func (svc *Service) SearchHosts(ctx context.Context, matchQuery string, queryID *uint, excludedHostIDs []uint) ([]*fleet.Host, 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 nil, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue