Commit 7aeb7077 authored by Douwe Maan's avatar Douwe Maan

Only show Edit button for text blobs.

parent 82ddd738
...@@ -30,7 +30,7 @@ module BlobHelper ...@@ -30,7 +30,7 @@ module BlobHelper
nil nil
end end
return unless blob && blob_editable?(blob) return unless blob && blob.text? && blob_editable?(blob)
text = 'Edit' text = 'Edit'
after = options[:after] || '' after = options[:after] || ''
...@@ -47,7 +47,7 @@ module BlobHelper ...@@ -47,7 +47,7 @@ module BlobHelper
end end
def blob_editable?(blob, project = @project, ref = @ref) def blob_editable?(blob, project = @project, ref = @ref)
allowed_tree_edit?(project, ref) && !blob.lfs_pointer? !blob.lfs_pointer? && allowed_tree_edit?(project, ref)
end end
def leave_edit_message def leave_edit_message
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment