diff --git a/config/config.json b/config/config.json index 38acee85a7..101b8ebcb2 100644 --- a/config/config.json +++ b/config/config.json @@ -6,6 +6,8 @@ "GoogleDeveloperKey": "", "EnableOAuthServiceProvider": false, "EnableIncomingWebhooks": true, + "EnablePostUsernameOverride": false, + "EnablePostIconOverride": false, "EnableTesting": false }, "TeamSettings": { @@ -86,4 +88,4 @@ "TokenEndpoint": "", "UserApiEndpoint": "" } -} \ No newline at end of file +} diff --git a/docker/dev/config_docker.json b/docker/dev/config_docker.json index 733267f748..37daaae35f 100644 --- a/docker/dev/config_docker.json +++ b/docker/dev/config_docker.json @@ -6,6 +6,8 @@ "GoogleDeveloperKey": "", "EnableOAuthServiceProvider": false, "EnableIncomingWebhooks": true, + "EnablePostUsernameOverride": false, + "EnablePostIconOverride": false, "EnableTesting": false }, "TeamSettings": { diff --git a/docker/local/config_docker.json b/docker/local/config_docker.json index 733267f748..37daaae35f 100644 --- a/docker/local/config_docker.json +++ b/docker/local/config_docker.json @@ -6,6 +6,8 @@ "GoogleDeveloperKey": "", "EnableOAuthServiceProvider": false, "EnableIncomingWebhooks": true, + "EnablePostUsernameOverride": false, + "EnablePostIconOverride": false, "EnableTesting": false }, "TeamSettings": { diff --git a/model/config.go b/model/config.go index 5d822e2631..e3904cc49d 100644 --- a/model/config.go +++ b/model/config.go @@ -29,6 +29,8 @@ type ServiceSettings struct { GoogleDeveloperKey string EnableOAuthServiceProvider bool EnableIncomingWebhooks bool + EnablePostUsernameOverride bool + EnablePostIconOverride bool EnableTesting bool } diff --git a/utils/config.go b/utils/config.go index 3218211e3a..44c4c43aff 100644 --- a/utils/config.go +++ b/utils/config.go @@ -184,6 +184,8 @@ func getClientProperties(c *model.Config) map[string]string { props["SegmentDeveloperKey"] = c.ServiceSettings.SegmentDeveloperKey props["GoogleDeveloperKey"] = c.ServiceSettings.GoogleDeveloperKey props["EnableIncomingWebhooks"] = strconv.FormatBool(c.ServiceSettings.EnableIncomingWebhooks) + props["EnablePostUsernameOverride"] = strconv.FormatBool(c.ServiceSettings.EnablePostUsernameOverride) + props["EnablePostIconOverride"] = strconv.FormatBool(c.ServiceSettings.EnablePostIconOverride) props["SendEmailNotifications"] = strconv.FormatBool(c.EmailSettings.SendEmailNotifications) props["EnableSignUpWithEmail"] = strconv.FormatBool(c.EmailSettings.EnableSignUpWithEmail) diff --git a/web/react/components/admin_console/service_settings.jsx b/web/react/components/admin_console/service_settings.jsx index 245ffa871c..abc92cc206 100644 --- a/web/react/components/admin_console/service_settings.jsx +++ b/web/react/components/admin_console/service_settings.jsx @@ -37,6 +37,8 @@ export default class ServiceSettings extends React.Component { config.ServiceSettings.GoogleDeveloperKey = React.findDOMNode(this.refs.GoogleDeveloperKey).value.trim(); //config.ServiceSettings.EnableOAuthServiceProvider = React.findDOMNode(this.refs.EnableOAuthServiceProvider).checked; config.ServiceSettings.EnableIncomingWebhooks = React.findDOMNode(this.refs.EnableIncomingWebhooks).checked; + config.ServiceSettings.EnablePostUsernameOverride = React.findDOMNode(this.refs.EnablePostUsernameOverride).checked; + config.ServiceSettings.EnablePostIconOverride = React.findDOMNode(this.refs.EnablePostIconOverride).checked; config.ServiceSettings.EnableTesting = React.findDOMNode(this.refs.EnableTesting).checked; var MaximumLoginAttempts = 10; @@ -203,6 +205,72 @@ export default class ServiceSettings extends React.Component { +
+ +
+ + +

{'When true, webhooks will be allowed to change the username they are posting as. Note, combined with allowing icon overriding, this could open users up to phishing attacks.'}

+
+
+ +
+ +
+ + +

{'When true, webhooks will be allowed to change the icon they post with. Note, combined with allowing username overriding, this could open users up to phishing attacks.'}

+
+
+