refact "cscli bouncers" (#2776)

This commit is contained in:
mmetc 2024-01-31 12:40:41 +01:00 committed by GitHub
parent 3921c3f480
commit 4192af30d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 201 additions and 187 deletions

View file

@ -285,7 +285,7 @@ func (c *Config) LoadAPIServer(inCli bool) error {
}
}
if c.API.Server.OnlineClient == nil || c.API.Server.OnlineClient.Credentials == nil {
if (c.API.Server.OnlineClient == nil || c.API.Server.OnlineClient.Credentials == nil) && !inCli {
log.Printf("push and pull to Central API disabled")
}
@ -297,7 +297,7 @@ func (c *Config) LoadAPIServer(inCli bool) error {
return err
}
if c.API.Server.CapiWhitelistsPath != "" {
if c.API.Server.CapiWhitelistsPath != "" && !inCli {
log.Infof("loaded capi whitelist from %s: %d IPs, %d CIDRs", c.API.Server.CapiWhitelistsPath, len(c.API.Server.CapiWhitelists.Ips), len(c.API.Server.CapiWhitelists.Cidrs))
}