do not submit unregisred user

This commit is contained in:
dwertent
2021-10-12 09:51:14 +03:00
parent 07443548c9
commit c67b111c77
+5 -5
View File
@@ -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