summaryrefslogtreecommitdiffstats
path: root/app/authentication.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-07 09:35:58 -0800
committerGitHub <noreply@github.com>2017-02-07 09:35:58 -0800
commit9dc76c18231f158ab71dfcfae2f1659a4f2a5396 (patch)
tree57a46a30e52e9f955f4d74d93fc6153640fbecc2 /app/authentication.go
parentba18374bd1b2644e577247204fad17dd52913b9b (diff)
downloadchat-9dc76c18231f158ab71dfcfae2f1659a4f2a5396.tar.gz
chat-9dc76c18231f158ab71dfcfae2f1659a4f2a5396.tar.bz2
chat-9dc76c18231f158ab71dfcfae2f1659a4f2a5396.zip
Implement PUT /users/{user_id}/password endpoint for APIv4 (#5243)
Diffstat (limited to 'app/authentication.go')
-rw-r--r--app/authentication.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/authentication.go b/app/authentication.go
index 0561ff821..3691c7c3e 100644
--- a/app/authentication.go
+++ b/app/authentication.go
@@ -4,12 +4,12 @@
package app
import (
+ "net/http"
+ "strings"
+
"github.com/mattermost/platform/einterfaces"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
-
- "net/http"
- "strings"
)
func CheckPasswordAndAllCriteria(user *model.User, password string, mfaToken string) *model.AppError {
@@ -123,7 +123,7 @@ func CheckUserMfa(user *model.User, token string) *model.AppError {
func checkUserLoginAttempts(user *model.User) *model.AppError {
if user.FailedAttempts >= utils.Cfg.ServiceSettings.MaximumLoginAttempts {
- return model.NewLocAppError("checkUserLoginAttempts", "api.user.check_user_login_attempts.too_many.app_error", nil, "user_id="+user.Id)
+ return model.NewAppError("checkUserLoginAttempts", "api.user.check_user_login_attempts.too_many.app_error", nil, "user_id="+user.Id, http.StatusForbidden)
}
return nil