mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-13 05:04:42 +00:00
added log message when user attempts to login but registration closed
This commit is contained in:
@@ -52,6 +52,7 @@ func GetLogin(c web.C, w http.ResponseWriter, r *http.Request) {
|
|||||||
if capability.Enabled(ctx, capability.Registration) == false {
|
if capability.Enabled(ctx, capability.Registration) == false {
|
||||||
users, err := datastore.GetUserList(ctx)
|
users, err := datastore.GetUserList(ctx)
|
||||||
if err != nil || len(users) != 0 {
|
if err != nil || len(users) != 0 {
|
||||||
|
log.Println("Unable to create account. Registration is closed")
|
||||||
w.WriteHeader(http.StatusForbidden)
|
w.WriteHeader(http.StatusForbidden)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user