summaryrefslogtreecommitdiffstats
path: root/app/user.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-11-02 16:24:11 -0500
committerJoram Wilander <jwawilander@gmail.com>2017-11-02 17:24:11 -0400
commit9d32cd42085bbb37460d815c6c1a00ad881c4895 (patch)
treeeb6963263ecd79ea4e5166a117a6be5ff9706687 /app/user.go
parentfed5324ce505c3725472af23757cd6659bb7139c (diff)
downloadchat-9d32cd42085bbb37460d815c6c1a00ad881c4895.tar.gz
chat-9d32cd42085bbb37460d815c6c1a00ad881c4895.tar.bz2
chat-9d32cd42085bbb37460d815c6c1a00ad881c4895.zip
prevent deactivation of sso users (#7759)
Diffstat (limited to 'app/user.go')
-rw-r--r--app/user.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/user.go b/app/user.go
index a4513af9a..9f74ef303 100644
--- a/app/user.go
+++ b/app/user.go
@@ -867,15 +867,15 @@ func (a *App) UpdatePasswordAsUser(userId, currentPassword, newPassword string)
return a.UpdatePasswordSendEmail(user, newPassword, T("api.user.update_password.menu"))
}
-func (a *App) UpdateActiveNoLdap(userId string, active bool) (*model.User, *model.AppError) {
+func (a *App) UpdateNonSSOUserActive(userId string, active bool) (*model.User, *model.AppError) {
var user *model.User
var err *model.AppError
if user, err = a.GetUser(userId); err != nil {
return nil, err
}
- if user.IsLDAPUser() {
- err := model.NewAppError("UpdateActive", "api.user.update_active.no_deactivate_ldap.app_error", nil, "userId="+user.Id, http.StatusBadRequest)
+ if user.IsSSOUser() {
+ err := model.NewAppError("UpdateActive", "api.user.update_active.no_deactivate_sso.app_error", nil, "userId="+user.Id, http.StatusBadRequest)
err.StatusCode = http.StatusBadRequest
return nil, err
}