Closed
Description
- Gitea version (or commit ref): 1.8.1
- Git version: 2.20.1
- Operating system: Gitea Docker Image
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
2019/07/22 02:04:57 [...s/context/context.go:238 func1()] [E] UserSignIn: user is not allowed login [uid: 5, name: <username>]
2019/07/22 02:04:57 [...routers/repo/http.go:205 HTTP()] [E] UserSignIn error: %v: user is not allowed login [uid: 5, name: <username>]
Description
When trying to git clone
with an account that is activated but has disable sign in checked, Gitea returns 500. It should return a more appropriate HTTP status code, i.e. 401 or 403, since 500 may lead people to believe that something is wrong on Gitea's side when it isn't.
(The context for this was that I was trying to get a user account that was allowed read-only git access, but not web ui access - like a service account. I tried to keep the account active but disabled sign-in...)
Screenshots
N/A