Commit 9c9691f7 by Hugo Häggmark Committed by Hugo Häggmark

Added feature toggle editors_can_own

parent dafcfd70
......@@ -167,6 +167,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *m.ReqContext) (map[string]interf
"externalUserMngLinkUrl": setting.ExternalUserMngLinkUrl,
"externalUserMngLinkName": setting.ExternalUserMngLinkName,
"viewersCanEdit": setting.ViewersCanEdit,
"editorsCanOwn": setting.EditorsCanOwn,
"disableSanitizeHtml": hs.Cfg.DisableSanitizeHtml,
"buildInfo": map[string]interface{}{
"version": setting.BuildVersion,
......
......@@ -118,6 +118,7 @@ var (
ExternalUserMngInfo string
OAuthAutoLogin bool
ViewersCanEdit bool
EditorsCanOwn bool
// Http auth
AdminUser string
......@@ -657,6 +658,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
ExternalUserMngLinkName = users.Key("external_manage_link_name").String()
ExternalUserMngInfo = users.Key("external_manage_info").String()
ViewersCanEdit = users.Key("viewers_can_edit").MustBool(false)
EditorsCanOwn = users.Key("editors_can_own").MustBool(false)
// auth
auth := iniFile.Section("auth")
......
......@@ -36,6 +36,7 @@ export class Settings {
loginHint: any;
loginError: any;
viewersCanEdit: boolean;
editorsCanOwn: boolean;
disableSanitizeHtml: boolean;
theme: GrafanaTheme;
......@@ -57,6 +58,7 @@ export class Settings {
isEnterprise: false,
},
viewersCanEdit: false,
editorsCanOwn: false,
disableSanitizeHtml: false,
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment