diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 16:49:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 16:49:51 +0300 |
commit | 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch) | |
tree | 6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /app/controllers/jira_connect | |
parent | a7253423e3403b8c08f8a161e5937e1488f5f407 (diff) |
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'app/controllers/jira_connect')
-rw-r--r-- | app/controllers/jira_connect/public_keys_controller.rb | 10 | ||||
-rw-r--r-- | app/controllers/jira_connect/subscriptions_controller.rb | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/app/controllers/jira_connect/public_keys_controller.rb b/app/controllers/jira_connect/public_keys_controller.rb index 09003f8478f..4505ab16926 100644 --- a/app/controllers/jira_connect/public_keys_controller.rb +++ b/app/controllers/jira_connect/public_keys_controller.rb @@ -10,9 +10,7 @@ module JiraConnect skip_before_action :authenticate_user! def show - if Feature.disabled?(:jira_connect_oauth_self_managed) || !Gitlab.config.jira_connect.enable_public_keys_storage - return render_404 - end + return render_404 unless public_key_storage_enabled? render plain: public_key.key end @@ -22,5 +20,11 @@ module JiraConnect def public_key JiraConnect::PublicKey.find(params[:id]) end + + def public_key_storage_enabled? + return true if Gitlab.config.jira_connect.enable_public_keys_storage + + Gitlab::CurrentSettings.jira_connect_public_key_storage_enabled? + end end end diff --git a/app/controllers/jira_connect/subscriptions_controller.rb b/app/controllers/jira_connect/subscriptions_controller.rb index ff7477a94d6..a206e7fbbd8 100644 --- a/app/controllers/jira_connect/subscriptions_controller.rb +++ b/app/controllers/jira_connect/subscriptions_controller.rb @@ -21,7 +21,6 @@ class JiraConnect::SubscriptionsController < JiraConnect::ApplicationController before_action do push_frontend_feature_flag(:jira_connect_oauth, @user) - push_frontend_feature_flag(:jira_connect_oauth_self_managed, @user) end before_action :allow_rendering_in_iframe, only: :index |