diff --git a/app/controllers/jira_connect/branches_controller.rb b/app/controllers/jira_connect/branches_controller.rb index 6f57805d23cb2c397ac54aab596934aeb4e293ee..25dc5aadc29c0fd341271385153baa090cd4a3aa 100644 --- a/app/controllers/jira_connect/branches_controller.rb +++ b/app/controllers/jira_connect/branches_controller.rb @@ -1,20 +1,17 @@ # frozen_string_literal: true class JiraConnect::BranchesController < JiraConnect::ApplicationController - # before_action :authenticate_user!, only: :new + before_action :authenticate_user!, only: :new skip_before_action :verify_atlassian_jwt!, only: :new def new - # move authenticate_user! to a before_action when we remove the jira_connect_proxy_create_branch feature flag - authenticate_user! if Feature.enabled?(:jira_connect_proxy_create_branch, current_user) - @new_branch_data = new_branch_data end # If the GitLab for Jira Cloud app was installed from the Jira marketplace and points to a self-managed instance, # we route the user to the self-managed instance, otherwise we redirect to :new def route - if Feature.enabled?(:jira_connect_proxy_create_branch, current_user) && current_jira_installation.proxy? + if current_jira_installation.proxy? redirect_to "#{current_jira_installation.create_branch_url}?#{request.query_string}" return diff --git a/config/feature_flags/gitlab_com_derisk/jira_connect_proxy_create_branch.yml b/config/feature_flags/gitlab_com_derisk/jira_connect_proxy_create_branch.yml deleted file mode 100644 index 8742727f4e067766d4fad3a4eef8b70f62d9d5d4..0000000000000000000000000000000000000000 --- a/config/feature_flags/gitlab_com_derisk/jira_connect_proxy_create_branch.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: jira_connect_proxy_create_branch -feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/391432 -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/149377 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/466462 -milestone: '17.2' -group: group::import and integrate -type: gitlab_com_derisk -default_enabled: false diff --git a/spec/controllers/jira_connect/branches_controller_spec.rb b/spec/controllers/jira_connect/branches_controller_spec.rb index 117e1cd280282f34658da518393f2c5d73ce3fd4..d8b6bf1e19b730d91e3f60a48141ccb6ef378b46 100644 --- a/spec/controllers/jira_connect/branches_controller_spec.rb +++ b/spec/controllers/jira_connect/branches_controller_spec.rb @@ -89,17 +89,6 @@ expect(response).to redirect_to("#{create_branch_url}?#{query_string}") end end - - context 'when jira_connect_proxy_create_branch feature is disabled' do - before do - stub_feature_flags(jira_connect_proxy_create_branch: false) - end - - it 'redirects to :new' do - get :route, params: params - expect(response).to redirect_to("#{new_jira_connect_branch_url}?#{query_string}") - end - end end end end