Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2023-05-18 09:10:09 +00:00
parent 55e0080f9d
commit 21d0f7ad2d
56 changed files with 149 additions and 131 deletions

View File

@ -27,6 +27,7 @@
RUN_WITH_BUNDLE: "true" # instructs pipeline to install and run gitlab-qa gem via bundler
QA_PATH: qa # sets the optional path for bundler to run from
DYNAMIC_PIPELINE_YML: package-and-test-pipeline.yml # yml files are generated by scripts/generate-e2e-pipeline script
EXTRA_GITLAB_QA_OPTS: --set-feature-flags super_sidebar_nav_enrolled=enabled
inherit:
variables:
- CHROME_VERSION
@ -117,17 +118,17 @@ e2e:package-and-test-ce:
ALLURE_JOB_NAME: e2e-package-and-test-ce
PIPELINE_NAME: E2E Omnibus GitLab CE
e2e:package-and-test-super-sidebar:
e2e:package-and-test-old-nav:
extends:
- e2e:package-and-test-ee
- .qa:rules:package-and-test-sidebar
when: manual
- .e2e-trigger-base
- .qa:rules:package-and-test-old-nav
variables:
QA_SUPER_SIDEBAR_ENABLED: "true"
EXTRA_GITLAB_QA_OPTS: --set-feature-flags super_sidebar_nav=enabled
QA_RUN_TYPE: e2e-package-and-test-super-sidebar
ALLURE_JOB_NAME: e2e-package-and-test-super-sidebar
PIPELINE_NAME: E2E Omnibus Super Sidebar
RELEASE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/build/omnibus-gitlab-mirror/gitlab-ee:${CI_COMMIT_SHA}"
QA_RUN_TYPE: e2e-package-and-test-old-nav
ALLURE_JOB_NAME: e2e-package-and-test-old-nav
PIPELINE_NAME: E2E Omnibus Old Navigation
QA_SUPER_SIDEBAR_ENABLED: "false"
EXTRA_GITLAB_QA_OPTS: ""
e2e:package-and-test-nightly:
extends:

View File

@ -1385,7 +1385,7 @@
- <<: *if-force-ci
allow_failure: true
.qa:rules:package-and-test-common:
.qa:rules:package-and-test-never-run:
rules:
- <<: *if-not-canonical-namespace
when: never
@ -1393,6 +1393,10 @@
when: never
- <<: *if-merge-request-labels-pipeline-expedite
when: never
.qa:rules:package-and-test-common:
rules:
- !reference [.qa:rules:package-and-test-never-run, rules]
- <<: *if-merge-request-targeting-stable-branch
allow_failure: true
- <<: *if-ruby2-branch
@ -1459,12 +1463,7 @@
.qa:rules:package-and-test-ce:
rules:
- <<: *if-not-canonical-namespace
when: never
- <<: *if-not-ee
when: never
- <<: *if-merge-request-labels-pipeline-expedite
when: never
- !reference [.qa:rules:package-and-test-never-run, rules]
- <<: *if-dot-com-gitlab-org-and-security-merge-request
changes: *ci-build-images-patterns
when: manual
@ -1487,14 +1486,9 @@
- !reference [".qa:rules:package-and-test-common", rules]
- !reference [".qa:rules:package-and-test-schedule", rules]
.qa:rules:package-and-test-sidebar:
.qa:rules:package-and-test-old-nav:
rules:
- <<: *if-not-canonical-namespace
when: never
- <<: *if-not-ee
when: never
- <<: *if-merge-request-labels-pipeline-expedite
when: never
- !reference [.qa:rules:package-and-test-never-run, rules]
- <<: *if-merge-request
changes: *code-patterns
when: manual

View File

@ -168,6 +168,7 @@ export default {
category="tertiary"
data-method="delete"
data-testid="stop-impersonation-btn"
data-qa-selector="stop_impersonation_link"
/>
</div>
<div class="gl-display-flex gl-justify-content-space-between gl-px-3 gl-py-2 gl-gap-2">

View File

@ -167,7 +167,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
accept_pending_invitations(user: user) if new_user
persist_accepted_terms_if_required(user) if new_user
store_after_sign_up_path_for_user if intent_to_register?
perform_registration_tasks(user, oauth['provider']) if intent_to_register?
sign_in_and_redirect_or_verify_identity(user, auth_user, new_user)
end
else
@ -295,8 +295,12 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
Users::RespondToTermsService.new(user, terms).execute(accepted: true)
end
def store_after_sign_up_path_for_user
store_location_for(:user, users_sign_up_welcome_path)
def perform_registration_tasks(_user, _provider)
store_location_for(:user, after_sign_up_path)
end
def after_sign_up_path
users_sign_up_welcome_path
end
# overridden in EE

View File

@ -14,6 +14,10 @@ module RegistrationsHelper
def signup_box_template
'devise/shared/signup_box'
end
def register_omniauth_params(_local_assigns)
{ intent: :register }
end
end
RegistrationsHelper.prepend_mod_with('RegistrationsHelper')

View File

@ -7,6 +7,9 @@
= render "layouts/bizible"
= render "layouts/google_tag_manager_body"
- content_for :omniauth_providers_bottom do
= render 'devise/shared/signup_omniauth_providers'
.signup-page
= render signup_box_template,
url: registration_path(resource_name, registration_path_params),

View File

@ -1,11 +1,9 @@
- max_first_name_length = max_last_name_length = 127
- omniauth_providers_placement ||= :bottom
- borderless ||= false
- form_resource_name = "new_#{resource_name}"
.gl-mb-3.gl-p-4{ class: (borderless ? '' : 'gl-border-gray-100 gl-border-1 gl-border-solid gl-rounded-base') }
- if show_omniauth_providers && omniauth_providers_placement == :top
= render 'devise/shared/signup_omniauth_providers_top'
= yield :omniauth_providers_top if show_omniauth_providers
= gitlab_ui_form_for(resource, as: form_resource_name, url: url, html: { class: 'new_user gl-show-field-errors js-arkose-labs-form', 'aria-live' => 'assertive' }, data: { testid: 'signup-form' }) do |f|
.devise-errors
@ -77,5 +75,4 @@
.gl-pt-5
= markdown_field(Gitlab::CurrentSettings.current_application_settings, :sign_in_text)
= render 'devise/shared/terms_of_service_notice', button_text: button_text
- if show_omniauth_providers && omniauth_providers_placement == :bottom
= render 'devise/shared/signup_omniauth_providers'
= yield :omniauth_providers_bottom if show_omniauth_providers

View File

@ -1,11 +1,10 @@
- register_omniauth_params = { intent: :register }
- if Feature.enabled?(:restyle_login_page, @project)
.gl-text-center.gl-pt-5
%label.gl-font-weight-normal
= _("Register with:")
.gl-text-center.gl-ml-auto.gl-mr-auto
- providers.each do |provider|
= link_to omniauth_authorize_path(:user, provider, register_omniauth_params), method: :post, class: "btn gl-button btn-default gl-w-full gl-mb-4 js-oauth-login #{qa_selector_for_provider(provider)}", data: { provider: provider }, id: "oauth-login-#{provider}" do
= link_to omniauth_authorize_path(:user, provider, register_omniauth_params(local_assigns)), method: :post, class: "btn gl-button btn-default gl-w-full gl-mb-4 js-oauth-login #{qa_selector_for_provider(provider)}", data: { provider: provider }, id: "oauth-login-#{provider}" do
- if provider_has_icon?(provider)
= provider_image_tag(provider)
%span.gl-button-text
@ -15,7 +14,7 @@
= _("Create an account using:")
.gl-display-flex.gl-justify-content-between.gl-flex-wrap
- providers.each do |provider|
= link_to omniauth_authorize_path(:user, provider, register_omniauth_params), method: :post, class: "btn gl-button btn-default gl-w-full gl-mb-4 js-oauth-login #{qa_selector_for_provider(provider)}", data: { provider: provider }, id: "oauth-login-#{provider}" do
= link_to omniauth_authorize_path(:user, provider, register_omniauth_params(local_assigns)), method: :post, class: "btn gl-button btn-default gl-w-full gl-mb-4 js-oauth-login #{qa_selector_for_provider(provider)}", data: { provider: provider }, id: "oauth-login-#{provider}" do
- if provider_has_icon?(provider)
= provider_image_tag(provider)
%span.gl-button-text

View File

@ -1,3 +0,0 @@
= render 'devise/shared/signup_omniauth_provider_list', providers: popular_enabled_button_based_providers
.omniauth-divider.gl-display-flex.gl-align-items-center
= _("or")

View File

@ -1,3 +1,3 @@
= render Pajamas::AlertComponent.new(variant: :info, dismissible: true) do |c|
= c.body do
- c.with_body do
= body

View File

@ -6,7 +6,7 @@
svg_path: 'illustrations/autodevops.svg',
banner_options: { class: 'js-autodevops-banner auto-devops-callout', data: { uid: 'auto_devops_settings_dismissed', project_path: project_path(@project) } },
close_options: { 'aria-label' => s_('AutoDevOps|Dismiss Auto DevOps box'), class: 'js-close-callout' }) do |c|
- c.title do
- c.with_title do
= s_('AutoDevOps|Auto DevOps')
%p= s_('AutoDevOps|It will automatically build, test, and deploy your application based on a predefined CI/CD configuration.')

View File

@ -2,11 +2,11 @@
= render Pajamas::AlertComponent.new(alert_options: { class: 'auto-devops-implicitly-enabled-banner', data: { qa_selector: 'auto_devops_banner_content' } },
close_button_options: { class: 'hide-auto-devops-implicitly-enabled-banner',
data: { project_id: project.id }}) do |c|
= c.body do
- c.with_body do
= s_("AutoDevOps|The Auto DevOps pipeline has been enabled and will be used if no alternative CI configuration file is found.")
- unless Gitlab.config.registry.enabled
%div
= _('Container registry is not enabled on this GitLab instance. Ask an administrator to enable it in order for Auto DevOps to work.')
= c.actions do
- c.with_actions do
= link_to _('Settings'), project_settings_ci_cd_path(project), class: 'alert-link btn gl-button btn-confirm'
= link_to _('More information'), help_page_path('topics/autodevops/index.md'), target: '_blank', class: 'alert-link btn gl-button btn-default gl-ml-3'

View File

@ -1,9 +1,9 @@
- return unless custom_attributes.present?
= render Pajamas::CardComponent.new(body_options: { class: 'gl-py-0' }) do |c|
- c.header do
- c.with_header do
= link_to(_('Custom Attributes'), help_page_path('api/custom_attributes.md'))
- c.body do
- c.with_body do
%ul.content-list
- custom_attributes.each do |custom_attribute|
%li

View File

@ -25,7 +25,7 @@
alert_options: { class: 'gl-mt-3 js-import-url-error hide' },
dismissible: false,
close_button_options: { class: 'js-close-2fa-enabled-success-alert' }) do |c|
= c.body do
- c.with_body do
= s_('Import|There is not a valid Git repository at this URL. If your HTTP repository is not publicly accessible, verify your credentials.')
= render_if_exists 'shared/ee/import_form', f: f, ci_cd_only: ci_cd_only
.row

View File

@ -1,6 +1,6 @@
= render Pajamas::AlertComponent.new(variant: :danger,
dismissible: false,
alert_options: { class: 'gl-mb-5' }) do |c|
= c.body do
- c.with_body do
- link_to_model = link_to(model_name, link_path, target: '_blank', rel: 'noopener noreferrer')
= _("Someone edited this %{model_name} at the same time you did. Please check out the %{link_to_model} and make sure your changes will not unintentionally remove theirs.").html_safe % { model_name: model_name, link_to_model: link_to_model }

View File

@ -2,8 +2,8 @@
= render Pajamas::AlertComponent.new(variant: :warning,
alert_options: { class: 'js-no-password-message' },
close_button_options: { class: 'js-hide-no-password-message' }) do |c|
= c.body do
- c.with_body do
= no_password_message
= c.actions do
- c.with_actions do
= link_to _('Remind later'), '#', class: 'js-hide-no-password-message gl-alert-action btn btn-confirm btn-md gl-button'
= link_to _("Don't show again"), profile_path(user: { hide_no_password: true }), method: :put, role: 'button', class: 'gl-alert-action btn btn-default btn-md gl-button'

View File

@ -2,8 +2,8 @@
= render Pajamas::AlertComponent.new(variant: :warning,
alert_options: { class: 'js-no-ssh-message' },
close_button_options: { class: 'js-hide-no-ssh-message'}) do |c|
= c.body do
- c.with_body do
= s_("MissingSSHKeyWarningLink|You can't push or pull repositories using SSH until you add an SSH key to your profile.")
= c.actions do
- c.with_actions do
= link_to s_('MissingSSHKeyWarningLink|Add SSH key'), profile_keys_path, class: "gl-alert-action btn btn-confirm btn-md gl-button"
= link_to s_("MissingSSHKeyWarningLink|Don't show again"), profile_path(user: { hide_no_ssh_key: true }), method: :put, role: 'button', class: 'gl-alert-action btn btn-default btn-md gl-button'

View File

@ -1,6 +1,6 @@
- if outdated_browser?
= render Pajamas::AlertComponent.new(variant: :danger, dismissible: false) do |c|
= c.body do
- c.with_body do
= s_('OutdatedBrowser|GitLab may not work properly, because you are using an outdated web browser.')
%br
- browser_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('install/requirements', anchor: 'supported-web-browsers') }

View File

@ -2,8 +2,8 @@
= render Pajamas::AlertComponent.new(variant: :warning,
dismissible: false,
alert_options: { class: 'project-limit-message' }) do |c|
= c.body do
- c.with_body do
= _("You won't be able to create new projects because you have reached your project limit.")
= c.actions do
- c.with_actions do
= link_to _('Remind later'), '#', class: 'alert-link hide-project-limit-message btn gl-button btn-confirm'
= link_to _("Don't show again"), profile_path(user: {hide_project_limit: true}), method: :put, class: 'alert-link btn gl-button btn-default gl-ml-3'

View File

@ -1,10 +1,10 @@
- if session[:ask_for_usage_stats_consent]
= render Pajamas::AlertComponent.new(alert_options: { class: 'service-ping-consent-message' }) do |c|
= c.body do
- c.with_body do
- docs_link = link_to _('collect usage information'), help_page_path('user/admin_area/settings/usage_statistics.md'), class: 'gl-link'
- settings_link = link_to _('your settings'), metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), class: 'gl-link'
= s_('To help improve GitLab, we would like to periodically %{docs_link}. This can be changed at any time in %{settings_link}.').html_safe % { docs_link: docs_link, settings_link: settings_link }
= c.actions do
- c.with_actions do
- send_service_data_path = admin_application_settings_path(application_setting: { version_check_enabled: 1, usage_ping_enabled: 1 })
- not_now_path = admin_application_settings_path(application_setting: { version_check_enabled: 0, usage_ping_enabled: 0 })
= link_to _("Send service data"), send_service_data_path, 'data-url' => admin_application_settings_path, method: :put, 'data-check-enabled': true, 'data-service-ping-enabled': true, class: 'js-service-ping-consent-action alert-link btn gl-button btn-confirm'

View File

@ -4,9 +4,9 @@
dismiss_endpoint: callouts_path,
defer_links: 'true' }},
close_button_options: { data: { testid: 'close-account-recovery-regular-check-callout' }}) do |c|
= c.body do
- c.with_body do
= s_('Profiles|Ensure you have two-factor authentication recovery codes stored in a safe place.')
= link_to _('Learn more.'), help_page_path('user/profile/account/two_factor_authentication', anchor: 'recovery-codes'), target: '_blank', rel: 'noopener noreferrer'
= c.actions do
- c.with_actions do
= link_to profile_two_factor_auth_path, class: 'deferred-link btn gl-alert-action btn-confirm btn-md gl-button' do
= s_('Profiles|Manage two-factor authentication')

View File

@ -1,7 +1,7 @@
- if @group.admin_note&.note?
- text = @group.admin_note.note
= render Pajamas::CardComponent.new(card_options: { class: 'gl-border-blue-500 gl-mb-5' }, header_options: { class: 'gl-bg-blue-500 gl-text-white' }) do |c|
- c.header do
- c.with_header do
= s_('Admin|Admin notes')
- c.body do
- c.with_body do
%p= text

View File

@ -2,5 +2,5 @@
variant: :danger,
dismissible: false,
title: reason) do |c|
= c.body do
- c.with_body do
= s_('The git server, Gitaly, is not available at this time. Please contact your administrator.')

View File

@ -12,9 +12,9 @@
.col-lg-8.gl-mb-3
- if file_hooks.any?
= render Pajamas::CardComponent.new do |c|
- c.header do
- c.with_header do
= _('File Hooks (%{count})') % { count: file_hooks.count }
- c.body do
- c.with_body do
%ul.content-list
- file_hooks.each do |file|
%li
@ -22,5 +22,5 @@
= File.basename(file)
- else
= render Pajamas::CardComponent.new do |c|
- c.body do
- c.with_body do
.nothing-here-block= _('No file hooks found.')

View File

@ -13,7 +13,7 @@
= render Pajamas::AlertComponent.new(title: _('Internal error occurred while delivering this webhook.'),
variant: :danger,
dismissible: false) do |c|
= c.body do
- c.with_body do
= _('Error: %{error}') % { error: hook_log.internal_error_message }
%h4= _('Response')
@ -41,6 +41,3 @@
- hook_log.request_headers.each do |k, v|
<span class="gl-font-weight-bold">#{k}:</span> #{v}
%br

View File

@ -3,7 +3,7 @@
variant: :warning,
dismissible: false,
alert_options: { class: 'gl-mt-5', data: { testid: "slack-notifications-deprecation" } }) do |c|
= c.body do
- c.with_body do
- help_page_link = help_page_url('user/project/integrations/gitlab_slack_application')
- learn_more_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_link }
@ -13,7 +13,7 @@
variant: :warning,
dismissible: false,
alert_options: { class: 'gl-mt-5', data: { testid: "slack-notifications-deprecation" } }) do |c|
= c.body do
- c.with_body do
- help_page_link = help_page_url('user/project/integrations/gitlab_slack_application')
- learn_more_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_link }

View File

@ -7,12 +7,12 @@
.col-lg-9
= render Pajamas::CardComponent.new(header_options: { class: 'gl-display-flex gl-align-items-center' }, body_options: { class: 'gl-p-0' }, card_options: { class: 'gl-mb-5 custom-monitored-metrics js-panel-custom-monitored-metrics', data: { active_custom_metrics: project_prometheus_metrics_path(project), environments_data: environments_list_data, service_active: "#{integration.active}" } }) do |c|
- c.header do
- c.with_header do
%strong
= s_('PrometheusService|Custom metrics')
= gl_badge_tag 0, nil, class: 'gl-ml-2 js-custom-monitored-count'
= link_to s_('PrometheusService|New metric'), new_project_prometheus_metric_path(project), class: 'btn gl-button btn-confirm gl-ml-auto js-new-metric-button hidden'
- c.body do
- c.with_body do
.flash-container.hidden
.flash-warning
.flash-text

View File

@ -9,11 +9,11 @@
.col-lg-9
= render Pajamas::CardComponent.new(body_options: { class: 'gl-p-0' }, card_options: { class: 'gl-mb-5 js-panel-monitored-metrics', data: { active_metrics: active_common_project_prometheus_metrics_path(project, :json), metrics_help_path: help_page_path('user/project/integrations/prometheus_library/index') }}) do |c|
- c.header do
- c.with_header do
%strong
= s_('PrometheusService|Common metrics')
= gl_badge_tag 0, nil, class: 'js-monitored-count'
- c.body do
- c.with_body do
.loading-metrics.js-loading-metrics
%p.m-3
= gl_loading_icon(inline: true, css_class: 'metrics-load-spinner')
@ -24,12 +24,12 @@
%ul.list-unstyled.metrics-list.hidden.js-metrics-list
= render Pajamas::CardComponent.new(body_options: { class: 'hidden gl-p-0' }, card_options: { class: 'hidden js-panel-missing-env-vars' }) do |c|
- c.header do
- c.with_header do
= sprite_icon('chevron-lg-right', css_class: 'panel-toggle js-panel-toggle-right')
= sprite_icon('chevron-lg-down', css_class: 'panel-toggle js-panel-toggle-down hidden')
= s_('PrometheusService|Missing environment variable')
= gl_badge_tag 0, nil, class: 'js-env-var-count'
- c.body do
- c.with_body do
.flash-container
.flash-notice
.flash-text

View File

@ -13,7 +13,7 @@
- if @can_bulk_update
.check-all-holder.gl-display-none.gl-sm-display-block.hidden.gl-float-left.gl-mr-3.gl-line-height-36
= render Pajamas::CheckboxTagComponent.new(name: 'check-all-issues', value: nil) do |c|
= c.label do
- c.with_label do
%span.gl-sr-only
= _('Select all')
.issues-other-filters.filtered-search-wrapper.d-flex.flex-column.flex-md-row

View File

@ -42,7 +42,7 @@
- if source_level < target_level
= render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_options: { class: 'gl-mb-4' }) do |c|
= c.body do
- c.with_body do
= visibilityMismatchString
%br
= _('Review the target project before submitting to avoid exposing %{source} changes.') % { source: source_visibility }

View File

@ -12,7 +12,7 @@
.form-check.gl-pl-0
= hidden_field_tag 'merge_request[force_remove_source_branch]', '0', id: nil
= render Pajamas::CheckboxTagComponent.new(name: 'merge_request[force_remove_source_branch]', checked: issuable.force_remove_source_branch?, value: '1', checkbox_options: { class: 'js-form-update' }) do |c|
= c.label do
- c.with_label do
= _("Delete source branch when merge request is accepted.")
- if !project.squash_never?
@ -20,14 +20,14 @@
- if project.squash_always?
= hidden_field_tag 'merge_request[squash]', '1', id: nil
= render Pajamas::CheckboxTagComponent.new(name: 'merge_request[squash]', checked: project.squash_enabled_by_default?, value: '1', checkbox_options: { class: 'js-form-update', disabled: true }) do |c|
= c.label do
- c.with_label do
= _("Squash commits when merge request is accepted.")
= link_to sprite_icon('question-o'), help_page_path('user/project/merge_requests/squash_and_merge'), target: '_blank', rel: 'noopener noreferrer'
= c.help_text do
- c.with_help_text do
= _('Required in this project.')
- else
= hidden_field_tag 'merge_request[squash]', '0', id: nil
= render Pajamas::CheckboxTagComponent.new(name: 'merge_request[squash]', checked: issuable_squash_option?(issuable, project), value: '1', checkbox_options: { class: 'js-form-update' }) do |c|
= c.label do
- c.with_label do
= _("Squash commits when merge request is accepted.")
= link_to sprite_icon('question-o'), help_page_path('user/project/merge_requests/squash_and_merge'), target: '_blank', rel: 'noopener noreferrer'

View File

@ -8,7 +8,7 @@
- if issuable.respond_to?(:draft?)
.gl-pt-3
= render Pajamas::CheckboxTagComponent.new(name: 'mark_as_draft', checkbox_options: { class: 'js-toggle-draft' }) do |c|
= c.label do
- c.with_label do
= s_('MergeRequests|Mark as draft')
= c.help_text do
- c.with_help_text do
= s_('MergeRequests|Drafts cannot be merged until marked ready.')

View File

@ -6,12 +6,12 @@
- return if requesters.empty?
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5', data: { testid: 'access-requests' } }, body_options: { class: 'gl-p-0' }) do |c|
- c.header do
- c.with_header do
= _('Users requesting access to')
%strong= membership_source.name
= gl_badge_tag requesters.size
= render 'shared/members/manage_access_button', path: membership_source.is_a?(Project) ? project_project_members_path(@project, tab: 'access_requests') : group_group_members_path(@group, tab: 'access_requests')
- c.body do
- c.with_body do
%ul.content-list.members-list
= render partial: 'shared/members/member',
collection: requesters, as: :member,

View File

@ -2,7 +2,7 @@
- primary = local_assigns.fetch(:primary, false)
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }, body_options: { class: 'gl-py-0' }, header_options: { class: milestone_header_class(primary, issuables) }) do |c|
- c.header do
- c.with_header do
.gl-flex-grow-2
= title
.gl-ml-3.gl-flex-shrink-0.gl-font-weight-bold.gl-white-space-nowrap{ class: milestone_counter_class(primary) }
@ -11,7 +11,7 @@
= sprite_icon('issues', css_class: 'gl-vertical-align-text-bottom')
= number_with_delimiter(issuables.length)
= render_if_exists "shared/milestones/issuables_weight", issuables: issuables
= c.body do
- c.with_body do
- class_prefix = dom_class(issuables).pluralize
%ul{ class: "content-list milestone-#{class_prefix}-list", id: "#{class_prefix}-list-#{id}" }
= render partial: 'shared/milestones/issuable',

View File

@ -4,5 +4,5 @@
= render Pajamas::AlertComponent.new(variant: :success,
alert_options: { data: { testid: 'all-issues-closed-alert' }},
dismissible: false) do |c|
= c.body do
- c.with_body do
= yield

View File

@ -2,7 +2,7 @@
close_options: {'aria-label' => s_('Promotions|Dismiss Service Desk promotion'), class: 'js-close-callout'},
svg_path: 'illustrations/service_desk_callout.svg',
button_text: s_('Promotions|Configure Service Desk'), button_link: help_page_path('user/project/service_desk.html', anchor: 'configuring-service-desk')) do |c|
- c.title do
- c.with_title do
= _('Improve customer support with Service Desk')
%p
= _('Service Desk allows people to create issues in your GitLab instance without their own user account. It provides a unique email address for end users to create issues in a project. Replies can be sent either through the GitLab interface or by email. End users only see threads through email.')

View File

@ -4,13 +4,13 @@
= render Pajamas::AlertComponent.new(alert_options: alert_options,
title: s_('Runners|This runner is available to all projects and subgroups in a group.'),
dismissible: false) do |c|
= c.body do
- c.with_body do
= s_('Runners|Use Group runners when you want all projects in a group to have access to a set of runners.')
= link_to _('Learn more.'), help_page_path('ci/runners/runners_scope', anchor: 'group-runners'), target: '_blank', rel: 'noopener noreferrer'
- else
= render Pajamas::AlertComponent.new(alert_options: alert_options,
title: s_('Runners|This runner is associated with specific projects.'),
dismissible: false) do |c|
= c.body do
- c.with_body do
= s_('Runners|You can set up a project runner to be used by multiple projects but you cannot make this a shared or group runner.')
= link_to _('Learn more.'), help_page_path('ci/runners/runners_scope', anchor: 'project-runners'), target: '_blank', rel: 'noopener noreferrer'

View File

@ -4,7 +4,7 @@
.col-lg-3.col-md-4.col-sm-12
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' },
body_options: { class: 'gl-display-flex gl-align-items-center' }) do |c|
= c.body do
- c.with_body do
= link_to detail_page_link do
= render Pajamas::AvatarComponent.new(topic, size: 48, alt: '', class: 'gl-mr-3')
= link_to detail_page_link do

View File

@ -2,7 +2,7 @@
.col-lg-3.col-md-4.col-sm-12
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }) do |c|
= c.body do
- c.with_body do
= render Pajamas::AvatarComponent.new(user, size: 48, alt: "", class: 'gl-float-left gl-mr-3')
.user-info

View File

@ -8,12 +8,12 @@
root_namespace: hook.parent.root_namespace.path }
= render Pajamas::AlertComponent.new(title: s_('Webhooks|Webhook rate limit has been reached'),
variant: :danger) do |c|
= c.body do
- c.with_body do
= s_("Webhooks|Webhooks for %{root_namespace} are now disabled because they've been triggered more than %{limit} times per minute. They'll be automatically re-enabled in the next minute.").html_safe % placeholders
- elsif hook.permanently_disabled?
= render Pajamas::AlertComponent.new(title: s_('Webhooks|Webhook failed to connect'),
variant: :danger) do |c|
= c.body do
- c.with_body do
= s_('Webhooks|The webhook failed to connect, and is disabled. To re-enable it, check %{strong_start}Recent events%{strong_end} for error details, then test your settings below.').html_safe % { strong_start: strong_start, strong_end: strong_end }
- elsif hook.temporarily_disabled?
- help_path = help_page_path('user/project/integrations/webhooks', anchor: 'webhook-fails-or-multiple-webhook-requests-are-triggered')
@ -24,5 +24,5 @@
help_link_end: link_end }
= render Pajamas::AlertComponent.new(title: s_('Webhooks|Webhook fails to connect'),
variant: :warning) do |c|
= c.body do
- c.with_body do
= s_('Webhooks|The webhook %{help_link_start}failed to connect%{help_link_end}, and will retry in %{retry_time}. To re-enable it, check %{strong_start}Recent events%{strong_end} for error details, then test your settings below.').html_safe % placeholders

View File

@ -1,9 +1,9 @@
%hr
= render Pajamas::CardComponent.new(card_options: { id: 'webhooks-index' }, body_options: { class: 'gl-py-0'}) do |c|
- c.header do
- c.with_header do
= hook_class.underscore.humanize.titleize.pluralize
(#{hooks.size})
- c.body do
- c.with_body do
- if hooks.any?
%ul.content-list
- hooks.each do |hook|

View File

@ -5,9 +5,9 @@
title: s_('Webhooks|Webhook disabled'),
alert_options: { class: 'gl-my-4 js-web-hook-disabled-callout',
data: { feature_id: Users::CalloutsHelper::WEB_HOOK_DISABLED, dismiss_endpoint: project_callouts_path, project_id: @project.id, defer_links: 'true'} }) do |c|
= c.body do
- c.with_body do
= s_('Webhooks|A webhook in this project was automatically disabled after being retried multiple times.')
= succeed '.' do
= link_to _('Learn more'), help_page_path('user/project/integrations/webhooks', anchor: 'troubleshooting'), target: '_blank', rel: 'noopener noreferrer'
= c.actions do
- c.with_actions do
= link_to s_('Webhooks|Go to webhooks'), project_hooks_path(@project, anchor: 'webhooks-index'), class: 'btn gl-alert-action btn-confirm gl-button'

View File

@ -6,7 +6,7 @@
= render Pajamas::AlertComponent.new(alert_options: { id: 'error_explanation', class: 'gl-mb-3'},
dismissible: false,
variant: :danger) do |c|
= c.body do
- c.with_body do
%ul.gl-pl-4
= @error

View File

@ -17,6 +17,11 @@ Deleting a user deletes all projects in that user namespace.
## Delete your own account
> Delay between a user deleting their own account and deletion of the user record introduced in GitLab 16.0 [with a flag](../../../administration/feature_flags.md) named `delay_delete_own_user`. Enabled by default on GitLab.com.
FLAG:
On self-managed GitLab, by default this feature is not available. To make it available, ask an administrator to [enable the feature flag](../../../administration/feature_flags.md) named `delay_delete_own_user`. On GitLab.com, this feature is available.
As a user, to delete your own account:
1. On the top bar, in the upper-right corner, select your avatar.
@ -24,6 +29,9 @@ As a user, to delete your own account:
1. On the left sidebar, select **Account**.
1. Select **Delete account**.
NOTE:
On GitLab.com, there is a seven day delay between a user deleting their own account and deletion of the user record. During this time, that user is [blocked](../../admin_area/moderate_users.md#block-a-user) and a new account with the same email address or username cannot be created.
## Delete users and user contributions **(FREE SELF)**
As an administrator, to delete a user account:

View File

@ -40,7 +40,7 @@ gem 'chemlab', '~> 0.10'
gem 'chemlab-library-www-gitlab-com', '~> 0.1', '>= 0.1.1'
# dependencies for jenkins client
gem 'nokogiri', '~> 1.14', '>= 1.14.4'
gem 'nokogiri', '~> 1.15'
gem 'deprecation_toolkit', '~> 2.0.3', require: false

View File

@ -185,13 +185,13 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mini_mime (1.1.0)
mini_portile2 (2.8.1)
mini_portile2 (2.8.2)
minitest (5.18.0)
multi_json (1.15.0)
multi_xml (0.6.0)
netrc (0.11.0)
nokogiri (1.14.4)
mini_portile2 (~> 2.8.0)
nokogiri (1.15.0)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
octokit (6.1.1)
faraday (>= 1, < 3)
@ -331,7 +331,7 @@ DEPENDENCIES
gitlab_quality-test_tooling (~> 0.4.0)
influxdb-client (~> 2.9)
knapsack (~> 4.0)
nokogiri (~> 1.14, >= 1.14.4)
nokogiri (~> 1.15)
octokit (~> 6.1.1)
parallel (~> 1.23)
parallel_tests (~> 4.2, >= 4.2.1)

View File

@ -17,11 +17,11 @@ module QA
# Define alternative navbar (super sidebar) which does not yet implement all the same elements
view 'app/assets/javascripts/super_sidebar/components/super_sidebar.vue' do
element :navbar, required: true # TODO: rename to sidebar once it's default implementation
element :user_menu, required: !Runtime::Env.phone_layout?
element :user_avatar_content, required: !Runtime::Env.phone_layout?
end
view 'app/assets/javascripts/super_sidebar/components/user_menu.vue' do
element :user_menu, required: !Runtime::Env.phone_layout?
element :user_avatar_content, required: !Runtime::Env.phone_layout?
element :sign_out_link
element :edit_profile_link
end
@ -32,6 +32,7 @@ module QA
view 'app/assets/javascripts/super_sidebar/components/user_bar.vue' do
element :global_search_button
element :stop_impersonation_link
end
view 'app/assets/javascripts/super_sidebar/components/global_search/components/global_search.vue' do
@ -252,19 +253,14 @@ module QA
end
def has_admin_area_link?(wait: Capybara.default_max_wait_time)
return super if Runtime::Env.super_sidebar_enabled?
within_top_menu do
click_element(:navbar_dropdown, title: 'Menu')
has_element?(:admin_area_link, wait: wait)
end
end
def has_no_admin_area_link?(wait: Capybara.default_max_wait_time)
within_top_menu do
click_element(:navbar_dropdown, title: 'Menu')
has_no_element?(:admin_area_link, wait: wait)
end
end
def click_stop_impersonation_link
click_element(:stop_impersonation_link)
end

View File

@ -36,6 +36,10 @@ module QA
open_code_submenu('Compare revisions')
end
def go_to_merge_requests
open_code_submenu('Merge requests')
end
private
def open_code_submenu(sub_menu)

View File

@ -8,14 +8,6 @@ module QA
module Main
extend QA::Page::PageConcern
def self.included(base)
super
base.class_eval do
include QA::Page::SubMenus::SuperSidebar::Main
end
end
def click_project
click_element(:nav_item_link, submenu_item: 'Project overview')
end

View File

@ -25,6 +25,10 @@ module QA
def go_to_open_jira
open_plan_submenu("Open Jira")
end
def go_to_issues
open_plan_submenu("Issues")
end
end
end
end

View File

@ -30,13 +30,22 @@ module QA
go_to_context("Admin Area")
end
def has_admin_area_link?(wait: Capybara.default_max_wait_time)
open_context_switcher
has_element?(:nav_item_link, submenu_item: "Admin Area", wait: wait)
end
private
def go_to_context(sub_menu)
click_element(:context_switcher) unless has_element?(:context_navigation, wait: 0)
open_context_switcher
click_element(:nav_item_link, submenu_item: sub_menu)
end
def open_context_switcher
click_element(:context_switcher) unless has_element?(:context_navigation, wait: 0)
end
end
end
end

View File

@ -19,10 +19,6 @@ module QA
open_manage_submenu('Labels')
end
def go_to_milestones
open_manage_submenu('Milestones')
end
private
def open_manage_submenu(sub_menu)

View File

@ -19,6 +19,10 @@ module QA
open_plan_submenu("Wiki")
end
def go_to_milestones
open_plan_submenu('Milestones')
end
private
def open_plan_submenu(sub_menu)

View File

@ -569,7 +569,7 @@ module QA
end
def super_sidebar_enabled?
enabled?(ENV['QA_SUPER_SIDEBAR_ENABLED'], default: false)
enabled?(ENV['QA_SUPER_SIDEBAR_ENABLED'], default: true)
end
def require_slack_env!

View File

@ -2,10 +2,18 @@
require 'spec_helper'
RSpec.describe RegistrationsHelper do
RSpec.describe RegistrationsHelper, feature_category: :user_management do
describe '#signup_username_data_attributes' do
it 'has expected attributes' do
expect(helper.signup_username_data_attributes.keys).to include(:min_length, :min_length_message, :max_length, :max_length_message, :qa_selector)
end
end
describe '#register_omniauth_params' do
it 'adds intent to register' do
allow(helper).to receive(:glm_tracking_params).and_return({})
expect(helper.register_omniauth_params({})).to eq({ intent: :register })
end
end
end

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
RSpec.configure do |config|
%i[saas saas_registration].each do |metadata|
%i[saas saas_registration saas_sso_registration].each do |metadata|
config.before(:context, metadata) do
# Ensure Gitlab.com? returns true during context.
# This is needed for let_it_be which is shared across examples,