diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /app/helpers/web_ide_button_helper.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'app/helpers/web_ide_button_helper.rb')
-rw-r--r-- | app/helpers/web_ide_button_helper.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/helpers/web_ide_button_helper.rb b/app/helpers/web_ide_button_helper.rb index 0a4d47eed52..7aa0adc31bd 100644 --- a/app/helpers/web_ide_button_helper.rb +++ b/app/helpers/web_ide_button_helper.rb @@ -21,8 +21,8 @@ module WebIdeButtonHelper can_collaborate? || can_create_mr_from_fork? end - def show_edit_button? - readable_blob? && show_web_ide_button? + def show_edit_button?(options = {}) + readable_blob?(options) && show_web_ide_button? end def show_gitpod_button? @@ -37,8 +37,8 @@ module WebIdeButtonHelper !project_fork.nil? && !can_push_code? end - def readable_blob? - !readable_blob({}, @path, @project, @ref).nil? + def readable_blob?(options = {}) + !readable_blob(options, @path, @project, @ref).nil? end def needs_to_fork? @@ -49,8 +49,8 @@ module WebIdeButtonHelper ide_edit_path(project_to_use, @ref, @path || '') end - def edit_url - readable_blob? ? edit_blob_path(@project, @ref, @path || '') : '' + def edit_url(options = {}) + readable_blob?(options) ? edit_blob_path(@project, @ref, @path || '') : '' end def gitpod_url |