diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/controllers/groups | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'app/controllers/groups')
5 files changed, 11 insertions, 9 deletions
diff --git a/app/controllers/groups/autocomplete_sources_controller.rb b/app/controllers/groups/autocomplete_sources_controller.rb index 171494e66bd..6936733c4f7 100644 --- a/app/controllers/groups/autocomplete_sources_controller.rb +++ b/app/controllers/groups/autocomplete_sources_controller.rb @@ -3,7 +3,7 @@ class Groups::AutocompleteSourcesController < Groups::ApplicationController feature_category :subgroups, [:members] feature_category :team_planning, [:issues, :labels, :milestones, :commands] - feature_category :code_review, [:merge_requests] + feature_category :code_review_workflow, [:merge_requests] urgency :low, [:issues, :labels, :milestones, :commands, :merge_requests, :members] diff --git a/app/controllers/groups/imports_controller.rb b/app/controllers/groups/imports_controller.rb index a35237a706d..569e26b3de9 100644 --- a/app/controllers/groups/imports_controller.rb +++ b/app/controllers/groups/imports_controller.rb @@ -14,7 +14,8 @@ class Groups::ImportsController < Groups::ApplicationController redirect_to group_path(@group), notice: s_('GroupImport|The group was successfully imported.') end elsif @group.import_state.failed? - redirect_to new_group_path(@group), alert: s_('GroupImport|Failed to import group.') + redirect_to new_group_path(@group), + alert: format(s_('GroupImport|Failed to import group: %{error}'), error: @group.import_state.last_error) else flash.now[:notice] = continue_params[:notice_now] end diff --git a/app/controllers/groups/observability_controller.rb b/app/controllers/groups/observability_controller.rb index 3baa5e830ff..726af00a10e 100644 --- a/app/controllers/groups/observability_controller.rb +++ b/app/controllers/groups/observability_controller.rb @@ -19,6 +19,10 @@ module Groups render_observability end + def datasources + render_observability + end + private def render_observability @@ -26,9 +30,7 @@ module Groups end def check_observability_allowed - return render_404 unless Gitlab::Observability.observability_url.present? - - render_404 unless can?(current_user, :read_observability, @group) + render_404 unless Gitlab::Observability.observability_enabled?(current_user, group) end end end diff --git a/app/controllers/groups/settings/ci_cd_controller.rb b/app/controllers/groups/settings/ci_cd_controller.rb index 1dfa8cdf133..78e3ffa4af9 100644 --- a/app/controllers/groups/settings/ci_cd_controller.rb +++ b/app/controllers/groups/settings/ci_cd_controller.rb @@ -23,7 +23,7 @@ module Groups if update_group_service.execute flash[:notice] = s_('GroupSettings|Pipeline settings was updated for the group') else - flash[:alert] = s_("GroupSettings|There was a problem updating the pipeline settings: %{error_messages}." % { error_messages: group.errors.full_messages }) + flash[:alert] = format(s_("GroupSettings|There was a problem updating the pipeline settings: %{error_messages}."), error_messages: group.errors.full_messages) end redirect_to group_settings_ci_cd_path @@ -33,7 +33,7 @@ module Groups if auto_devops_service.execute flash[:notice] = s_('GroupSettings|Auto DevOps pipeline was updated for the group') else - flash[:alert] = s_("GroupSettings|There was a problem updating Auto DevOps pipeline: %{error_messages}." % { error_messages: group.errors.full_messages }) + flash[:alert] = format(s_("GroupSettings|There was a problem updating Auto DevOps pipeline: %{error_messages}."), error_messages: group.errors.full_messages) end redirect_to group_settings_ci_cd_path diff --git a/app/controllers/groups/usage_quotas_controller.rb b/app/controllers/groups/usage_quotas_controller.rb index 29878f0001d..b660eb3af99 100644 --- a/app/controllers/groups/usage_quotas_controller.rb +++ b/app/controllers/groups/usage_quotas_controller.rb @@ -16,8 +16,7 @@ module Groups private def verify_usage_quotas_enabled! - render_404 unless Feature.enabled?(:usage_quotas_for_all_editions, group) - render_404 if group.has_parent? + render_404 unless group.usage_quotas_enabled? end # To be overriden in ee/app/controllers/ee/groups/usage_quotas_controller.rb |