1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Make sure that a mirror can't be written to by http or ssh

This commit is contained in:
Peter Smit
2015-02-16 12:00:06 +02:00
parent cd6a2b78a7
commit f9454cc32c
2 changed files with 10 additions and 0 deletions

View File

@@ -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