diff --git a/templates/repo/view_content.tmpl b/templates/repo/view_content.tmpl index 5d9b3a94b4..8514566b3f 100644 --- a/templates/repo/view_content.tmpl +++ b/templates/repo/view_content.tmpl @@ -105,7 +105,7 @@ {{svg "octicon-file-zip"}}{{ctx.Locale.Tr "repo.download_directory_as" "ZIP"}} {{svg "octicon-file-zip"}}{{ctx.Locale.Tr "repo.download_directory_as" "TAR.GZ"}} {{end}} - {{if and (.Permission.CanWrite ctx.Consts.RepoUnitTypeCode) (not .Repository.IsArchived) (not $isTreePathRoot)}} + {{if and (.Repository.CanContentChange) (not $isTreePathRoot)}}
{{svg "octicon-trash" 16}}{{ctx.Locale.Tr "repo.editor.delete_this_directory"}}