From c67b111c779fb830ccffce5ae345ce2b7565862f Mon Sep 17 00:00:00 2001 From: dwertent Date: Tue, 12 Oct 2021 09:51:14 +0300 Subject: [PATCH] do not submit unregisred user --- cautils/customerloader.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cautils/customerloader.go b/cautils/customerloader.go index 12722a58..2c23dde7 100644 --- a/cautils/customerloader.go +++ b/cautils/customerloader.go @@ -65,7 +65,7 @@ func ClusterConfigSetup(scanInfo *ScanInfo, k8s *k8sinterface.KubernetesApi, beA Submit - Create tenant & Submit report If "Submitted but not signed up" - - Default - Submit report (submit) + Default - Delete local config & Do not send report (local) Local - Delete local config & Do not send report Submit - Submit report @@ -85,11 +85,11 @@ func ClusterConfigSetup(scanInfo *ScanInfo, k8s *k8sinterface.KubernetesApi, beA return NewEmptyConfig() // local/default - Do not send report } if !IsRegistered(clusterConfig) { - if scanInfo.Local { - DeleteConfig(k8s) - return NewEmptyConfig() // local - Delete local config & Do not send report + if scanInfo.Submit { + return clusterConfig // submit/default - Submit report } - return clusterConfig // submit/default - Submit report + DeleteConfig(k8s) + return NewEmptyConfig() // local - Delete local config & Do not send report } if scanInfo.Local { return NewEmptyConfig() // local - Do not send report