We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4334652 commit 2f75766Copy full SHA for 2f75766
routers/repo/http.go
@@ -215,7 +215,10 @@ func HTTP(ctx *context.Context) {
215
// Check username and password
216
authUser, err = models.UserSignIn(authUsername, authPasswd)
217
if err != nil {
218
- if !models.IsErrUserNotExist(err) {
+ if models.IsErrUserProhibitLogin(err) {
219
+ ctx.HandleText(http.StatusUnauthorized, "User is not permitted to login")
220
+ return
221
+ } else if !models.IsErrUserNotExist(err) {
222
ctx.ServerError("UserSignIn error: %v", err)
223
return
224
}
0 commit comments