fleet/ee/server/service/devices.go
Roberto Dip 61a8a80514
allow to rotate disk encryption key from My Device (#10592)
Related to https://github.com/fleetdm/fleet/issues/8961

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2023-03-20 16:14:07 -03:00

20 lines
545 B
Go

package service
import (
"context"
"github.com/fleetdm/fleet/v4/server/fleet"
)
func (svc *Service) ListDevicePolicies(ctx context.Context, host *fleet.Host) ([]*fleet.HostPolicy, error) {
return svc.ds.ListPoliciesForHost(ctx, host)
}
func (svc *Service) FailingPoliciesCount(ctx context.Context, host *fleet.Host) (uint, error) {
return svc.ds.FailingPoliciesCount(ctx, host)
}
func (svc *Service) RequestEncryptionKeyRotation(ctx context.Context, hostID uint) error {
return svc.ds.SetDiskEncryptionResetStatus(ctx, hostID, true)
}