1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

Remove "Create Account" button when AllowSignup is set to false (#319)

Merge pull request #319
This commit is contained in:
Roch D'Amour
2022-02-16 02:56:27 -05:00
committed by GitHub
parent 3758eecc96
commit ac9d96c563
6 changed files with 29 additions and 10 deletions

View File

@@ -299,10 +299,12 @@ func (h *LoginHandler) PostResetPassword(w http.ResponseWriter, r *http.Request)
func (h *LoginHandler) buildViewModel(r *http.Request) *view.LoginViewModel {
numUsers, _ := h.userSrvc.Count()
allowSignup := h.config.Security.AllowSignup
return &view.LoginViewModel{
Success: r.URL.Query().Get("success"),
Error: r.URL.Query().Get("error"),
TotalUsers: int(numUsers),
Success: r.URL.Query().Get("success"),
Error: r.URL.Query().Get("error"),
TotalUsers: int(numUsers),
AllowSignup: allowSignup,
}
}