1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-01 17:38:33 +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

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