Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-20 21:14:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-20 21:14:18 +0300
commit39cb2fdf01699eb5ac000c918f469c58dc75f7e8 (patch)
tree5de21a06dfe8b97c793f892032be45949aa482db /lib/gitlab/quick_actions
parentc17eb7c97062d25cdf1b44573e4c0241f52aa2fe (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/quick_actions')
-rw-r--r--lib/gitlab/quick_actions/issue_actions.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/quick_actions/issue_actions.rb b/lib/gitlab/quick_actions/issue_actions.rb
index 5fd422db722..8334d57f2a5 100644
--- a/lib/gitlab/quick_actions/issue_actions.rb
+++ b/lib/gitlab/quick_actions/issue_actions.rb
@@ -290,7 +290,8 @@ module Gitlab
params 'contact@example.com person@example.org'
types Issue
condition do
- current_user.can?(:set_issue_crm_contacts, quick_action_target)
+ current_user.can?(:set_issue_crm_contacts, quick_action_target) &&
+ CustomerRelations::Contact.exists_for_group?(quick_action_target.project.group)
end
execution_message do
_('One or more contacts were successfully added.')
@@ -304,7 +305,8 @@ module Gitlab
params 'contact@example.com person@example.org'
types Issue
condition do
- current_user.can?(:set_issue_crm_contacts, quick_action_target)
+ current_user.can?(:set_issue_crm_contacts, quick_action_target) &&
+ CustomerRelations::Contact.exists_for_group?(quick_action_target.project.group)
end
execution_message do
_('One or more contacts were successfully removed.')