summaryrefslogtreecommitdiff
path: root/app/controllers/jira_connect
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-09 09:22:41 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-09 09:22:41 +0000
commit65688a509249eb3be8ea4687d3fe6d1432a47392 (patch)
treedffc9c087dc2eda02e4656d5a0b16b5d7051e69f /app/controllers/jira_connect
parent4b8939db3d80469826a62f1409b921f96dac2498 (diff)
downloadgitlab-ce-65688a509249eb3be8ea4687d3fe6d1432a47392.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/jira_connect')
-rw-r--r--app/controllers/jira_connect/app_descriptor_controller.rb14
-rw-r--r--app/controllers/jira_connect/branches_controller.rb10
2 files changed, 5 insertions, 19 deletions
diff --git a/app/controllers/jira_connect/app_descriptor_controller.rb b/app/controllers/jira_connect/app_descriptor_controller.rb
index ec3327cc20e..a0f387631dd 100644
--- a/app/controllers/jira_connect/app_descriptor_controller.rb
+++ b/app/controllers/jira_connect/app_descriptor_controller.rb
@@ -65,17 +65,13 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController
# See https://developer.atlassian.com/cloud/jira/software/modules/development-tool/
def development_tool_module
- actions = {}
-
- if JiraConnect::BranchesController.feature_enabled?(current_user)
- actions[:createBranch] = {
- templateUrl: new_jira_connect_branch_url + '?issue_key={issue.key}&issue_summary={issue.summary}'
- }
- end
-
{
jiraDevelopmentTool: {
- actions: actions,
+ actions: {
+ createBranch: {
+ templateUrl: new_jira_connect_branch_url + '?issue_key={issue.key}&issue_summary={issue.summary}'
+ }
+ },
key: 'gitlab-development-tool',
application: { value: 'GitLab' },
name: { value: 'GitLab' },
diff --git a/app/controllers/jira_connect/branches_controller.rb b/app/controllers/jira_connect/branches_controller.rb
index 97d0b75639e..12ea6560e3a 100644
--- a/app/controllers/jira_connect/branches_controller.rb
+++ b/app/controllers/jira_connect/branches_controller.rb
@@ -3,18 +3,12 @@
# NOTE: This controller does not inherit from JiraConnect::ApplicationController
# because we don't receive a JWT for this action, so we rely on standard GitLab authentication.
class JiraConnect::BranchesController < ApplicationController
- before_action :feature_enabled!
-
feature_category :integrations
def new
@new_branch_data = new_branch_data
end
- def self.feature_enabled?(user)
- Feature.enabled?(:jira_connect_create_branch, user, default_enabled: :yaml)
- end
-
private
def initial_branch_name
@@ -32,8 +26,4 @@ class JiraConnect::BranchesController < ApplicationController
success_state_svg_path: ActionController::Base.helpers.image_path('illustrations/merge_requests.svg')
}
end
-
- def feature_enabled!
- render_404 unless self.class.feature_enabled?(current_user)
- end
end