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:
parent
8ddc6cedde
commit
5295f8a41f
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue