1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-02 20:15:26 +02:00

Resolve password changing bug for logged in user

This commit is contained in:
sauls8t 2018-01-25 17:50:13 +00:00
parent 8ddc6cedde
commit 5295f8a41f

View file

@ -502,7 +502,7 @@ func (h *Handler) ChangePassword(w http.ResponseWriter, r *http.Request) {
newPassword := string(body)
// can only update your own account unless you are an admin
if !ctx.Administrator || (!ctx.Administrator && userID != ctx.UserID) {
if !ctx.Administrator && userID != ctx.UserID {
response.WriteForbiddenError(w)
return
}