summaryrefslogtreecommitdiff
path: root/app/helpers/tree_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/tree_helper.rb')
-rw-r--r--app/helpers/tree_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb
index 03a49e119b8..6afa1aacc5b 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -54,6 +54,10 @@ module TreeHelper
::Gitlab::GitAccess.new(current_user, project).can_push_to_branch?(ref)
end
+ def can_delete_or_replace?(blob)
+ allowed_tree_edit? && !blob.lfs_pointer?
+ end
+
def tree_breadcrumbs(tree, max_links = 2)
if @path.present?
part_path = ""