Cfg: Adds experimental scope grafana.ini settings (#83174)

Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
Carl Bergquist
2024-03-05 16:41:19 +01:00
committed by GitHub
parent 7f970d4887
commit b3efb4217e
8 changed files with 1842 additions and 1869 deletions

View File

@@ -521,6 +521,10 @@ type Cfg struct {
// News Feed
NewsFeedEnabled bool
// Experimental scope settings
ScopesListScopesURL string
ScopesListDashboardsURL string
}
// AddChangePasswordLink returns if login form is disabled or not since
@@ -1281,6 +1285,11 @@ func (cfg *Cfg) parseINIFile(iniFile *ini.File) error {
cfg.readFeatureManagementConfig()
cfg.readPublicDashboardsSettings()
// read experimental scopes settings.
scopesSection := iniFile.Section("scopes")
cfg.ScopesListScopesURL = scopesSection.Key("list_scopes_endpoint").MustString("")
cfg.ScopesListDashboardsURL = scopesSection.Key("list_dashboards_endpoint").MustString("")
return nil
}