mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-01-19 00:27:25 +01:00
prevent changing admin passwords
This commit is contained in:
@@ -50,6 +50,9 @@ func (s *Server) handleUsersAdd(w http.ResponseWriter, r *http.Request, v *visit
|
||||
return err
|
||||
} else if u != nil {
|
||||
if req.Force == true {
|
||||
if u.IsAdmin() {
|
||||
return errHTTPForbidden
|
||||
}
|
||||
if err := s.userManager.ChangePassword(req.Username, req.Password); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user