Handle android certificates on deletion events (#37481)
This commit is contained in:
@@ -1695,6 +1695,8 @@ type TransitionCertificateTemplatesToDeliveredFunc func(ctx context.Context, hos
|
||||
|
||||
type RevertHostCertificateTemplatesToPendingFunc func(ctx context.Context, hostUUID string, certificateTemplateIDs []uint) error
|
||||
|
||||
type SetHostCertificateTemplatesToPendingRemoveFunc func(ctx context.Context, certificateTemplateID uint) error
|
||||
|
||||
type GetCurrentTimeFunc func(ctx context.Context) (time.Time, error)
|
||||
|
||||
type UpdateOrDeleteHostMDMWindowsProfileFunc func(ctx context.Context, profile *fleet.HostMDMWindowsProfile) error
|
||||
@@ -4212,6 +4214,9 @@ type DataStore struct {
|
||||
RevertHostCertificateTemplatesToPendingFunc RevertHostCertificateTemplatesToPendingFunc
|
||||
RevertHostCertificateTemplatesToPendingFuncInvoked bool
|
||||
|
||||
SetHostCertificateTemplatesToPendingRemoveFunc SetHostCertificateTemplatesToPendingRemoveFunc
|
||||
SetHostCertificateTemplatesToPendingRemoveFuncInvoked bool
|
||||
|
||||
GetCurrentTimeFunc GetCurrentTimeFunc
|
||||
GetCurrentTimeFuncInvoked bool
|
||||
|
||||
@@ -10079,6 +10084,13 @@ func (s *DataStore) RevertHostCertificateTemplatesToPending(ctx context.Context,
|
||||
return s.RevertHostCertificateTemplatesToPendingFunc(ctx, hostUUID, certificateTemplateIDs)
|
||||
}
|
||||
|
||||
func (s *DataStore) SetHostCertificateTemplatesToPendingRemove(ctx context.Context, certificateTemplateID uint) error {
|
||||
s.mu.Lock()
|
||||
s.SetHostCertificateTemplatesToPendingRemoveFuncInvoked = true
|
||||
s.mu.Unlock()
|
||||
return s.SetHostCertificateTemplatesToPendingRemoveFunc(ctx, certificateTemplateID)
|
||||
}
|
||||
|
||||
func (s *DataStore) GetCurrentTime(ctx context.Context) (time.Time, error) {
|
||||
s.mu.Lock()
|
||||
s.GetCurrentTimeFuncInvoked = true
|
||||
|
||||
Reference in New Issue
Block a user