Allow regular users to change their info, including password.

Should fix #199
This commit is contained in:
Deluan 2021-04-28 22:35:25 -04:00
parent 22582392a0
commit a35de2bfd1
9 changed files with 77 additions and 25 deletions

View file

@ -37,6 +37,7 @@ func CreateToken(u *model.User) (string, error) {
claims := token.Claims.(jwt.MapClaims)
claims["iss"] = consts.JWTIssuer
claims["sub"] = u.UserName
claims["uid"] = u.ID
claims["adm"] = u.IsAdmin
return TouchToken(token)