diff options
author | Balasankar C <balasankarc@users.noreply.github.com> | 2018-05-18 19:27:30 +0530 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2018-05-18 09:57:30 -0400 |
commit | d3ead7dc8535f8fa5b175686cc1f7669c8b1648b (patch) | |
tree | ad6e0294e908f71c28f5fed1372c09b972e803a5 /app/user.go | |
parent | c6cbce610043bb050f2c542412eb439dc22c4a88 (diff) | |
download | chat-d3ead7dc8535f8fa5b175686cc1f7669c8b1648b.tar.gz chat-d3ead7dc8535f8fa5b175686cc1f7669c8b1648b.tar.bz2 chat-d3ead7dc8535f8fa5b175686cc1f7669c8b1648b.zip |
MM-10640 Set EnableUserCreation to true by default (#8815)
* Set EnableUserCreation to true by default
* Fix argument type to FormatBool
* Convert EnableUserCreation instances to pointer
* Convert to boolean in tests also
* Set value of pointer to be false
* Convert remaining EnableUserCreation instances to pointer
Diffstat (limited to 'app/user.go')
-rw-r--r-- | app/user.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/user.go b/app/user.go index 2ee410684..2325c6338 100644 --- a/app/user.go +++ b/app/user.go @@ -162,7 +162,7 @@ func (a *App) CreateUserFromSignup(user *model.User) (*model.User, *model.AppErr } func (a *App) IsUserSignUpAllowed() *model.AppError { - if !a.Config().EmailSettings.EnableSignUpWithEmail || !a.Config().TeamSettings.EnableUserCreation { + if !a.Config().EmailSettings.EnableSignUpWithEmail || !*a.Config().TeamSettings.EnableUserCreation { err := model.NewAppError("IsUserSignUpAllowed", "api.user.create_user.signup_email_disabled.app_error", nil, "", http.StatusNotImplemented) return err } @@ -250,7 +250,7 @@ func (a *App) createUser(user *model.User) (*model.User, *model.AppError) { } func (a *App) CreateOAuthUser(service string, userData io.Reader, teamId string) (*model.User, *model.AppError) { - if !a.Config().TeamSettings.EnableUserCreation { + if !*a.Config().TeamSettings.EnableUserCreation { return nil, model.NewAppError("CreateOAuthUser", "api.user.create_user.disabled.app_error", nil, "", http.StatusNotImplemented) } |