diff options
author | Peter Smit <peter@smitmail.eu> | 2015-02-16 12:00:06 +0200 |
---|---|---|
committer | Peter Smit <peter@smitmail.eu> | 2015-02-16 12:00:06 +0200 |
commit | f9454cc32c94780eb4c49753fc0ccd9b60b1deb7 (patch) | |
tree | a16185c28567718c97de6174bd075a28fe8bb1e2 /cmd | |
parent | cd6a2b78a752605d808c6392ce78b92d4759fede (diff) | |
download | gitea-f9454cc32c94780eb4c49753fc0ccd9b60b1deb7.tar.gz gitea-f9454cc32c94780eb4c49753fc0ccd9b60b1deb7.zip |
Make sure that a mirror can't be written to by http or ssh
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/serve.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/serve.go b/cmd/serve.go index e8e5c186c7..9e34b95c5a 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -164,6 +164,11 @@ func runServ(c *cli.Context) { println("You have no right to write this repository") log.GitLogger.Fatal(2, "User %s has no right to write repository %s", user.Name, repoPath) } + + if repo.IsMirror { + println("You can't write to a mirror repository") + log.GitLogger.Fatal(2, "User %s tried to write to a mirror repository %s", user.Name, repoPath) + } case isRead: if !repo.IsPrivate { break |