* Remove deprecated ldap_sync_ttl
(cherry picked from commit 389eec089e)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
This commit is contained in:
co-authored by
Karl Persson
parent
199b1467aa
commit
a87062e4e6
+1
-15
@@ -49,12 +49,6 @@ const (
|
||||
ApplicationName = "Grafana"
|
||||
)
|
||||
|
||||
// This constant corresponds to the default value for ldap_sync_ttl in .ini files
|
||||
// it is used for comparison and has to be kept in sync
|
||||
const (
|
||||
authProxySyncTTL = 60
|
||||
)
|
||||
|
||||
// zoneInfo names environment variable for setting the path to look for the timezone database in go
|
||||
const zoneInfo = "ZONEINFO"
|
||||
|
||||
@@ -1332,15 +1326,7 @@ func readAuthSettings(iniFile *ini.File, cfg *Cfg) (err error) {
|
||||
cfg.AuthProxyAutoSignUp = authProxy.Key("auto_sign_up").MustBool(true)
|
||||
cfg.AuthProxyEnableLoginToken = authProxy.Key("enable_login_token").MustBool(false)
|
||||
|
||||
ldapSyncVal := authProxy.Key("ldap_sync_ttl").MustInt()
|
||||
syncVal := authProxy.Key("sync_ttl").MustInt()
|
||||
|
||||
if ldapSyncVal != authProxySyncTTL {
|
||||
cfg.AuthProxySyncTTL = ldapSyncVal
|
||||
cfg.Logger.Warn("[Deprecated] the configuration setting 'ldap_sync_ttl' is deprecated, please use 'sync_ttl' instead")
|
||||
} else {
|
||||
cfg.AuthProxySyncTTL = syncVal
|
||||
}
|
||||
cfg.AuthProxySyncTTL = authProxy.Key("sync_ttl").MustInt()
|
||||
|
||||
cfg.AuthProxyWhitelist = valueAsString(authProxy, "whitelist", "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user