Skip to content
Snippets Groups Projects
Commit 133924c6 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent f607152a
No related branches found
No related tags found
No related merge requests found
Showing
with 116 additions and 30 deletions
File mode changed from 100755 to 100644
Loading
Loading
@@ -99,7 +99,10 @@ export default {
return !groupId ? referencePath.split('#')[0] : null;
},
orderedLabels() {
return _.sortBy(this.issue.labels, 'title');
return _.chain(this.issue.labels)
.filter(this.isNonListLabel)
.sortBy('title')
.value();
},
helpLink() {
return boardsStore.scopedLabels.helpLink;
Loading
Loading
@@ -130,6 +133,9 @@ export default {
if (!label.id) return false;
return true;
},
isNonListLabel(label) {
return label.id && !(this.list.type === 'label' && this.list.title === label.title);
},
filterByLabel(label) {
if (!this.updateFilters) return;
const labelTitle = encodeURIComponent(label.title);
Loading
Loading
@@ -167,7 +173,7 @@ export default {
</h4>
</div>
<div v-if="showLabelFooter" class="board-card-labels prepend-top-4 d-flex flex-wrap">
<template v-for="label in orderedLabels" v-if="showLabel(label)">
<template v-for="label in orderedLabels">
<issue-card-inner-scoped-label
v-if="showScopedLabel(label)"
:key="label.id"
Loading
Loading
Loading
Loading
@@ -87,6 +87,14 @@ export function getLocationHash(url = window.location.href) {
return hashIndex === -1 ? null : url.substring(hashIndex + 1);
}
 
/**
* Returns a boolean indicating whether the URL hash contains the given string value
*/
export function doesHashExistInUrl(hashName) {
const hash = getLocationHash();
return hash && hash.includes(hashName);
}
/**
* Apply the fragment to the given url by returning a new url string that includes
* the fragment. If the given url already contains a fragment, the original fragment
Loading
Loading
<script>
import $ from 'jquery';
import { mapGetters, mapActions } from 'vuex';
import { getLocationHash } from '../../lib/utils/url_utility';
import { getLocationHash, doesHashExistInUrl } from '../../lib/utils/url_utility';
import Icon from '~/vue_shared/components/icon.vue';
import {
DISCUSSION_FILTERS_DEFAULT_VALUE,
HISTORY_ONLY_FILTER_VALUE,
DISCUSSION_TAB_LABEL,
DISCUSSION_FILTER_TYPES,
NOTE_UNDERSCORE,
} from '../constants';
import notesEventHub from '../event_hub';
 
Loading
Loading
@@ -28,7 +29,9 @@ export default {
},
data() {
return {
currentValue: this.selectedValue,
currentValue: doesHashExistInUrl(NOTE_UNDERSCORE)
? DISCUSSION_FILTERS_DEFAULT_VALUE
: this.selectedValue,
defaultValue: DISCUSSION_FILTERS_DEFAULT_VALUE,
displayFilters: true,
};
Loading
Loading
@@ -50,7 +53,6 @@ export default {
 
notesEventHub.$on('dropdownSelect', this.selectFilter);
window.addEventListener('hashchange', this.handleLocationHash);
this.handleLocationHash();
},
mounted() {
this.toggleCommentsForm();
Loading
Loading
<script>
import { __ } from '~/locale';
import { mapGetters, mapActions } from 'vuex';
import { getLocationHash } from '../../lib/utils/url_utility';
import { getLocationHash, doesHashExistInUrl } from '../../lib/utils/url_utility';
import Flash from '../../flash';
import * as constants from '../constants';
import eventHub from '../event_hub';
Loading
Loading
@@ -156,19 +156,17 @@ export default {
 
this.isFetching = true;
 
return this.fetchDiscussions({ path: this.getNotesDataByProp('discussionsPath') })
.then(() => {
this.initPolling();
})
return this.fetchDiscussions(this.getFetchDiscussionsConfig())
.then(this.initPolling)
.then(() => {
this.setLoadingState(false);
this.setNotesFetchedState(true);
eventHub.$emit('fetchedNotesData');
this.isFetching = false;
})
.then(() => this.$nextTick())
.then(() => this.startTaskList())
.then(() => this.checkLocationHash())
.then(this.$nextTick)
.then(this.startTaskList)
.then(this.checkLocationHash)
.catch(() => {
this.setLoadingState(false);
this.setNotesFetchedState(true);
Loading
Loading
@@ -199,9 +197,20 @@ export default {
},
startReplying(discussionId) {
return this.convertToDiscussion(discussionId)
.then(() => this.$nextTick())
.then(this.$nextTick)
.then(() => eventHub.$emit('startReplying', discussionId));
},
getFetchDiscussionsConfig() {
const defaultConfig = { path: this.getNotesDataByProp('discussionsPath') };
if (doesHashExistInUrl(constants.NOTE_UNDERSCORE)) {
return Object.assign({}, defaultConfig, {
filter: constants.DISCUSSION_FILTERS_DEFAULT_VALUE,
persistFilter: false,
});
}
return defaultConfig;
},
},
systemNote: constants.SYSTEM_NOTE,
};
Loading
Loading
Loading
Loading
@@ -8,8 +8,6 @@ export const OPENED = 'opened';
export const REOPENED = 'reopened';
export const CLOSED = 'closed';
export const MERGED = 'merged';
export const EMOJI_THUMBSUP = 'thumbsup';
export const EMOJI_THUMBSDOWN = 'thumbsdown';
export const ISSUE_NOTEABLE_TYPE = 'issue';
export const EPIC_NOTEABLE_TYPE = 'epic';
export const MERGE_REQUEST_NOTEABLE_TYPE = 'MergeRequest';
Loading
Loading
@@ -19,6 +17,7 @@ export const DESCRIPTION_TYPE = 'changed the description';
export const HISTORY_ONLY_FILTER_VALUE = 2;
export const DISCUSSION_FILTERS_DEFAULT_VALUE = 0;
export const DISCUSSION_TAB_LABEL = 'show';
export const NOTE_UNDERSCORE = 'note_';
 
export const NOTEABLE_TYPE_MAPPING = {
Issue: ISSUE_NOTEABLE_TYPE,
Loading
Loading
Loading
Loading
@@ -28,4 +28,14 @@ module TagsHelper
def protected_tag?(project, tag)
ProtectedTag.protected?(project, tag.name)
end
def tag_description_help_text
text = s_('TagsPage|Optionally, add a message to the tag. Leaving this blank creates '\
'a %{link_start}lightweight tag.%{link_end}') % {
link_start: '<a href="https://git-scm.com/book/en/v2/Git-Basics-Tagging\" target="_blank" rel="noopener noreferrer">',
link_end: '</a>'
}
text.html_safe
end
end
Loading
Loading
@@ -33,9 +33,12 @@ class SlashCommandsService < Service
return unless valid_token?(params[:token])
 
chat_user = find_chat_user(params)
user = chat_user&.user
if user
unless user.can?(:use_slash_commands)
return Gitlab::SlashCommands::Presenters::Access.new.deactivated if user.deactivated?
 
if chat_user&.user
unless chat_user.user.can?(:use_slash_commands)
return Gitlab::SlashCommands::Presenters::Access.new.access_denied(project)
end
 
Loading
Loading
Loading
Loading
@@ -48,6 +48,7 @@ class GlobalPolicy < BasePolicy
prevent :access_git
prevent :access_api
prevent :receive_notifications
prevent :use_slash_commands
end
 
rule { required_terms_not_accepted }.policy do
Loading
Loading
Loading
Loading
@@ -9,6 +9,8 @@
= s_('AdminUsers|The user will not be able to access the API')
%li
= s_('AdminUsers|The user will not receive any notifications')
%li
= s_('AdminUsers|The user will not be able to use slash commands')
%li
= s_('AdminUsers|When the user logs back in, their account will reactivate as a fully active account')
%li
Loading
Loading
Loading
Loading
@@ -31,7 +31,7 @@
.col-sm-10
= text_area_tag :message, @message, required: false, class: 'form-control', rows: 5
.form-text.text-muted
= s_('TagsPage|Optionally, add a message to the tag.')
= tag_description_help_text
%hr
.form-group.row
= label_tag :release_description, s_('TagsPage|Release notes'), class: 'col-form-label col-sm-2'
Loading
Loading
Loading
Loading
@@ -6,13 +6,13 @@ class PruneOldEventsWorker
 
# rubocop: disable CodeReuse/ActiveRecord
def perform
# Contribution calendar shows maximum 12 months of events, we retain 2 years for data integrity.
# Contribution calendar shows maximum 12 months of events, we retain 3 years for data integrity.
# Double nested query is used because MySQL doesn't allow DELETE subqueries on the same table.
Event.unscoped.where(
'(id IN (SELECT id FROM (?) ids_to_remove))',
Event.unscoped.where(
'created_at < ?',
(2.years + 1.day).ago)
(3.years + 1.day).ago)
.select(:id)
.limit(10_000))
.delete_all
Loading
Loading
---
title: Hide redundant labels in issue boards
merge_request: 17937
author:
type: fixed
---
title: Fix notes race condition when linking to specific note
merge_request: 17777
author:
type: fixed
---
title: Do not allow deactivated users to use slash commands
merge_request: 18365
author:
type: fixed
Loading
Loading
@@ -666,7 +666,7 @@ build:
 
CAUTION: **Warning:**
There are some points to be aware of when
[using this feature with new branches or tags *without* pipelines for merge requests](using-onlychanges-without-pipelines-for-merge-requests).
[using this feature with new branches or tags *without* pipelines for merge requests](#using-onlychanges-without-pipelines-for-merge-requests).
 
##### Using `only:changes` with pipelines for merge requests
 
Loading
Loading
Loading
Loading
@@ -55,6 +55,7 @@ A deactivated user:
 
- Cannot access Git repositories or the API.
- Will not receive any notifications from GitLab.
- Will not be able to use [slash commands](../../../integration/slash_commands.md).
 
Personal projects, group and user history of the deactivated user will be left intact.
 
Loading
Loading
Loading
Loading
@@ -244,6 +244,12 @@ Sign in and re-enable two-factor authentication as soon as possible.
- The user logs out and attempts to log in via `second.host.xyz` - U2F authentication fails, because
the U2F key has only been registered on `first.host.xyz`.
 
## Troubleshooting
If you are receiving an `invalid pin code` error, this may indicate that there is a time sync issue between the authentication application and the GitLab instance itself.
Most authentication apps have a feature in the settings for syncing the time for the codes themselves. For Google Authenticator for example, go to `Settings > Time correction for codes`.
<!-- ## Troubleshooting
 
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
Loading
Loading
Loading
Loading
@@ -15,6 +15,15 @@ module Gitlab
MESSAGE
end
 
def deactivated
ephemeral_response(text: <<~MESSAGE)
You are not allowed to perform the given chatops command since
your account has been deactivated by your administrator.
Please log back in from a web browser to reactivate your account at #{Gitlab.config.gitlab.url}
MESSAGE
end
def not_found
ephemeral_response(text: "404 not found! GitLab couldn't find what you were looking for! :boom:")
end
Loading
Loading
Loading
Loading
@@ -375,6 +375,12 @@ msgstr ""
msgid "%{title} changes"
msgstr ""
 
msgid "%{total} open issue weight"
msgstr ""
msgid "%{total} open issues"
msgstr ""
msgid "%{unstaged} unstaged and %{staged} staged changes"
msgstr ""
 
Loading
Loading
@@ -1252,6 +1258,9 @@ msgstr ""
msgid "AdminUsers|The user will not be able to access the API"
msgstr ""
 
msgid "AdminUsers|The user will not be able to use slash commands"
msgstr ""
msgid "AdminUsers|The user will not receive any notifications"
msgstr ""
 
Loading
Loading
@@ -2649,7 +2658,7 @@ msgstr ""
msgid "Built-in"
msgstr ""
 
msgid "BurndownChartLabel|Guideline"
msgid "Burndown chart"
msgstr ""
 
msgid "BurndownChartLabel|Open issue weight"
Loading
Loading
@@ -2658,12 +2667,6 @@ msgstr ""
msgid "BurndownChartLabel|Open issues"
msgstr ""
 
msgid "BurndownChartLabel|Progress"
msgstr ""
msgid "BurndownChartLabel|Remaining"
msgstr ""
msgid "Business"
msgstr ""
 
Loading
Loading
@@ -8303,6 +8306,9 @@ msgstr ""
msgid "GroupsTree|Search by name"
msgstr ""
 
msgid "Guideline"
msgstr ""
msgid "HTTP Basic: Access denied\\nYou must use a personal access token with 'api' scope for Git over HTTP.\\nYou can generate one at %{profile_personal_access_tokens_url}"
msgstr ""
 
Loading
Loading
@@ -8943,6 +8949,9 @@ msgstr ""
msgid "Issue was closed by %{name} %{reason}"
msgstr ""
 
msgid "Issue weight"
msgstr ""
msgid "IssueBoards|Board"
msgstr ""
 
Loading
Loading
@@ -15814,7 +15823,7 @@ msgstr ""
msgid "TagsPage|New tag"
msgstr ""
 
msgid "TagsPage|Optionally, add a message to the tag."
msgid "TagsPage|Optionally, add a message to the tag. Leaving this blank creates a %{link_start}lightweight tag.%{link_end}"
msgstr ""
 
msgid "TagsPage|Optionally, add release notes to the tag. They will be stored in the GitLab database and displayed on the tags page."
Loading
Loading
@@ -17062,9 +17071,15 @@ msgstr ""
msgid "Total artifacts size: %{total_size}"
msgstr ""
 
msgid "Total issues"
msgstr ""
msgid "Total test time for all commits/merges"
msgstr ""
 
msgid "Total weight"
msgstr ""
msgid "Total: %{total}"
msgstr ""
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment