summaryrefslogtreecommitdiff
path: root/app/helpers/jira_connect_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/jira_connect_helper.rb')
-rw-r--r--app/helpers/jira_connect_helper.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/helpers/jira_connect_helper.rb b/app/helpers/jira_connect_helper.rb
index f1527b9b85a..080883fd594 100644
--- a/app/helpers/jira_connect_helper.rb
+++ b/app/helpers/jira_connect_helper.rb
@@ -5,9 +5,15 @@ module JiraConnectHelper
Feature.enabled?(:new_jira_connect_ui, type: :development, default_enabled: :yaml)
end
- def jira_connect_app_data
+ def jira_connect_app_data(subscriptions)
+ return {} unless new_jira_connect_ui?
+
+ skip_groups = subscriptions.map(&:namespace_id)
+
{
- groups_path: api_v4_groups_path(params: { min_access_level: Gitlab::Access::MAINTAINER })
+ groups_path: api_v4_groups_path(params: { min_access_level: Gitlab::Access::MAINTAINER, skip_groups: skip_groups }),
+ subscriptions_path: jira_connect_subscriptions_path,
+ users_path: current_user ? nil : jira_connect_users_path
}
end
end