forked from kevadesu/forgejo
Feature: Archive repos (#5009)
This commit is contained in:
parent
6ad834e236
commit
0b510725c9
30 changed files with 437 additions and 244 deletions
|
@ -95,6 +95,12 @@ func HTTP(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
// Don't allow pushing if the repo is archived
|
||||
if repo.IsArchived && !isPull {
|
||||
ctx.HandleText(http.StatusForbidden, "This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.")
|
||||
return
|
||||
}
|
||||
|
||||
// Only public pull don't need auth.
|
||||
isPublicPull := !repo.IsPrivate && isPull
|
||||
var (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue