Skip to content

Commit

Permalink
Add latest changes from gitlab-org/gitlab@master
Browse files Browse the repository at this point in the history
  • Loading branch information
GitLab Bot committed Aug 5, 2024
1 parent 444db32 commit c823a6f
Show file tree
Hide file tree
Showing 169 changed files with 490 additions and 464 deletions.
2 changes: 1 addition & 1 deletion .gitlab/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,7 @@ lib/gitlab/checks/**
/app/views/groups/settings/_resource_access_token_creation.html.haml
/app/views/groups/settings/_two_factor_auth.html.haml
/app/views/groups/settings/access_tokens/
/app/views/layouts/devise*.haml
/app/views/layouts/oauth_error.html.haml
/app/views/notify/access_token_about_to_expire_email.html.haml
/app/views/notify/access_token_about_to_expire_email.text.erb
Expand Down Expand Up @@ -1236,7 +1237,6 @@ lib/gitlab/checks/**
/ee/app/views/admin/application_settings/_personal_access_token_expiration_policy.html.haml
/ee/app/views/credentials_inventory_mailer/personal_access_token_revoked_email.html.haml
/ee/app/views/credentials_inventory_mailer/personal_access_token_revoked_email.text.haml
/app/views/devise/**/
/ee/app/views/groups/_personal_access_token_expiration_policy.html.haml
/ee/app/views/groups/sso/_authorize_pane.html.haml
/ee/app/views/notify/policy_revoked_personal_access_tokens_email.html.haml
Expand Down
2 changes: 1 addition & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ StylesPath = doc/.vale
MinAlertLevel = suggestion

[*.md]
BasedOnStyles = gitlab
BasedOnStyles = gitlab_base, gitlab_docs

# Ignore SVG markup
TokenIgnores = (\*\*\{\w*\}\*\*)
2 changes: 1 addition & 1 deletion GITALY_SERVER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
09eeaffa3ae3118b03eb0e9e7000e5901ced015a
da03e230032486c2fc2cbed95d78308eff2887c6
5 changes: 2 additions & 3 deletions app/assets/javascripts/badges/components/badge_form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export default {
<form
ref="form"
:class="{ 'was-validated': wasValidated }"
class="gl-mt-3 gl-mb-3 needs-validation"
class="needs-validation"
novalidate
@submit.prevent.stop="onSubmit"
>
Expand Down Expand Up @@ -264,14 +264,13 @@ export default {
</p>
</div>

<div v-if="!inModal" class="form-group" data-testid="action-buttons">
<div v-if="!inModal" class="gl-flex gl-gap-3" data-testid="action-buttons">
<gl-button
:loading="isSaving"
type="submit"
variant="confirm"
category="primary"
data-testid="add-badge-button"
class="gl-mr-3"
>
{{ saveText }}
</gl-button>
Expand Down
12 changes: 8 additions & 4 deletions app/assets/javascripts/badges/components/badge_list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export default {
GlTooltip: GlTooltipDirective,
},
i18n: {
edit: __('Edit'),
delete: __('Delete'),
emptyGroupMessage: s__('Badges|This group has no badges. Add an existing badge or create one.'),
emptyProjectMessage: s__('Badges|This project has no badges. Start by adding a new badge.'),
},
Expand Down Expand Up @@ -138,24 +140,26 @@ export default {
data-testid="badge-actions"
>
<gl-button
v-gl-tooltip
v-gl-modal.edit-badge-modal
:disabled="item.isDeleting"
variant="default"
category="tertiary"
icon="pencil"
size="medium"
:aria-label="__('Edit')"
:title="$options.i18n.edit"
:aria-label="$options.i18n.edit"
data-testid="edit-badge-button"
@click="editBadge(item)"
/>
<gl-button
v-gl-tooltip
v-gl-modal.delete-badge-modal
:disabled="item.isDeleting"
category="tertiary"
variant="danger"
icon="remove"
size="medium"
:aria-label="__('Delete')"
:title="$options.i18n.delete"
:aria-label="$options.i18n.delete"
data-testid="delete-badge"
@click="updateBadgeInModal(item)"
/>
Expand Down
36 changes: 10 additions & 26 deletions app/assets/javascripts/badges/components/badge_settings.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { GlButton, GlModal, GlSprintf } from '@gitlab/ui';
import { GlModal, GlSprintf } from '@gitlab/ui';
// eslint-disable-next-line no-restricted-imports
import { mapState, mapActions } from 'vuex';
import { createAlert, VARIANT_INFO } from '~/alert';
Expand All @@ -12,13 +12,12 @@ import BadgeList from './badge_list.vue';
export default {
name: 'BadgeSettings',
components: {
CrudComponent,
Badge,
BadgeForm,
BadgeList,
GlButton,
GlModal,
GlSprintf,
CrudComponent,
},
i18n: {
title: s__('Badges|Your badges'),
Expand All @@ -28,11 +27,6 @@ export default {
'Badges|If you delete this badge, you %{strongStart}cannot%{strongEnd} restore it.',
),
},
data() {
return {
addFormVisible: false,
};
},
computed: {
...mapState(['badges', 'badgeInModal', 'isEditing']),
saveProps() {
Expand All @@ -55,11 +49,8 @@ export default {
},
methods: {
...mapActions(['deleteBadge']),
showAddForm() {
this.addFormVisible = !this.addFormVisible;
},
closeAddForm() {
this.addFormVisible = false;
this.$refs.badgesCrud.hideForm();
},
onSubmitEditModal() {
this.$refs.editForm.onSubmit();
Expand All @@ -85,25 +76,19 @@ export default {

<template>
<crud-component
ref="badgesCrud"
:title="$options.i18n.title"
icon="labels"
:count="badges.length"
class="badge-settings"
:toggle-text="$options.i18n.addFormTitle"
data-testid="badge-settings"
>
<template #actions>
<gl-button
v-if="!addFormVisible"
size="small"
data-testid="show-badge-add-form"
@click="showAddForm"
>{{ $options.i18n.addButton }}</gl-button
>
</template>

<div v-if="addFormVisible" class="gl-new-card-add-form gl-m-5">
<template #form>
<h4 class="gl-mt-0">{{ $options.i18n.addFormTitle }}</h4>
<badge-form :is-editing="false" @close-add-form="closeAddForm" />
</div>
</template>

<badge-list />

<gl-modal
modal-id="edit-badge-modal"
Expand Down Expand Up @@ -136,6 +121,5 @@ export default {
</gl-sprintf>
</p>
</gl-modal>
<badge-list />
</crud-component>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default {
</div>
<div class="gl-flex gl-items-baseline gl-gap-3" data-testid="crud-actions">
<gl-button
v-if="toggleText"
v-if="toggleText && !isFormVisible"
size="small"
data-testid="crud-form-toggle"
@click="toggleForm"
Expand Down
2 changes: 2 additions & 0 deletions app/services/audit_event_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

class AuditEventService
include AuditEventSaveType
include ::Gitlab::Audit::Logging

# Instantiates a new service
#
Expand Down Expand Up @@ -123,6 +124,7 @@ def log_security_event_to_database

event = build_event
save_or_track event
log_to_new_tables([event], event.class.to_s) if should_save_database?(@save_type)
event
end

Expand Down
8 changes: 4 additions & 4 deletions app/views/user_settings/ssh_keys/_key.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
= _('Never')

%td{ data: { label: _('Actions'), testid: 'actions' } }
%div{ class: 'gl-display-flex! gl-pl-0!' }
.gl-flex.gl-items-center.gl-justify-end.gl-gap-3.-gl-m-3
- if key.can_delete?
- if key.signing? && !is_admin
= render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'js-confirm-modal-button', 'aria-label' => _('Revoke'), data: ssh_key_revoke_modal_data(key, revoke_user_settings_ssh_key_path(key)) }) do
= render Pajamas::ButtonComponent.new(size: :small, category: :secondary, variant: :danger, button_options: { class: 'js-confirm-modal-button', 'aria-label' => _('Revoke'), data: ssh_key_revoke_modal_data(key, revoke_user_settings_ssh_key_path(key)) }) do
= _('Revoke')
.gl-pl-3
= render Pajamas::ButtonComponent.new(size: :small, icon: 'remove', button_options: { title: _('Remove'), 'aria-label' => _('Remove'), class: 'js-confirm-modal-button', data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin)) })

= render Pajamas::ButtonComponent.new(icon: 'remove', category: :tertiary, button_options: { title: _('Remove'), 'aria-label' => _('Remove'), class: 'js-confirm-modal-button', data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin)) })
2 changes: 1 addition & 1 deletion app/views/user_settings/ssh_keys/_key_table.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
%th= s_('Profiles|Created')
%th= s_('Profiles|Last used')
%th= s_('Profiles|Expires')
%th= _('Actions')
%th.gl-text-right= _('Actions')
= render partial: 'user_settings/ssh_keys/key', collection: @keys, locals: { is_admin: is_admin }
- else
- if is_admin
Expand Down
33 changes: 12 additions & 21 deletions app/views/user_settings/ssh_keys/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
- page_title _('SSH Keys')
- add_page_specific_style 'page_bundles/profile'
- @force_desktop_expanded_sidebar = true
- add_form_class = 'gl-hidden' if !form_errors(@key)
- hide_class = 'gl-hidden' if form_errors(@key)

.settings-section.js-search-settings-section
.settings-sticky-header
.settings-sticky-header-inner
%h4.gl-my-0
= page_title
%p.gl-text-secondary
= render ::Layouts::SettingsSectionComponent.new(page_title) do |c|
- c.with_description do
= _('SSH keys allow you to establish a secure connection between your computer and GitLab.')
- config_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_instance_configuration_url }
= html_escape(s_('SSH fingerprints verify that the client is connecting to the correct host. Check the %{config_link_start}current instance configuration%{config_link_end}.')) % { config_link_start: config_link_start, config_link_end: '</a>'.html_safe }

= render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card js-toggle-container' }, header_options: { class: 'gl-new-card-header' }, body_options: { class: 'gl-new-card-body gl-px-0' }) do |c|
- c.with_header do
.gl-new-card-title-wrapper
%h3.gl-new-card-title
= _('Your SSH keys')
.gl-new-card-count
= sprite_icon('key', css_class: 'gl-mr-2')
= @keys.count
.gl-new-card-actions
= render Pajamas::ButtonComponent.new(size: :small, button_options: { class: "js-toggle-button js-toggle-content #{hide_class}" }) do
= _('Add new key')
- c.with_body do
.gl-new-card-add-form.gl-m-3.js-toggle-content{ class: add_form_class }
- c.with_body do
= render ::Layouts::CrudComponent.new(_('Your SSH keys'),
icon: 'key',
count: @keys.count,
toggle_text: _('Add new key'),
toggle_options: { class: hide_class },
form_options: { form_errors: form_errors(@key) }) do |c|
- c.with_form do
%h4.gl-mt-0
= _('Add an SSH key')
%p
- help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/ssh') }
= _('Add an SSH key for secure access to GitLab. %{help_link_start}Learn more%{help_link_end}.').html_safe % {help_link_start: help_link_start, help_link_end: '</a>'.html_safe }
= render 'form'

= render 'key_table', hide_class: hide_class
- c.with_body do
= render 'key_table'
8 changes: 0 additions & 8 deletions config/feature_flags/development/json_wrapper_legacy_mode.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# frozen_string_literal: true

class DropCodeSuggestionDailyUsagesTable < ClickHouse::Migration
def up
execute <<~SQL
DROP VIEW IF EXISTS code_suggestion_daily_usages_mv
SQL

execute <<~SQL
DROP TABLE IF EXISTS code_suggestion_daily_usages
SQL
end

def down
execute <<~SQL
CREATE TABLE IF NOT EXISTS code_suggestion_daily_usages
(
user_id UInt64 DEFAULT 0,
timestamp Date32 DEFAULT toDate(now64()),
) ENGINE = ReplacingMergeTree
PARTITION BY toYear(timestamp)
ORDER BY (user_id, timestamp)
SETTINGS index_granularity = 64
SQL

execute <<~SQL
CREATE MATERIALIZED VIEW code_suggestion_daily_usages_mv
TO code_suggestion_daily_usages
AS
SELECT
user_id,
timestamp
FROM code_suggestion_usages
WHERE event IN (1, 2, 5)
GROUP BY user_id, timestamp
SQL
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

class AddProjectIdToMergeRequestDiffCommitsB5377a7a34 < Gitlab::Database::Migration[2.2]
milestone '17.3'

def up
add_column :merge_request_diff_commits_b5377a7a34, :project_id, :bigint
end

def down
remove_column :merge_request_diff_commits_b5377a7a34, :project_id
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

class PrepareIndexMergeRequestDiffCommitsB5377a7a34OnProjectId < Gitlab::Database::Migration[2.2]
milestone '17.3'
disable_ddl_transaction!

INDEX_NAME = 'index_merge_request_diff_commits_b5377a7a34_on_project_id'

def up
prepare_async_index :merge_request_diff_commits_b5377a7a34, :project_id, name: INDEX_NAME
end

def down
unprepare_async_index :merge_request_diff_commits_b5377a7a34, INDEX_NAME
end
end
1 change: 1 addition & 0 deletions db/schema_migrations/20240802194745
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
13f2a6dc299a6c88a90f68c430fa268a11a0605f7fb9cc8fa26c05fec747b309
1 change: 1 addition & 0 deletions db/schema_migrations/20240802194749
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
32446f048c0fdbc4fa4d8fc2443fcf4835df2133a9ad813b29b8f5cb883b780c
3 changes: 2 additions & 1 deletion db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2531,7 +2531,8 @@ CREATE TABLE merge_request_diff_commits_b5377a7a34 (
commit_author_id bigint,
committer_id bigint,
merge_request_diff_id bigint NOT NULL,
relative_order integer NOT NULL
relative_order integer NOT NULL,
project_id bigint
)
PARTITION BY RANGE (merge_request_diff_id);

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ extends: spelling
message: "Check the spelling of '%s'. If the spelling is correct, ask a Technical Writer to add this word to the spelling exception list."
level: warning
ignore:
- gitlab/spelling-exceptions.txt
- gitlab_base/spelling-exceptions.txt
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions doc/administration/auth/ldap/ldap_synchronization.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ In Active Directory, a user is marked as disabled/blocked if the user
account control attribute (`userAccountControl:1.2.840.113556.1.4.803`)
has bit 2 set.

<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->

For more information, see [Bitmask Searches in LDAP](https://ctovswild.com/2009/09/03/bitmask-searches-in-ldap/).

<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->

The process also updates the following user information:

Expand Down
Loading

0 comments on commit c823a6f

Please sign in to comment.