mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-11-29 11:50:22 +01:00
user: Allow changing the hashed password directly
This adds the detection of `NTFY_PASSWORD_HASH` when creating a user or changing its passsword so that scripts don't have to manipulate the bare password.
This commit is contained in:
parent
630f2957de
commit
44b7c2f198
11 changed files with 144 additions and 107 deletions
|
|
@ -60,7 +60,7 @@ func (s *Server) handleUsersAdd(w http.ResponseWriter, r *http.Request, v *visit
|
|||
return err
|
||||
}
|
||||
}
|
||||
if err := s.userManager.AddUser(req.Username, req.Password, user.RoleUser); err != nil {
|
||||
if err := s.userManager.AddUser(req.Username, req.Password, user.RoleUser, false); err != nil {
|
||||
return err
|
||||
}
|
||||
if tier != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue