summaryrefslogtreecommitdiffstats
path: root/cmd/serv.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/serv.go')
-rw-r--r--cmd/serv.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/serv.go b/cmd/serv.go
index 0326656f2a..5d567e6d64 100644
--- a/cmd/serv.go
+++ b/cmd/serv.go
@@ -230,6 +230,12 @@ func runServ(c *cli.Context) error {
fail("internal error", "Failed to get user by key ID(%d): %v", keyID, err)
}
+ if !user.IsActive || user.ProhibitLogin {
+ fail("Your account is not active or has been disabled by Administrator",
+ "User %s is disabled and have no access to repository %s",
+ user.Name, repoPath)
+ }
+
mode, err := models.AccessLevel(user.ID, repo)
if err != nil {
fail("Internal error", "Failed to check access: %v", err)