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

This commit is contained in:
Peter Smit committed 2015-02-16 12:00:06 +02:00
1 parent cd6a2b78a7
commit f9454cc32c
2 files changed
+10

No files matched your search

+5
View File
@@ -158,6 +158,11 @@ func Http(ctx *middleware.Context) {
return
}
}
if !isPull && repo.IsMirror {
ctx.Handle(401, "can't push to mirror", nil)
return
}
}
}