diff --git a/api/api.go b/api/api.go index 10f3deb82b..8203b07a62 100644 --- a/api/api.go +++ b/api/api.go @@ -42,7 +42,6 @@ func InitApi() { InitWebSocket(r) InitFile(r) InitCommand(r) - InitConfig(r) InitAdmin(r) templatesDir := utils.FindDir("api/templates") diff --git a/api/config.go b/api/config.go deleted file mode 100644 index 142d1ca66b..0000000000 --- a/api/config.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. -// See License.txt for license information. - -package api - -import ( - l4g "code.google.com/p/log4go" - "encoding/json" - "github.com/gorilla/mux" - "github.com/mattermost/platform/model" - "github.com/mattermost/platform/utils" - "net/http" - "strconv" -) - -func InitConfig(r *mux.Router) { - l4g.Debug("Initializing config api routes") - - sr := r.PathPrefix("/config").Subrouter() - sr.Handle("/get_all", ApiAppHandler(getConfig)).Methods("GET") -} - -func getConfig(c *Context, w http.ResponseWriter, r *http.Request) { - settings := make(map[string]string) - - settings["ByPassEmail"] = strconv.FormatBool(utils.Cfg.EmailSettings.ByPassEmail) - - if bytes, err := json.Marshal(settings); err != nil { - c.Err = model.NewAppError("getConfig", "Unable to marshall configuration data", err.Error()) - return - } else { - w.Write(bytes) - } -} diff --git a/utils/config.go b/utils/config.go index eb78cd08aa..9f66e9f377 100644 --- a/utils/config.go +++ b/utils/config.go @@ -282,8 +282,10 @@ func getClientProperties(c *Config) map[string]string { props["SegmentDeveloperKey"] = c.ClientSettings.SegmentDeveloperKey props["GoogleDeveloperKey"] = c.ClientSettings.GoogleDeveloperKey props["AnalyticsUrl"] = c.ServiceSettings.AnalyticsUrl + props["ByPassEmail"] = strconv.FormatBool(c.EmailSettings.ByPassEmail) props["ProfileHeight"] = fmt.Sprintf("%v", c.ImageSettings.ProfileHeight) props["ProfileWidth"] = fmt.Sprintf("%v", c.ImageSettings.ProfileWidth) + props["ProfileWidth"] = fmt.Sprintf("%v", c.ImageSettings.ProfileWidth) return props } diff --git a/web/react/components/invite_member_modal.jsx b/web/react/components/invite_member_modal.jsx index 7f576626f8..650a725163 100644 --- a/web/react/components/invite_member_modal.jsx +++ b/web/react/components/invite_member_modal.jsx @@ -2,7 +2,6 @@ // See License.txt for license information. var utils = require('../utils/utils.jsx'); -var ConfigStore = require('../stores/config_store.jsx'); var Client = require('../utils/client.jsx'); var UserStore = require('../stores/user_store.jsx'); var ConfirmModal = require('./confirm_modal.jsx'); @@ -22,7 +21,7 @@ export default class InviteMemberModal extends React.Component { emailErrors: {}, firstNameErrors: {}, lastNameErrors: {}, - emailEnabled: !ConfigStore.getSettingAsBoolean('ByPassEmail', false) + emailEnabled: !global.window.config.ByPassEmail }; } diff --git a/web/react/components/signup_user_complete.jsx b/web/react/components/signup_user_complete.jsx index e021c9cd13..7d0b20c7e4 100644 --- a/web/react/components/signup_user_complete.jsx +++ b/web/react/components/signup_user_complete.jsx @@ -236,11 +236,6 @@ export default class SignupUserComplete extends React.Component { ); } - var termsDisclaimer = null; - if (global.window.config.ShowTermsDuringSignup) { - termsDisclaimer =
By creating an account and using Mattermost you are agreeing to our Terms of Service. If you do not agree, you cannot use this service.
; - } - return (