diff --git a/conf/defaults.ini b/conf/defaults.ini index e8e0a152dc8..22918d44339 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -527,9 +527,11 @@ external_manage_link_url = external_manage_link_name = external_manage_info = +# Deprecated: Assign your viewers to editors. # Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard. viewers_can_edit = false +# Deprecated: Assign your editors to admins. # Editors can administrate dashboard, folders and teams they create editors_can_admin = false diff --git a/conf/sample.ini b/conf/sample.ini index 7022ff51b26..e3b3c1f965d 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -528,9 +528,12 @@ ;external_manage_link_name = ;external_manage_info = + +# Deprecated: Assign your viewers to editors. # Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard. ;viewers_can_edit = false +# Deprecated: Assign your editors to admins. # Editors can administrate dashboard, folders and teams they create ;editors_can_admin = false diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go index 5b560c3b937..cc1b10b9054 100644 --- a/pkg/setting/setting.go +++ b/pkg/setting/setting.go @@ -294,8 +294,8 @@ type Cfg struct { // DistributedCache RemoteCacheOptions *RemoteCacheSettings - ViewersCanEdit bool - EditorsCanAdmin bool + ViewersCanEdit bool // Deprecated: no longer used + EditorsCanAdmin bool // Deprecated: no longer used ApiKeyMaxSecondsToLive int64 @@ -1729,8 +1729,16 @@ func readUserSettings(iniFile *ini.File, cfg *Cfg) error { cfg.ExternalUserMngAnalytics = users.Key("external_manage_analytics").MustBool(false) cfg.ExternalUserMngAnalyticsParams = valueAsString(users, "external_manage_analytics_params", "") + // Deprecated cfg.ViewersCanEdit = users.Key("viewers_can_edit").MustBool(false) + if cfg.ViewersCanEdit { + cfg.Logger.Warn("[Deprecated] The viewers_can_edit configuration setting is deprecated. Please upgrade viewers to editors.") + } + // Deprecated cfg.EditorsCanAdmin = users.Key("editors_can_admin").MustBool(false) + if cfg.EditorsCanAdmin { + cfg.Logger.Warn("[Deprecated] The editors_can_admin configuration setting is deprecated. Please upgrade editors to admin.") + } userInviteMaxLifetimeVal := valueAsString(users, "user_invite_max_lifetime_duration", "24h") userInviteMaxLifetimeDuration, err := gtime.ParseDuration(userInviteMaxLifetimeVal)