summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/issuable_actions.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 20:02:30 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 20:02:30 +0000
commit41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch)
tree9c8d89a8624828992f06d892cd2f43818ff5dcc8 /app/controllers/concerns/issuable_actions.rb
parent0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff)
downloadgitlab-ce-41fe97390ceddf945f3d967b8fdb3de4c66b7dea.tar.gz
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'app/controllers/concerns/issuable_actions.rb')
-rw-r--r--app/controllers/concerns/issuable_actions.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/app/controllers/concerns/issuable_actions.rb b/app/controllers/concerns/issuable_actions.rb
index eae087bca4d..ae90bd59d01 100644
--- a/app/controllers/concerns/issuable_actions.rb
+++ b/app/controllers/concerns/issuable_actions.rb
@@ -17,10 +17,6 @@ module IssuableActions
def show
respond_to do |format|
format.html do
- @show_crm_contacts = issuable.is_a?(Issue) && # rubocop:disable Gitlab/ModuleWithInstanceVariables
- can?(current_user, :read_crm_contact, issuable.project.group) &&
- CustomerRelations::Contact.exists_for_group?(issuable.project.group)
-
@issuable_sidebar = serializer.represent(issuable, serializer: 'sidebar') # rubocop:disable Gitlab/ModuleWithInstanceVariables
render 'show'
end
@@ -43,18 +39,18 @@ module IssuableActions
if updated_issuable.is_a?(Spammable)
respond_to do |format|
format.html do
- # NOTE: This redirect is intentionally only performed in the case where the updated
- # issuable is a spammable, and intentionally is not performed in the non-spammable case.
- # This preserves the legacy behavior of this action.
if updated_issuable.valid?
+ # NOTE: This redirect is intentionally only performed in the case where the valid updated
+ # issuable is a spammable, and intentionally is not performed below in the
+ # valid non-spammable case. This preserves the legacy behavior of this action.
redirect_to spammable_path
else
- with_captcha_check_html_format { render :edit }
+ with_captcha_check_html_format(spammable: spammable) { render :edit }
end
end
format.json do
- with_captcha_check_json_format { render_entity_json }
+ with_captcha_check_json_format(spammable: spammable) { render_entity_json }
end
end
else