Commit 83fa2e5e authored by Collen Kriel's avatar Collen Kriel

Move file locking feature check to FileLock helper

parent e9dee299
......@@ -11,7 +11,6 @@
= view_on_environment_button(@commit.sha, @path, @environment) if @environment
.btn-group{ role: "group" }<
- if @project.feature_available?(:file_locks)
= lock_file_link(html_options: { class: 'btn btn-sm path-lock' })
= edit_blob_button
......
module EE
module LockHelper
def lock_file_link(project = @project, path = @path, html_options: {})
return unless project.feature_available?(:file_locks)
return unless current_user
return if path.blank?
......
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