Feature: Archive repos (#5009)

This commit is contained in:
kolaente 2019-01-23 19:58:38 +01:00 committed by techknowlogick
parent 6ad834e236
commit 0b510725c9
30 changed files with 437 additions and 244 deletions

View file

@ -151,8 +151,8 @@ func renderDirectory(ctx *context.Context, treeLink string) {
// Check permission to add or upload new file.
if ctx.Repo.CanWrite(models.UnitTypeCode) && ctx.Repo.IsViewBranch {
ctx.Data["CanAddFile"] = true
ctx.Data["CanUploadFile"] = setting.Repository.Upload.Enabled
ctx.Data["CanAddFile"] = !ctx.Repo.Repository.IsArchived
ctx.Data["CanUploadFile"] = setting.Repository.Upload.Enabled && !ctx.Repo.Repository.IsArchived
}
}