mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 02:11:01 +00:00
added log message when user attempts to login but registration closed
This commit is contained in:
parent
782914b46f
commit
a2dadfd6a6
1 changed files with 1 additions and 0 deletions
|
@ -52,6 +52,7 @@ func GetLogin(c web.C, w http.ResponseWriter, r *http.Request) {
|
|||
if capability.Enabled(ctx, capability.Registration) == false {
|
||||
users, err := datastore.GetUserList(ctx)
|
||||
if err != nil || len(users) != 0 {
|
||||
log.Println("Unable to create account. Registration is closed")
|
||||
w.WriteHeader(http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue