mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 19:53:21 +02:00
fix: allowed register condition
This commit is contained in:
@@ -153,7 +153,7 @@ func (h *Handler) Login(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) Register(w http.ResponseWriter, r *http.Request) {
|
func (h *Handler) Register(w http.ResponseWriter, r *http.Request) {
|
||||||
if !h.IsLoggedIn(r) && !h.SomeUsersVerified() {
|
if h.SomeUsersVerified() {
|
||||||
http.Error(w, "You are not allowed to create a user. Log in or reset database.", http.StatusForbidden)
|
http.Error(w, "You are not allowed to create a user. Log in or reset database.", http.StatusForbidden)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user