Change password reset endpoint to /admin/user/{Username}/passphrase

Ref T695
pull/192/head
Matt Baer 5 years ago
parent aa9efc7b37
commit 6e09fcb9e2
  1. 2
      routes.go
  2. 2
      templates/user/admin/view-user.tmpl

@ -144,7 +144,7 @@ func InitRoutes(apper Apper, r *mux.Router) *mux.Router {
write.HandleFunc("/admin", handler.Admin(handleViewAdminDash)).Methods("GET")
write.HandleFunc("/admin/users", handler.Admin(handleViewAdminUsers)).Methods("GET")
write.HandleFunc("/admin/user/{username}", handler.Admin(handleViewAdminUser)).Methods("GET")
write.HandleFunc("/admin/user/{username}", handler.Admin(handleAdminResetUserPass)).Methods("POST")
write.HandleFunc("/admin/user/{username}/passphrase", handler.Admin(handleAdminResetUserPass)).Methods("POST")
write.HandleFunc("/admin/pages", handler.Admin(handleViewAdminPages)).Methods("GET")
write.HandleFunc("/admin/page/{slug}", handler.Admin(handleViewAdminPage)).Methods("GET")
write.HandleFunc("/admin/update/config", handler.AdminApper(handleAdminUpdateConfig)).Methods("POST")

@ -62,7 +62,7 @@ button[type="submit"].danger {
<th>Password</th>
<td>
{{if not .OwnUserPage}}
<form id="reset-form" action="/admin/user/{{.User.Username}}" method="post" autocomplete="false">
<form id="reset-form" action="/admin/user/{{.User.Username}}/passphrase" method="post" autocomplete="false">
<input type="hidden" name="user" value="{{.User.ID}}"/>
<button
class="danger"

Loading…
Cancel
Save