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

Move file locking feature check to FileLock helper

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