summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-01-28 12:09:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-28 12:09:54 +0000
commit8c2b139cf778cd1d152f06bbc090a4313f975b81 (patch)
tree94f3ffd7fdb2accb77ceb39b61189d22ec6efdc0 /app
parent263f33af2d69b38023c703d274568e2a6da21dee (diff)
downloadgitlab-ce-8c2b139cf778cd1d152f06bbc090a4313f975b81.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/api.js5
-rw-r--r--app/assets/javascripts/gfm_auto_complete.js10
-rw-r--r--app/assets/javascripts/pages/projects/project.js3
-rw-r--r--app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_header.vue7
-rw-r--r--app/assets/stylesheets/framework/ci_variable_list.scss10
-rw-r--r--app/controllers/projects/issues_controller.rb2
-rw-r--r--app/views/admin/application_settings/_account_and_limit.html.haml1
-rw-r--r--app/views/ci/group_variables/_index.html.haml21
-rw-r--r--app/views/ci/group_variables/_variable_header.html.haml6
-rw-r--r--app/views/profiles/accounts/show.html.haml5
10 files changed, 35 insertions, 35 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js
index 0a3db8ad3a6..7043da5017d 100644
--- a/app/assets/javascripts/api.js
+++ b/app/assets/javascripts/api.js
@@ -442,10 +442,11 @@ const Api = {
});
},
- applySuggestion(id, message) {
+ applySuggestion(id, message = '') {
const url = Api.buildUrl(Api.applySuggestionPath).replace(':id', encodeURIComponent(id));
+ const params = gon.features?.suggestionsCustomCommit ? { commit_message: message } : false;
- return axios.put(url, { commit_message: message });
+ return axios.put(url, params);
},
applySuggestionBatch(ids) {
diff --git a/app/assets/javascripts/gfm_auto_complete.js b/app/assets/javascripts/gfm_auto_complete.js
index cf9ff87f25e..5abbb752927 100644
--- a/app/assets/javascripts/gfm_auto_complete.js
+++ b/app/assets/javascripts/gfm_auto_complete.js
@@ -14,6 +14,10 @@ function sanitize(str) {
return str.replace(/<(?:.|\n)*?>/gm, '');
}
+function createMemberSearchString(member) {
+ return `${member.name.replace(/ /g, '')} ${member.username}`;
+}
+
export function membersBeforeSave(members) {
return members.map((member) => {
const GROUP_TYPE = 'Group';
@@ -40,7 +44,7 @@ export function membersBeforeSave(members) {
username: member.username,
avatarTag: autoCompleteAvatar.length === 1 ? txtAvatar : imgAvatar,
title: sanitize(title),
- search: sanitize(`${member.username} ${member.name}`),
+ search: sanitize(createMemberSearchString(member)),
icon: avatarIcon,
availability: member?.availability,
};
@@ -298,9 +302,7 @@ class GfmAutoComplete {
// Cache assignees list for easier filtering later
assignees =
- SidebarMediator.singleton?.store?.assignees?.map(
- (assignee) => `${assignee.username} ${assignee.name}`,
- ) || [];
+ SidebarMediator.singleton?.store?.assignees?.map(createMemberSearchString) || [];
const match = GfmAutoComplete.defaultMatcher(flag, subtext, this.app.controllers);
return match && match.length ? match[1] : null;
diff --git a/app/assets/javascripts/pages/projects/project.js b/app/assets/javascripts/pages/projects/project.js
index ef6953db83b..7bb740465c8 100644
--- a/app/assets/javascripts/pages/projects/project.js
+++ b/app/assets/javascripts/pages/projects/project.js
@@ -126,8 +126,9 @@ export default class Project {
const refs = this.fullData.Branches.concat(this.fullData.Tags);
const currentRef = refs.find((ref) => loc.indexOf(ref) > -1);
if (currentRef) {
- const targetPath = loc.split(currentRef)[1].slice(1);
+ const targetPath = loc.split(currentRef)[1].slice(1).split('#')[0];
selectedUrl.searchParams.set('path', targetPath);
+ selectedUrl.hash = window.location.hash;
}
}
diff --git a/app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_header.vue b/app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_header.vue
index cfc32e98119..4c6fa71398d 100644
--- a/app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_header.vue
+++ b/app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_header.vue
@@ -88,7 +88,12 @@ export default {
applySuggestion(message) {
if (!this.canApply) return;
this.isApplyingSingle = true;
- this.$emit('apply', this.applySuggestionCallback, message);
+
+ this.$emit(
+ 'apply',
+ this.applySuggestionCallback,
+ gon.features?.suggestionsCustomCommit ? message : undefined,
+ );
},
applySuggestionCallback() {
this.isApplyingSingle = false;
diff --git a/app/assets/stylesheets/framework/ci_variable_list.scss b/app/assets/stylesheets/framework/ci_variable_list.scss
index 2204b037f69..95025459cc9 100644
--- a/app/assets/stylesheets/framework/ci_variable_list.scss
+++ b/app/assets/stylesheets/framework/ci_variable_list.scss
@@ -98,13 +98,3 @@
color: $gl-text-color-disabled;
}
}
-
-.group-variable-list {
- color: $gray-500;
-
- .table-section:not(:first-child) {
- @include media-breakpoint-down(sm) {
- border-top: hidden;
- }
- }
-}
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index 9418fda97e0..100d7880286 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -105,7 +105,7 @@ class Projects::IssuesController < Projects::ApplicationController
build_params = issue_create_params.merge(
merge_request_to_resolve_discussions_of: params[:merge_request_to_resolve_discussions_of],
discussion_to_resolve: params[:discussion_to_resolve],
- confidential: !!Gitlab::Utils.to_boolean(params[:issue][:confidential])
+ confidential: !!Gitlab::Utils.to_boolean(issue_create_params[:confidential])
)
service = ::Issues::BuildService.new(project, current_user, build_params)
diff --git a/app/views/admin/application_settings/_account_and_limit.html.haml b/app/views/admin/application_settings/_account_and_limit.html.haml
index 46155f3f670..cb74af0c243 100644
--- a/app/views/admin/application_settings/_account_and_limit.html.haml
+++ b/app/views/admin/application_settings/_account_and_limit.html.haml
@@ -31,6 +31,7 @@
= render_if_exists 'admin/application_settings/personal_access_token_expiration_policy', form: f
= render_if_exists 'admin/application_settings/enforce_pat_expiration', form: f
+ = render_if_exists 'admin/application_settings/enforce_ssh_key_expiration', form: f
.form-group
= f.label :user_oauth_applications, _('User OAuth applications'), class: 'label-bold'
diff --git a/app/views/ci/group_variables/_index.html.haml b/app/views/ci/group_variables/_index.html.haml
index 84bcd42e07c..a74dbe793a6 100644
--- a/app/views/ci/group_variables/_index.html.haml
+++ b/app/views/ci/group_variables/_index.html.haml
@@ -1,13 +1,12 @@
- variables = @project.group.self_and_ancestors.map(&:variables).flatten
-.row
- .col-lg-12
- .group-variable-list
- = render 'ci/group_variables/variable_header'
- - variables.each do |variable|
- .group-variable-row.d-flex.w-100.border-bottom.pt-2.pb-2
- .table-section.section-40.gl-mr-3.key
- = variable.key
- .table-section.section-40.gl-mr-3
- %a.group-origin-link{ href: group_settings_ci_cd_path(variable.group) }
- = variable.group.name
+.ci-variable-table
+ %table.gl-table.gl-w-full.gl-table-layout-fixed
+ = render 'ci/group_variables/variable_header'
+ - variables.each do |variable|
+ %tr
+ %td.gl-text-truncate
+ = variable.key
+ %td.gl-text-truncate
+ %a.group-origin-link{ href: group_settings_ci_cd_path(variable.group) }
+ = variable.group.name
diff --git a/app/views/ci/group_variables/_variable_header.html.haml b/app/views/ci/group_variables/_variable_header.html.haml
index 2759a3f6f4a..ec512ab37e7 100644
--- a/app/views/ci/group_variables/_variable_header.html.haml
+++ b/app/views/ci/group_variables/_variable_header.html.haml
@@ -1,5 +1,5 @@
-.group-variable-keys.d-flex.w-100.align-items-center.pb-2.border-bottom
- .bold.table-section.section-40.gl-mr-3
+%tr
+ %th
= s_('Key')
- .bold.table-section.section-40.gl-mr-3
+ %th
= s_('Group')
diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml
index ca64c5f57b3..27e05f2dce5 100644
--- a/app/views/profiles/accounts/show.html.haml
+++ b/app/views/profiles/accounts/show.html.haml
@@ -81,9 +81,10 @@
= s_('Profiles|You must transfer ownership or delete these groups before you can delete your account.')
- elsif !current_user.can_remove_self?
%p
- = s_('Profiles|GitLab is unable to verify your identity automatically.')
+ - reset_link = reset_profile_password_path
+ = s_('Profiles|GitLab is unable to verify your identity automatically. For security purposes, you must set a password by %{openingTag}resetting your password%{closingTag} to delete your account.').html_safe % { openingTag: "<a href='#{reset_link}'>".html_safe, closingTag: '</a>'.html_safe}
%p
- = s_('Profiles|Please email %{data_request} to begin the account deletion process.').html_safe % { data_request: mail_to('personal-data-request@gitlab.com') }
+ = s_('Profiles|If after setting a password, the option to delete your account is still not available, please email %{data_request} to begin the account deletion process.').html_safe % { data_request: mail_to('personal-data-request@gitlab.com') }
- else
%p
= s_("Profiles|You don't have access to delete this user.")