summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-09-01 08:49:54 -0400
committerChristopher Speller <crspeller@gmail.com>2015-09-01 08:49:54 -0400
commit72575ac7bdd5bfe7bd544ba238f8d1c0126635aa (patch)
treef1ed51dfc87879e73261625f3afb4d4169e2a3f8 /api
parent0b3db018d33601a44c86d08771441c5dacd18969 (diff)
parent8d6c35481124d7e30bdb559f440c48b3e5eb4e0d (diff)
downloadchat-72575ac7bdd5bfe7bd544ba238f8d1c0126635aa.tar.gz
chat-72575ac7bdd5bfe7bd544ba238f8d1c0126635aa.tar.bz2
chat-72575ac7bdd5bfe7bd544ba238f8d1c0126635aa.zip
Merging release branch 'release-0.7.0'
Diffstat (limited to 'api')
-rw-r--r--api/team.go6
-rw-r--r--api/user.go2
-rw-r--r--api/user_test.go6
3 files changed, 4 insertions, 10 deletions
diff --git a/api/team.go b/api/team.go
index e34b3a610..8cce384c3 100644
--- a/api/team.go
+++ b/api/team.go
@@ -36,7 +36,7 @@ func InitTeam(r *mux.Router) {
}
func signupTeam(c *Context, w http.ResponseWriter, r *http.Request) {
- if !utils.Cfg.ServiceSettings.AllowEmailSignUp {
+ if utils.Cfg.ServiceSettings.DisableEmailSignUp {
c.Err = model.NewAppError("signupTeam", "Team sign-up with email is disabled.", "")
c.Err.StatusCode = http.StatusNotImplemented
return
@@ -139,7 +139,7 @@ func createTeamFromSSO(c *Context, w http.ResponseWriter, r *http.Request) {
}
func createTeamFromSignup(c *Context, w http.ResponseWriter, r *http.Request) {
- if !utils.Cfg.ServiceSettings.AllowEmailSignUp {
+ if utils.Cfg.ServiceSettings.DisableEmailSignUp {
c.Err = model.NewAppError("createTeamFromSignup", "Team sign-up with email is disabled.", "")
c.Err.StatusCode = http.StatusNotImplemented
return
@@ -239,7 +239,7 @@ func createTeamFromSignup(c *Context, w http.ResponseWriter, r *http.Request) {
}
func createTeam(c *Context, w http.ResponseWriter, r *http.Request) {
- if !utils.Cfg.ServiceSettings.AllowEmailSignUp {
+ if utils.Cfg.ServiceSettings.DisableEmailSignUp {
c.Err = model.NewAppError("createTeam", "Team sign-up with email is disabled.", "")
c.Err.StatusCode = http.StatusNotImplemented
return
diff --git a/api/user.go b/api/user.go
index 3796dde2a..d69244fad 100644
--- a/api/user.go
+++ b/api/user.go
@@ -58,7 +58,7 @@ func InitUser(r *mux.Router) {
}
func createUser(c *Context, w http.ResponseWriter, r *http.Request) {
- if !utils.Cfg.ServiceSettings.AllowEmailSignUp {
+ if utils.Cfg.ServiceSettings.DisableEmailSignUp {
c.Err = model.NewAppError("signupTeam", "User sign-up with email is disabled.", "")
c.Err.StatusCode = http.StatusNotImplemented
return
diff --git a/api/user_test.go b/api/user_test.go
index 776b17b3c..b5435e3c0 100644
--- a/api/user_test.go
+++ b/api/user_test.go
@@ -68,12 +68,6 @@ func TestCreateUser(t *testing.T) {
}
}
- user2 := model.User{TeamId: rteam.Data.(*model.Team).Id, Email: strings.ToLower(model.NewId()) + "corey@test.com", Nickname: "Corey Hulen", Password: "hello", Username: model.BOT_USERNAME}
-
- if _, err := Client.CreateUser(&user2, ""); err == nil {
- t.Fatal("Should have failed using reserved bot name")
- }
-
if _, err := Client.DoPost("/users/create", "garbage"); err == nil {
t.Fatal("should have been an error")
}