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 ...@@ -167,6 +167,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *m.ReqContext) (map[string]interf
"externalUserMngLinkUrl": setting.ExternalUserMngLinkUrl, "externalUserMngLinkUrl": setting.ExternalUserMngLinkUrl,
"externalUserMngLinkName": setting.ExternalUserMngLinkName, "externalUserMngLinkName": setting.ExternalUserMngLinkName,
"viewersCanEdit": setting.ViewersCanEdit, "viewersCanEdit": setting.ViewersCanEdit,
"editorsCanOwn": setting.EditorsCanOwn,
"disableSanitizeHtml": hs.Cfg.DisableSanitizeHtml, "disableSanitizeHtml": hs.Cfg.DisableSanitizeHtml,
"buildInfo": map[string]interface{}{ "buildInfo": map[string]interface{}{
"version": setting.BuildVersion, "version": setting.BuildVersion,
......
...@@ -118,6 +118,7 @@ var ( ...@@ -118,6 +118,7 @@ var (
ExternalUserMngInfo string ExternalUserMngInfo string
OAuthAutoLogin bool OAuthAutoLogin bool
ViewersCanEdit bool ViewersCanEdit bool
EditorsCanOwn bool
// Http auth // Http auth
AdminUser string AdminUser string
...@@ -657,6 +658,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error { ...@@ -657,6 +658,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
ExternalUserMngLinkName = users.Key("external_manage_link_name").String() ExternalUserMngLinkName = users.Key("external_manage_link_name").String()
ExternalUserMngInfo = users.Key("external_manage_info").String() ExternalUserMngInfo = users.Key("external_manage_info").String()
ViewersCanEdit = users.Key("viewers_can_edit").MustBool(false) ViewersCanEdit = users.Key("viewers_can_edit").MustBool(false)
EditorsCanOwn = users.Key("editors_can_own").MustBool(false)
// auth // auth
auth := iniFile.Section("auth") auth := iniFile.Section("auth")
......
...@@ -36,6 +36,7 @@ export class Settings { ...@@ -36,6 +36,7 @@ export class Settings {
loginHint: any; loginHint: any;
loginError: any; loginError: any;
viewersCanEdit: boolean; viewersCanEdit: boolean;
editorsCanOwn: boolean;
disableSanitizeHtml: boolean; disableSanitizeHtml: boolean;
theme: GrafanaTheme; theme: GrafanaTheme;
...@@ -57,6 +58,7 @@ export class Settings { ...@@ -57,6 +58,7 @@ export class Settings {
isEnterprise: false, isEnterprise: false,
}, },
viewersCanEdit: false, viewersCanEdit: false,
editorsCanOwn: false,
disableSanitizeHtml: 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