mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 12:59:11 -05:00
Handle ErrUserProhibitLogin in http git (#7586)
This commit is contained in:
parent
4334652ed1
commit
2f75766532
1 changed files with 4 additions and 1 deletions
|
@ -215,7 +215,10 @@ func HTTP(ctx *context.Context) {
|
|||
// Check username and password
|
||||
authUser, err = models.UserSignIn(authUsername, authPasswd)
|
||||
if err != nil {
|
||||
if !models.IsErrUserNotExist(err) {
|
||||
if models.IsErrUserProhibitLogin(err) {
|
||||
ctx.HandleText(http.StatusUnauthorized, "User is not permitted to login")
|
||||
return
|
||||
} else if !models.IsErrUserNotExist(err) {
|
||||
ctx.ServerError("UserSignIn error: %v", err)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue