diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /app/controllers/groups | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'app/controllers/groups')
8 files changed, 28 insertions, 26 deletions
diff --git a/app/controllers/groups/boards_controller.rb b/app/controllers/groups/boards_controller.rb index 14b70df0feb..e1ba86220c7 100644 --- a/app/controllers/groups/boards_controller.rb +++ b/app/controllers/groups/boards_controller.rb @@ -7,7 +7,7 @@ class Groups::BoardsController < Groups::ApplicationController before_action do push_frontend_feature_flag(:board_multi_select, group) - push_frontend_feature_flag(:realtime_labels, group) + push_frontend_feature_flag(:apollo_boards, group) experiment(:prominent_create_board_btn, subject: current_user) do |e| e.control {} e.candidate {} diff --git a/app/controllers/groups/dependency_proxy/application_controller.rb b/app/controllers/groups/dependency_proxy/application_controller.rb index f7337a3cdb1..300a82eed78 100644 --- a/app/controllers/groups/dependency_proxy/application_controller.rb +++ b/app/controllers/groups/dependency_proxy/application_controller.rb @@ -21,10 +21,11 @@ module Groups user_or_deploy_token = ::DependencyProxy::AuthTokenService.user_or_deploy_token_from_jwt(token) - if user_or_deploy_token.is_a?(User) + case user_or_deploy_token + when User @authentication_result = Gitlab::Auth::Result.new(user_or_deploy_token, nil, :user, []) sign_in(user_or_deploy_token) - elsif user_or_deploy_token.is_a?(DeployToken) + when DeployToken @authentication_result = Gitlab::Auth::Result.new(user_or_deploy_token, nil, :deploy_token, []) end end diff --git a/app/controllers/groups/observability_controller.rb b/app/controllers/groups/observability_controller.rb index 5b6503494c4..4b1f2b582ce 100644 --- a/app/controllers/groups/observability_controller.rb +++ b/app/controllers/groups/observability_controller.rb @@ -9,35 +9,41 @@ module Groups default_frame_src = p.directives['frame-src'] || p.directives['default-src'] # When ObservabilityUI is not authenticated, it needs to be able to redirect to the GL sign-in page, hence 'self' - frame_src_values = Array.wrap(default_frame_src) | [ObservabilityController.observability_url, "'self'"] + frame_src_values = Array.wrap(default_frame_src) | [observability_url, "'self'"] p.frame_src(*frame_src_values) end - before_action :check_observability_allowed, only: :index + before_action :check_observability_allowed - def index - # Format: https://observe.gitlab.com/-/GROUP_ID - @observability_iframe_src = "#{ObservabilityController.observability_url}/-/#{@group.id}" + def dashboards + render_observability + end - # Uncomment below for testing with local GDK - # @observability_iframe_src = "#{ObservabilityController.observability_url}/9970?groupId=14485840" + def manage + render_observability + end - render layout: 'group', locals: { base_layout: 'layouts/fullscreen' } + def explore + render_observability end private + def render_observability + render 'observability', layout: 'group', locals: { base_layout: 'layouts/fullscreen' } + end + def self.observability_url - return ENV['OVERRIDE_OBSERVABILITY_URL'] if ENV['OVERRIDE_OBSERVABILITY_URL'] - # TODO Make observability URL configurable https://gitlab.com/gitlab-org/opstrace/opstrace-ui/-/issues/80 - return "https://staging.observe.gitlab.com" if Gitlab.staging? + Gitlab::Observability.observability_url + end - "https://observe.gitlab.com" + def observability_url + self.class.observability_url end def check_observability_allowed - return render_404 unless self.class.observability_url.present? + return render_404 unless observability_url.present? render_404 unless can?(current_user, :read_observability, @group) end diff --git a/app/controllers/groups/registry/repositories_controller.rb b/app/controllers/groups/registry/repositories_controller.rb index bb2d08e487a..cb7bf001918 100644 --- a/app/controllers/groups/registry/repositories_controller.rb +++ b/app/controllers/groups/registry/repositories_controller.rb @@ -8,10 +8,6 @@ module Groups before_action :verify_container_registry_enabled! before_action :authorize_read_container_image! - before_action do - push_frontend_feature_flag(:container_registry_show_shortened_path, group) - end - feature_category :container_registry urgency :low diff --git a/app/controllers/groups/settings/access_tokens_controller.rb b/app/controllers/groups/settings/access_tokens_controller.rb index f01b2b779e3..d86ddcfe2d0 100644 --- a/app/controllers/groups/settings/access_tokens_controller.rb +++ b/app/controllers/groups/settings/access_tokens_controller.rb @@ -3,6 +3,7 @@ module Groups module Settings class AccessTokensController < Groups::ApplicationController + include RenderAccessTokens include AccessTokensActions layout 'group_settings' diff --git a/app/controllers/groups/settings/ci_cd_controller.rb b/app/controllers/groups/settings/ci_cd_controller.rb index e164a834519..b1afac1f1c7 100644 --- a/app/controllers/groups/settings/ci_cd_controller.rb +++ b/app/controllers/groups/settings/ci_cd_controller.rb @@ -10,9 +10,6 @@ module Groups before_action :define_variables, only: [:show] before_action :push_licensed_features, only: [:show] before_action :assign_variables_to_gon, only: [:show] - before_action do - push_frontend_feature_flag(:ci_variable_settings_graphql, @group) - end feature_category :continuous_integration urgency :low diff --git a/app/controllers/groups/settings/packages_and_registries_controller.rb b/app/controllers/groups/settings/packages_and_registries_controller.rb index 411b8577c3f..ec4a0b312ee 100644 --- a/app/controllers/groups/settings/packages_and_registries_controller.rb +++ b/app/controllers/groups/settings/packages_and_registries_controller.rb @@ -7,6 +7,10 @@ module Groups before_action :authorize_admin_group! before_action :verify_packages_enabled! + before_action do + push_frontend_feature_flag(:maven_central_request_forwarding, group) + end + feature_category :package_registry urgency :low diff --git a/app/controllers/groups/settings/repository_controller.rb b/app/controllers/groups/settings/repository_controller.rb index cb62ea2a543..ecd5d814fb6 100644 --- a/app/controllers/groups/settings/repository_controller.rb +++ b/app/controllers/groups/settings/repository_controller.rb @@ -8,9 +8,6 @@ module Groups before_action :authorize_create_deploy_token!, only: :create_deploy_token before_action :authorize_access!, only: :show before_action :define_deploy_token_variables, if: -> { can?(current_user, :create_deploy_token, @group) } - before_action do - push_frontend_feature_flag(:ajax_new_deploy_token, @group) - end feature_category :continuous_delivery urgency :low |