summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-17 09:07:30 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-17 09:07:30 +0000
commit5498125b82c1bad4c613cc4b90c7920d47d949d4 (patch)
tree03f35817fea072376372c2f280e62e08e9f8f145
parent2fff82c54ce215aceabe5b5236fafeea005d4eee (diff)
downloadgitlab-ce-5498125b82c1bad4c613cc4b90c7920d47d949d4.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/admin/topics/components/remove_avatar.vue67
-rw-r--r--app/assets/javascripts/admin/topics/index.js22
-rw-r--r--app/assets/javascripts/pages/admin/topics/edit/index.js3
-rw-r--r--app/controllers/projects/issues_controller.rb9
-rw-r--r--app/helpers/issues_helper.rb4
-rw-r--r--app/models/concerns/pg_full_text_searchable.rb2
-rw-r--r--app/views/admin/topics/_form.html.haml2
-rw-r--r--app/views/projects/issues/index.html.haml2
-rw-r--r--doc/administration/instance_limits.md4
-rw-r--r--doc/administration/package_information/supported_os.md1
-rw-r--r--doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md2
-rw-r--r--doc/api/index.md2
-rw-r--r--doc/api/status_checks.md14
-rw-r--r--doc/ci/pipelines/settings.md1
-rw-r--r--doc/ci/runners/configure_runners.md6
-rw-r--r--doc/development/gitlab_diagram_overview.odgbin50512 -> 0 bytes
-rw-r--r--doc/subscriptions/self_managed/index.md10
-rw-r--r--doc/update/package/convert_to_ee.md2
-rw-r--r--doc/user/admin_area/license.md188
-rw-r--r--doc/user/admin_area/license_file.md127
-rw-r--r--lib/gitlab/background_migration/backfill_issue_search_data.rb2
-rw-r--r--locale/gitlab.pot3
-rw-r--r--spec/frontend/admin/topics/components/__snapshots__/remove_avatar_spec.js.snap20
-rw-r--r--spec/frontend/admin/topics/components/remove_avatar_spec.js85
-rw-r--r--spec/helpers/issues_helper_spec.rb6
-rw-r--r--spec/models/concerns/pg_full_text_searchable_spec.rb15
-rw-r--r--spec/support/helpers/terms_helper.rb2
27 files changed, 417 insertions, 184 deletions
diff --git a/app/assets/javascripts/admin/topics/components/remove_avatar.vue b/app/assets/javascripts/admin/topics/components/remove_avatar.vue
new file mode 100644
index 00000000000..5e94d6185e0
--- /dev/null
+++ b/app/assets/javascripts/admin/topics/components/remove_avatar.vue
@@ -0,0 +1,67 @@
+<script>
+import { uniqueId } from 'lodash';
+import { GlButton, GlModal, GlModalDirective } from '@gitlab/ui';
+import { __ } from '~/locale';
+import csrf from '~/lib/utils/csrf';
+
+export default {
+ components: {
+ GlButton,
+ GlModal,
+ },
+ directives: {
+ GlModal: GlModalDirective,
+ },
+ inject: ['path'],
+ data() {
+ return {
+ modalId: uniqueId('remove-topic-avatar-'),
+ };
+ },
+ methods: {
+ deleteApplication() {
+ this.$refs.deleteForm.submit();
+ },
+ },
+ i18n: {
+ remove: __('Remove avatar'),
+ title: __('Confirm remove avatar'),
+ body: __('Avatar will be removed. Are you sure?'),
+ },
+ modal: {
+ actionPrimary: {
+ text: __('Remove'),
+ attributes: {
+ variant: 'danger',
+ },
+ },
+ actionSecondary: {
+ text: __('Cancel'),
+ attributes: {
+ variant: 'default',
+ },
+ },
+ },
+ csrf,
+};
+</script>
+<template>
+ <div>
+ <gl-button v-gl-modal="modalId" variant="danger" category="secondary" class="gl-mt-2">{{
+ $options.i18n.remove
+ }}</gl-button>
+ <gl-modal
+ :title="$options.i18n.title"
+ :action-primary="$options.modal.actionPrimary"
+ :action-secondary="$options.modal.actionSecondary"
+ :modal-id="modalId"
+ size="sm"
+ @primary="deleteApplication"
+ >{{ $options.i18n.body }}
+ <form ref="deleteForm" method="post" :action="path">
+ <input type="hidden" name="_method" value="delete" />
+ <input type="hidden" name="authenticity_token" :value="$options.csrf.token" />
+ </form>
+ </gl-modal>
+ </div>
+</template>
diff --git a/app/assets/javascripts/admin/topics/index.js b/app/assets/javascripts/admin/topics/index.js
new file mode 100644
index 00000000000..8fbcadf3369
--- /dev/null
+++ b/app/assets/javascripts/admin/topics/index.js
@@ -0,0 +1,22 @@
+import Vue from 'vue';
+import RemoveAvatar from './components/remove_avatar.vue';
+
+export default () => {
+ const el = document.querySelector('.js-remove-topic-avatar');
+
+ if (!el) {
+ return false;
+ }
+
+ const { path } = el.dataset;
+
+ return new Vue({
+ el,
+ provide: {
+ path,
+ },
+ render(h) {
+ return h(RemoveAvatar);
+ },
+ });
+};
diff --git a/app/assets/javascripts/pages/admin/topics/edit/index.js b/app/assets/javascripts/pages/admin/topics/edit/index.js
index c4e05bbd092..f5e6d044865 100644
--- a/app/assets/javascripts/pages/admin/topics/edit/index.js
+++ b/app/assets/javascripts/pages/admin/topics/edit/index.js
@@ -2,7 +2,10 @@ import $ from 'jquery';
import GLForm from '~/gl_form';
import initFilePickers from '~/file_pickers';
import ZenMode from '~/zen_mode';
+import initRemoveAvatar from '~/admin/topics';
new GLForm($('.js-project-topic-form')); // eslint-disable-line no-new
initFilePickers();
new ZenMode(); // eslint-disable-line no-new
+
+initRemoveAvatar();
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index 2504bfea218..8ff8857ca44 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -72,9 +72,12 @@ class Projects::IssuesController < Projects::ApplicationController
attr_accessor :vulnerability_id
def index
- set_issuables_index if !html_request? || Feature.disabled?(:vue_issues_list, project&.group, default_enabled: :yaml)
-
- @issues = @issuables
+ if html_request? && Feature.enabled?(:vue_issues_list, project&.group, default_enabled: :yaml)
+ set_sort_order
+ else
+ set_issuables_index
+ @issues = @issuables
+ end
respond_to do |format|
format.html
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 9187a3eda0a..298162fe970 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -209,7 +209,7 @@ module IssuesHelper
}
end
- def project_issues_list_data(project, current_user, finder)
+ def project_issues_list_data(project, current_user)
common_issues_list_data(project, current_user).merge(
can_bulk_update: can?(current_user, :admin_issue, project).to_s,
can_edit: can?(current_user, :admin_project, project).to_s,
@@ -223,7 +223,7 @@ module IssuesHelper
is_project: true.to_s,
markdown_help_path: help_page_path('user/markdown'),
max_attachment_size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes),
- new_issue_path: new_project_issue_path(project, issue: { milestone_id: finder.milestones.first.try(:id) }),
+ new_issue_path: new_project_issue_path(project),
project_import_jira_path: project_import_jira_path(project),
quick_actions_help_path: help_page_path('user/project/quick_actions'),
releases_path: project_releases_path(project, format: :json),
diff --git a/app/models/concerns/pg_full_text_searchable.rb b/app/models/concerns/pg_full_text_searchable.rb
index 612a9c5908b..68357c44300 100644
--- a/app/models/concerns/pg_full_text_searchable.rb
+++ b/app/models/concerns/pg_full_text_searchable.rb
@@ -21,7 +21,7 @@
module PgFullTextSearchable
extend ActiveSupport::Concern
- LONG_WORDS_REGEX = %r([A-Za-z0-9+/]{50,}).freeze
+ LONG_WORDS_REGEX = %r([A-Za-z0-9+/@]{50,}).freeze
TSVECTOR_MAX_LENGTH = 1.megabyte.freeze
TEXT_SEARCH_DICTIONARY = 'english'
diff --git a/app/views/admin/topics/_form.html.haml b/app/views/admin/topics/_form.html.haml
index 21a1d74a8c6..c40484ea494 100644
--- a/app/views/admin/topics/_form.html.haml
+++ b/app/views/admin/topics/_form.html.haml
@@ -27,7 +27,7 @@
= topic_icon(@topic, alt: _('Topic avatar'), class: 'avatar topic-avatar s90')
= render 'shared/choose_avatar_button', f: f
- if @topic.avatar?
- = link_to _('Remove avatar'), admin_topic_avatar_path(@topic), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'gl-button btn btn-danger-secondary gl-mt-2'
+ .js-remove-topic-avatar{ data: { path: admin_topic_avatar_path(@topic) } }
- if @topic.new_record?
.form-actions
diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml
index 10c48177ae4..d74b6c0639c 100644
--- a/app/views/projects/issues/index.html.haml
+++ b/app/views/projects/issues/index.html.haml
@@ -14,7 +14,7 @@
project_path: @project.full_path } }
- if Feature.enabled?(:vue_issues_list, @project&.group, default_enabled: :yaml)
- .js-issues-list{ data: project_issues_list_data(@project, current_user, finder) }
+ .js-issues-list{ data: project_issues_list_data(@project, current_user) }
- if @can_bulk_update
= render 'shared/issuable/bulk_update_sidebar', type: :issues
- elsif project_issues(@project).exists?
diff --git a/doc/administration/instance_limits.md b/doc/administration/instance_limits.md
index a14c16a5f7a..c7aa44f3a97 100644
--- a/doc/administration/instance_limits.md
+++ b/doc/administration/instance_limits.md
@@ -947,3 +947,7 @@ varies by file type:
If a branch is merged while open merge requests still point to it, GitLab can
retarget merge requests pointing to the now-merged branch. To learn more, read
[Branch retargeting on merge](../user/project/merge_requests/getting_started.md#branch-retargeting-on-merge).
+
+## CDN-based limits on GitLab.com
+
+In addition to application-based limits, GitLab.com is configured to use Cloudflare's standard DDoS protection and Spectrum to protect Git over SSH. Cloudflare terminates client TLS connections but is not application aware and cannot be used for limits tied to users or groups. Cloudflare page rules and rate limits are configured with Terraform. These configurations are [not public](https://about.gitlab.com/handbook/communication/#not-public) because they include security and abuse implementations that detect malicious activities and making them public would undermine those operations.
diff --git a/doc/administration/package_information/supported_os.md b/doc/administration/package_information/supported_os.md
index 71ebc4d3647..547b8bf8658 100644
--- a/doc/administration/package_information/supported_os.md
+++ b/doc/administration/package_information/supported_os.md
@@ -27,6 +27,7 @@ The following lists the currently supported OSs and their possible EOL dates.
| SLES 12 | GitLab EE 9.0.0 | x86_64 | Oct 2027 | <https://www.suse.com/lifecycle/> |
| Ubuntu 18.04 | GitLab CE / GitLab EE 10.7.0 | amd64 | April 2023 | <https://wiki.ubuntu.com/Releases> |
| Ubuntu 20.04 | GitLab CE / GitLab EE 13.2.0 | amd64, arm64 | April 2025 | <https://wiki.ubuntu.com/Releases> |
+| Amazon Linux 2 | GitLab CE / GitLab EE 14.9.0 | amd64, arm64 | June 2023 | <https://aws.amazon.com/amazon-linux-2/faqs> |
| Raspbian Buster | GitLab CE 12.2.0 | armhf | 2022 | <https://wiki.debian.org/DebianReleases#Production_Releases> |
NOTE:
diff --git a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
index 48399840300..1c948771f5b 100644
--- a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
+++ b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
@@ -1043,7 +1043,7 @@ This is needed for example in a known edge-case with
### Remove licenses
-To clean up the [License History table](../../user/admin_area/license.md#view-license-details-and-history):
+To clean up the [License History table](../../user/admin_area/license_file.md#view-license-details-and-history):
```ruby
TYPE = :trial?
diff --git a/doc/api/index.md b/doc/api/index.md
index 6cdf64a01af..178c2f05a6d 100644
--- a/doc/api/index.md
+++ b/doc/api/index.md
@@ -28,7 +28,7 @@ For an introduction and basic steps, see
## SCIM API **(PREMIUM SAAS)**
-GitLab provides an [SCIM API](scim.md) that both implements
+GitLab provides a [SCIM API](scim.md) that both implements
[the RFC7644 protocol](https://tools.ietf.org/html/rfc7644) and provides the
`/Users` endpoint. The base URL is `/api/scim/v2/groups/:group_path/Users/`.
diff --git a/doc/api/status_checks.md b/doc/api/status_checks.md
index 1a41454e621..3671ddbd138 100644
--- a/doc/api/status_checks.md
+++ b/doc/api/status_checks.md
@@ -44,11 +44,17 @@ GET /projects/:id/merge_requests/:merge_request_iid/status_checks
## Set status of an external status check
-> - Introduced in GitLab 14.9, `passed` status to pass external status checks.
+> - Introduced in GitLab 14.9, `passed` status to pass external status checks. Introduced [with a flag](../administration/feature_flags.md) named `status_checks_add_status_field`. Disabled by default.
+> - Introduced in GitLab 14.9, `failed` status to fail external status checks. Introduced [with a flag](../administration/feature_flags.md) named `status_checks_add_status_field`. Disabled by default.
> - `pass` status to pass checks is [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/339039) in GitLab 14.9. Replaced with `passed`.
+FLAG:
+On self-managed GitLab, by default setting `passed` instead of `pass` is unavailable. Also, setting `failed` is unavailable by default. To support
+setting `passed` and `failed` instead of only `pass`, ask an administrator to [enable the feature flag](../administration/feature_flags.md) named
+`status_checks_add_status_field`. On GitLab.com, this feature is not available.
+
For a single merge request, use the API to inform GitLab that a merge request has passed a check by an external service.
-To set the status of an external check, the personal access token used must belong to a user with at least the developer role on the target project of the merge request.
+To set the status of an external check, the personal access token used must belong to a user with at least the Developer role on the target project of the merge request.
Execute this API call as any user with rights to approve the merge request itself.
@@ -64,8 +70,8 @@ POST /projects/:id/merge_requests/:merge_request_iid/status_check_responses
| `merge_request_iid` | integer | yes | IID of a merge request |
| `sha` | string | yes | SHA at `HEAD` of the source branch |
| `external_status_check_id` | integer | yes | ID of an external status check |
-| `status` | string | no | Set to `passed` to pass the check or `failed` to fail it (GitLab 14.9 and later with feature flag enabled) |
-| `status` | string | no | Set to `pass` to pass the check (GitLab 14.0 to GitLab 14.8) |
+| `status` | string | no | Set to `passed` to pass the check or `failed` to fail it (GitLab 14.9 and later with feature flag `status_checks_add_status_field` enabled) |
+| `status` | string | no | Set to `pass` to pass the check (GitLab 14.0 to GitLab 14.8, and GitLab 14.9 and later with feature flag `status_checks_add_status_field` disabled) |
NOTE:
`sha` must be the SHA at the `HEAD` of the merge request's source branch.
diff --git a/doc/ci/pipelines/settings.md b/doc/ci/pipelines/settings.md
index 373244acbb9..7960d0afa85 100644
--- a/doc/ci/pipelines/settings.md
+++ b/doc/ci/pipelines/settings.md
@@ -190,6 +190,7 @@ You can define how long a job can run before it times out.
1. On the left sidebar, select **Settings > CI/CD**.
1. Expand **General pipelines**.
1. In the **Timeout** field, enter the number of minutes, or a human-readable value like `2 hours`.
+ Must be 10 minutes or more, and less than one month. Default is 60 minutes.
Jobs that exceed the timeout are marked as failed.
diff --git a/doc/ci/runners/configure_runners.md b/doc/ci/runners/configure_runners.md
index e5f2b818f9a..6b14cea51d6 100644
--- a/doc/ci/runners/configure_runners.md
+++ b/doc/ci/runners/configure_runners.md
@@ -23,15 +23,15 @@ if smaller than the [project defined timeout](../pipelines/settings.md#set-a-lim
This feature can be used to prevent your shared runner from being overwhelmed
by a project that has jobs with a long timeout (for example, one week).
-When not configured, runners do not override the project timeout.
-
On GitLab.com, you cannot override the job timeout for shared runners and must use the [project defined timeout](../pipelines/settings.md#set-a-limit-for-how-long-jobs-can-run).
To set the maximum job timeout:
1. In a project, go to **Settings > CI/CD > Runners**.
1. Select your specific runner to edit the settings.
-1. Enter a value under **Maximum job timeout**.
+1. Enter a value under **Maximum job timeout**. Must be 10 minutes or more. If not
+ defined, the [project's job timeout setting](../pipelines/settings.md#set-a-limit-for-how-long-jobs-can-run)
+ is used.
1. Select **Save changes**.
How this feature works:
diff --git a/doc/development/gitlab_diagram_overview.odg b/doc/development/gitlab_diagram_overview.odg
deleted file mode 100644
index 9bfc7313ff4..00000000000
--- a/doc/development/gitlab_diagram_overview.odg
+++ /dev/null
Binary files differ
diff --git a/doc/subscriptions/self_managed/index.md b/doc/subscriptions/self_managed/index.md
index 454efe38f78..d38b56bb1f8 100644
--- a/doc/subscriptions/self_managed/index.md
+++ b/doc/subscriptions/self_managed/index.md
@@ -255,8 +255,8 @@ to IP address `104.18.26.123:443` (`customers.gitlab.com`).
To subscribe to GitLab through a GitLab self-managed installation:
1. Go to the [Customers Portal](https://customers.gitlab.com/) and purchase a GitLab self-managed plan.
-1. After purchase, a license file is sent to the email address associated to the Customers Portal account,
- which must be [add to your GitLab instance](../../user/admin_area/license.md#activate-gitlab-ee-with-a-license-file-or-key).
+1. After purchase, an activation code is sent to the email address associated with the Customers Portal account.
+ You must [add this code to your GitLab instance](../../user/admin_area/license.md).
NOTE:
If you're purchasing a subscription for an existing **Free** GitLab self-managed
@@ -380,7 +380,7 @@ To add seats to a subscription:
The following items are emailed to you:
- A payment receipt. You can also access this information in the Customers Portal under [**View invoices**](https://customers.gitlab.com/receipts).
-- A new license. [Add this license](../../user/admin_area/license.md#activate-gitlab-ee-with-an-activation-code) to your instance to use it.
+- An activation code. [Add this code](../../user/admin_area/license.md) to your instance to use it.
### Renew a subscription
@@ -401,7 +401,7 @@ You can hover your mouse on the **Renew** button to see the date when it will be
1. Enter the number of [users over license](#users-over-license) in the second box for the user overage incurred in your previous subscription term.
1. Review your renewal details and complete the payment process.
1. An activation code for the renewal term is available on the [Manage Purchases](https://customers.gitlab.com/subscriptions) page on the relevant subscription card. Select **Copy activation code** to get a copy.
-1. [Add your new license](../../user/admin_area/license.md#activate-gitlab-ee-with-an-activation-code) to your instance.
+1. [Add the activation code](../../user/admin_area/license.md) to your instance.
An invoice is generated for the renewal and available for viewing or download on the [View invoices](https://customers.gitlab.com/receipts) page. If you have difficulty during the renewal process, contact our [support team](https://support.gitlab.com/hc/en-us/requests/new?ticket_form_id=360000071293) for assistance.
@@ -423,7 +423,7 @@ The following is emailed to you:
[**View invoices**](https://customers.gitlab.com/receipts).
- A new activation code for your license.
-[Add the new license](../../user/admin_area/license.md#activate-gitlab-ee-with-an-activation-code) to your instance.
+[Add the activation code](../../user/admin_area/license.md) to your instance.
The new tier takes effect when the new license is activated.
## Add or change the contacts for your subscription
diff --git a/doc/update/package/convert_to_ee.md b/doc/update/package/convert_to_ee.md
index fe3bc8090ab..d5a71ba3e80 100644
--- a/doc/update/package/convert_to_ee.md
+++ b/doc/update/package/convert_to_ee.md
@@ -92,7 +92,7 @@ The steps can be summed up to:
```
1. Now go to the GitLab admin panel of your server (`/admin/subscription`) and
- [add your license](../../user/admin_area/license.md#activate-gitlab-ee-with-an-activation-code).
+ [add your license](../../user/admin_area/license.md).
1. After you confirm that GitLab is working as expected, you may remove the old
Community Edition repository:
diff --git a/doc/user/admin_area/license.md b/doc/user/admin_area/license.md
index 94f56ecd750..bee784e850b 100644
--- a/doc/user/admin_area/license.md
+++ b/doc/user/admin_area/license.md
@@ -1,181 +1,57 @@
---
-stage: Growth
-group: Conversion
+stage: Fulfillment
+group: License
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# Activate GitLab Enterprise Edition (EE) **(PREMIUM SELF)**
-When you install a new GitLab instance without a license, it only has the Free features
-enabled. To enable all features of GitLab Enterprise Edition (EE), activate
-your instance with an activation code or a license file. When [the license expires](#what-happens-when-your-license-expires),
-some functionality is locked.
-
-## Verify your GitLab edition
-
-To activate your instance, make sure you are running GitLab Enterprise Edition (EE).
+When you install a new GitLab instance without a license, only Free features
+are enabled. To enable more features in GitLab Enterprise Edition (EE), activate
+your instance with an activation code.
-To verify the edition, sign in to GitLab and select
-**Help** (**{question-o}**) > **Help**. The GitLab edition and version are listed
-at the top of the page.
+## Activate GitLab EE
-If you are running GitLab Community Edition (CE), upgrade your installation to GitLab
-EE. For more details, see [Upgrading between editions](../../update/index.md#upgrading-between-editions).
-If you have questions or need assistance upgrading from GitLab CE to EE,
-[contact GitLab Support](https://about.gitlab.com/support/#contact-support).
+In GitLab Enterprise Edition 14.1 and later, you need an activation code to activate
+your instance.
-## Activate GitLab EE with an activation code
+Prerequisite:
-In GitLab Enterprise Edition 14.1 and later, you need an activation code to activate
-your instance. To get an activation code you have to [purchase a license](https://about.gitlab.com/pricing/).
-The activation code is a 24-character alphanumeric string you receive in a confirmation email.
-You can also sign in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in)
-to copy the activation code to your clipboard.
+- You must [purchase a subscription](https://about.gitlab.com/pricing/).
+- You must be running GitLab Enterprise Edition (EE).
+- You must have GitLab 14.1 or later.
+- Your instance must be connected to the internet.
To activate your instance with an activation code:
+1. Copy the activation code, a 24-character alphanumeric string, from either:
+ - Your subscription confirmation email.
+ - The [Customers Portal](https://customers.gitlab.com/customers/sign_in), on the **Manage Purchases** page.
1. Sign in to your GitLab self-managed instance.
1. On the top bar, select **Menu > Admin**.
1. On the left sidebar, select **Subscription**.
-1. Enter the activation code in **Activation code**.
+1. Paste the activation code in **Activation code**.
1. Read and accept the terms of service.
-1. Select **Add license**.
-
-## Activate GitLab EE with a license file or key
-
-If you receive a license file from GitLab (for example, for a trial), you can
-upload it to your instance or add it during installation. The license file is
-a base64-encoded ASCII text file with a `.gitlab-license` extension.
-
-The first time you sign in to your GitLab instance, a note with a
-link to the **Add license** page should be displayed.
-
-Otherwise, to add your license:
-
-1. Sign in to GitLab as an administrator.
-1. On the top bar, select **Menu > Admin**.
-1. On the left sidebar, select **Settings > General**.
-1. In the **License file** area, select **Add a license**.
-1. Add a license:
- - For a file, either:
- - Select **Upload `.gitlab-license` file**, then **Choose File** and
- select the license file from your local machine.
- - Drag and drop the license file to the **Drag your license file here** area.
- - For plain text, select **Enter license key** and paste the contents in
- **License key**.
-1. Select the **Terms of Service** checkbox.
-1. Select **Add license**.
-
-## Add your license during installation
-
-You can import a license file when you install GitLab.
-
-- **For installations from source**
- - Place the `Gitlab.gitlab-license` file in the `config/` directory.
- - To specify a custom location and filename for the license, set the
- `GITLAB_LICENSE_FILE` environment variable with the path to the file:
-
- ```shell
- export GITLAB_LICENSE_FILE="/path/to/license/file"
- ```
-
-- **For Omnibus package**
- - Place the `Gitlab.gitlab-license` file in the `/etc/gitlab/` directory.
- - To specify a custom location and filename for the license, add this entry to `gitlab.rb`:
-
- ```ruby
- gitlab_rails['initial_license_file'] = "/path/to/license/file"
- ```
-
-WARNING:
-These methods only add a license at the time of installation. To renew or upgrade
-a license, add the license in the **Admin Area** in the web user interface.
-
-## What happens when your license expires
-
-Fifteen days before the license expires, a notification banner with the upcoming expiration
-date displays to GitLab administrators.
-
-When your license expires, GitLab locks features, like Git pushes
-and issue creation. Your instance becomes read-only and
-an expiration message displays to all administrators. You have a 14-day grace period
-before this occurs.
-
-To resume functionality, [activate a new license](#activate-gitlab-ee-with-an-activation-code).
-
-To go back to Free features, [delete all expired licenses](#remove-a-license).
-
-## Remove a license
-
-To remove a license from a self-managed instance:
+1. Select **Activate**.
-1. On the top bar, select **Menu > Admin**.
-1. On the left sidebar, select **Subscription**.
-1. Select **Remove license**.
-
-Repeat these steps to remove all licenses, including those applied in the past.
-
-## View license details and history
-
-To view your license details:
-
-1. On the top bar, select **Menu > Admin**.
-1. On the left sidebar, select **Subscription**.
-
-You can add and view more than one license, but only the latest license in
-the current date range is the active license.
-
-When you add a future-dated license, it doesn't take effect until its applicable date.
-You can view all active subscriptions in the **Subscription history** table.
-
-You can also [export](../../subscriptions/self_managed/index.md) your license usage information to a CSV file.
-
-NOTE:
-In GitLab 13.6 and earlier, a banner about an expiring license may continue to display
-when you add a new license. This happens when the start date of the new license
-is in the future and the expiring one is still active.
-The banner disappears after the new license becomes active.
-
-## Troubleshooting
-
-### No Subscription area in the Admin Area
-
-You cannot add your license because there is no **Subscription** area.
-This issue might occur if:
-
-- You're running GitLab Community Edition. Before you add your license, you
- must [upgrade to Enterprise Edition](../../update/index.md#community-to-enterprise-edition).
-- You're using GitLab.com. You cannot add a self-managed license to GitLab.com.
- To use paid features on GitLab.com, [purchase a separate subscription](../../subscriptions/gitlab_com/index.md).
+The subscription is activated.
-### Users exceed license limit upon renewal
-
-GitLab displays a message prompting you to purchase
-additional users. This issue occurs if you add a license that does not have enough
-users to cover the number of users in your instance.
-
-To fix this issue, purchase additional seats to cover those users.
-For more information, read the [licensing FAQ](https://about.gitlab.com/pricing/licensing-faq/).
-
-In GitLab 14.2 and later, for instances that use a license file, the following
-rules apply:
-
-- If the users over license are less than or equal to 10% of the users in the license
- file, the license is applied and you pay the overage in the next renewal.
-- If the users over license are more than 10% of the users in the license file,
- you cannot apply the license without purchasing more users.
+If you have an offline or airgapped environment,
+[activate GitLab EE with a license file or key](license_file.md) instead.
-For example, if you purchase a license for 100 users, you can have 110 users when you add
-your license. However, if you have 111 users, you must purchase more users before you can add
-the license.
+If you have questions or need assistance activating your instance,
+[contact GitLab Support](https://about.gitlab.com/support/#contact-support).
-### Cannot activate instance due to connectivity error
+When [the license expires](license_file.md#what-happens-when-your-license-expires),
+some functionality is locked.
-In GitLab 14.1 and later, to activate your subscription with an activation code,
-your GitLab instance must be connected to the internet.
+## Verify your GitLab edition
-If you have an offline or airgapped environment,
-[activate GitLab EE with a license file or key](license.md#activate-gitlab-ee-with-a-license-file-or-key) instead.
+To verify the edition, sign in to GitLab and select
+**Help** (**{question-o}**) > **Help**. The GitLab edition and version are listed
+at the top of the page.
-If you have questions or need assistance activating your instance,
+If you are running GitLab Community Edition (CE), you can upgrade your installation to GitLab
+EE. For more details, see [Upgrading between editions](../../update/index.md#upgrading-between-editions).
+If you have questions or need assistance upgrading from GitLab CE to EE,
[contact GitLab Support](https://about.gitlab.com/support/#contact-support).
diff --git a/doc/user/admin_area/license_file.md b/doc/user/admin_area/license_file.md
new file mode 100644
index 00000000000..e0332e70681
--- /dev/null
+++ b/doc/user/admin_area/license_file.md
@@ -0,0 +1,127 @@
+---
+stage: Fulfillment
+group: License
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+---
+
+# Activate GitLab EE with a license file or key
+
+If you receive a license file from GitLab (for example, for a trial), you can
+upload it to your instance or add it during installation. The license file is
+a base64-encoded ASCII text file with a `.gitlab-license` extension.
+
+The first time you sign in to your GitLab instance, a note with a
+link to the **Add license** page should be displayed.
+
+Otherwise, to add your license:
+
+1. Sign in to GitLab as an administrator.
+1. On the top bar, select **Menu > Admin**.
+1. On the left sidebar, select **Settings > General**.
+1. In the **License file** area, select **Add a license**.
+1. Add a license by either uploading the file or pasting the key.
+1. Select the **Terms of Service** checkbox.
+1. Select **Add license**.
+
+## Add your license during installation
+
+You can import a license file when you install GitLab.
+
+- **For installations from source**
+ - Place the `Gitlab.gitlab-license` file in the `config/` directory.
+ - To specify a custom location and filename for the license, set the
+ `GITLAB_LICENSE_FILE` environment variable with the path to the file:
+
+ ```shell
+ export GITLAB_LICENSE_FILE="/path/to/license/file"
+ ```
+
+- **For Omnibus package**
+ - Place the `Gitlab.gitlab-license` file in the `/etc/gitlab/` directory.
+ - To specify a custom location and filename for the license, add this entry to `gitlab.rb`:
+
+ ```ruby
+ gitlab_rails['initial_license_file'] = "/path/to/license/file"
+ ```
+
+WARNING:
+These methods only add a license at the time of installation. To renew or upgrade
+a license, add the license in the **Admin Area** in the web user interface.
+
+## What happens when your license expires
+
+Fifteen days before the license expires, a notification banner with the upcoming expiration
+date displays to GitLab administrators.
+
+When your license expires, GitLab locks features, like Git pushes
+and issue creation. Your instance becomes read-only and
+an expiration message displays to all administrators. You have a 14-day grace period
+before this occurs.
+
+To resume functionality, activate a new subscription.
+
+To go back to Free features, [delete all expired licenses](#remove-a-license).
+
+## Remove a license
+
+To remove a license from a self-managed instance:
+
+1. On the top bar, select **Menu > Admin**.
+1. On the left sidebar, select **Subscription**.
+1. Select **Remove license**.
+
+Repeat these steps to remove all licenses, including those applied in the past.
+
+## View license details and history
+
+To view your license details:
+
+1. On the top bar, select **Menu > Admin**.
+1. On the left sidebar, select **Subscription**.
+
+You can add and view more than one license, but only the latest license in
+the current date range is the active license.
+
+When you add a future-dated license, it doesn't take effect until its applicable date.
+You can view all active subscriptions in the **Subscription history** table.
+
+You can also [export](../../subscriptions/self_managed/index.md) your license usage information to a CSV file.
+
+NOTE:
+In GitLab 13.6 and earlier, a banner about an expiring license may continue to display
+when you add a new license. This happens when the start date of the new license
+is in the future and the expiring one is still active.
+The banner disappears after the new license becomes active.
+
+## Troubleshooting
+
+### No Subscription area in the Admin Area
+
+You cannot add your license because there is no **Subscription** area.
+This issue might occur if:
+
+- You're running GitLab Community Edition. Before you add your license, you
+ must [upgrade to Enterprise Edition](../../update/index.md#community-to-enterprise-edition).
+- You're using GitLab.com. You cannot add a self-managed license to GitLab.com.
+ To use paid features on GitLab.com, [purchase a separate subscription](../../subscriptions/gitlab_com/index.md).
+
+### Users exceed license limit upon renewal
+
+GitLab displays a message prompting you to purchase
+additional users. This issue occurs if you add a license that does not have enough
+users to cover the number of users in your instance.
+
+To fix this issue, purchase additional seats to cover those users.
+For more information, read the [licensing FAQ](https://about.gitlab.com/pricing/licensing-faq/).
+
+In GitLab 14.2 and later, for instances that use a license file, the following
+rules apply:
+
+- If the users over license are less than or equal to 10% of the users in the license
+ file, the license is applied and you pay the overage in the next renewal.
+- If the users over license are more than 10% of the users in the license file,
+ you cannot apply the license without purchasing more users.
+
+For example, if you purchase a license for 100 users, you can have 110 users when you add
+your license. However, if you have 111 users, you must purchase more users before you can add
+the license.
diff --git a/lib/gitlab/background_migration/backfill_issue_search_data.rb b/lib/gitlab/background_migration/backfill_issue_search_data.rb
index 82722fe1dc3..ec206cbfd41 100644
--- a/lib/gitlab/background_migration/backfill_issue_search_data.rb
+++ b/lib/gitlab/background_migration/backfill_issue_search_data.rb
@@ -29,7 +29,7 @@ module Gitlab
SELECT
project_id,
id,
- setweight(to_tsvector('english', LEFT(title, 255)), 'A') || setweight(to_tsvector('english', LEFT(REGEXP_REPLACE(description, '[A-Za-z0-9+/]{50,}', ' ', 'g'), 1048576)), 'B'),
+ setweight(to_tsvector('english', LEFT(title, 255)), 'A') || setweight(to_tsvector('english', LEFT(REGEXP_REPLACE(description, '[A-Za-z0-9+/@]{50,}', ' ', 'g'), 1048576)), 'B'),
NOW(),
NOW()
FROM issues
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index cb1c80354ee..e86ca43d657 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -9354,6 +9354,9 @@ msgstr ""
msgid "Confirm new password"
msgstr ""
+msgid "Confirm remove avatar"
+msgstr ""
+
msgid "Confirm user"
msgstr ""
diff --git a/spec/frontend/admin/topics/components/__snapshots__/remove_avatar_spec.js.snap b/spec/frontend/admin/topics/components/__snapshots__/remove_avatar_spec.js.snap
new file mode 100644
index 00000000000..00f742c3614
--- /dev/null
+++ b/spec/frontend/admin/topics/components/__snapshots__/remove_avatar_spec.js.snap
@@ -0,0 +1,20 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`RemoveAvatar the modal component form matches the snapshot 1`] = `
+<form
+ action="topic/path/1"
+ method="post"
+>
+ <input
+ name="_method"
+ type="hidden"
+ value="delete"
+ />
+
+ <input
+ name="authenticity_token"
+ type="hidden"
+ value="mock-csrf-token"
+ />
+</form>
+`;
diff --git a/spec/frontend/admin/topics/components/remove_avatar_spec.js b/spec/frontend/admin/topics/components/remove_avatar_spec.js
new file mode 100644
index 00000000000..d4656f0a199
--- /dev/null
+++ b/spec/frontend/admin/topics/components/remove_avatar_spec.js
@@ -0,0 +1,85 @@
+import { GlButton, GlModal } from '@gitlab/ui';
+import { shallowMount } from '@vue/test-utils';
+import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
+import RemoveAvatar from '~/admin/topics/components/remove_avatar.vue';
+
+const modalID = 'fake-id';
+const path = 'topic/path/1';
+
+jest.mock('lodash/uniqueId', () => () => 'fake-id');
+jest.mock('~/lib/utils/csrf', () => ({ token: 'mock-csrf-token' }));
+
+describe('RemoveAvatar', () => {
+ let wrapper;
+
+ const createComponent = () => {
+ wrapper = shallowMount(RemoveAvatar, {
+ provide: {
+ path,
+ },
+ directives: {
+ GlModal: createMockDirective(),
+ },
+ });
+ };
+
+ const findButton = () => wrapper.findComponent(GlButton);
+ const findModal = () => wrapper.findComponent(GlModal);
+ const findForm = () => wrapper.find('form');
+
+ beforeEach(() => {
+ createComponent();
+ });
+
+ afterEach(() => {
+ wrapper.destroy();
+ });
+
+ describe('the button component', () => {
+ it('displays the remove button', () => {
+ const button = findButton();
+
+ expect(button.exists()).toBe(true);
+ expect(button.text()).toBe('Remove avatar');
+ });
+
+ it('contains the correct modal ID', () => {
+ const buttonModalId = getBinding(findButton().element, 'gl-modal').value;
+
+ expect(buttonModalId).toBe(modalID);
+ });
+ });
+
+ describe('the modal component', () => {
+ it('displays the modal component', () => {
+ const modal = findModal();
+
+ expect(modal.exists()).toBe(true);
+ expect(modal.props('title')).toBe('Confirm remove avatar');
+ expect(modal.text()).toBe('Avatar will be removed. Are you sure?');
+ });
+
+ it('contains the correct modal ID', () => {
+ expect(findModal().props('modalId')).toBe(modalID);
+ });
+
+ describe('form', () => {
+ it('matches the snapshot', () => {
+ expect(findForm().element).toMatchSnapshot();
+ });
+
+ describe('form submission', () => {
+ let formSubmitSpy;
+
+ beforeEach(() => {
+ formSubmitSpy = jest.spyOn(wrapper.vm.$refs.deleteForm, 'submit');
+ findModal().vm.$emit('primary');
+ });
+
+ it('submits the form on the modal primary action', () => {
+ expect(formSubmitSpy).toHaveBeenCalled();
+ });
+ });
+ });
+ });
+});
diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb
index 010deae24db..a85b1bd0a48 100644
--- a/spec/helpers/issues_helper_spec.rb
+++ b/spec/helpers/issues_helper_spec.rb
@@ -277,9 +277,7 @@ RSpec.describe IssuesHelper do
shared_examples 'issues list data' do
it 'returns expected result' do
- finder = double.as_null_object
allow(helper).to receive(:current_user).and_return(current_user)
- allow(helper).to receive(:finder).and_return(finder)
allow(helper).to receive(:can?).and_return(true)
allow(helper).to receive(:image_path).and_return('#')
allow(helper).to receive(:import_csv_namespace_project_issues_path).and_return('#')
@@ -308,7 +306,7 @@ RSpec.describe IssuesHelper do
jira_integration_path: help_page_url('integration/jira/issues', anchor: 'view-jira-issues'),
markdown_help_path: help_page_path('user/markdown'),
max_attachment_size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes),
- new_issue_path: new_project_issue_path(project, issue: { milestone_id: finder.milestones.first.id }),
+ new_issue_path: new_project_issue_path(project),
project_import_jira_path: project_import_jira_path(project),
quick_actions_help_path: help_page_path('user/project/quick_actions'),
releases_path: project_releases_path(project, format: :json),
@@ -318,7 +316,7 @@ RSpec.describe IssuesHelper do
sign_in_path: new_user_session_path
}
- expect(helper.project_issues_list_data(project, current_user, finder)).to include(expected)
+ expect(helper.project_issues_list_data(project, current_user)).to include(expected)
end
end
diff --git a/spec/models/concerns/pg_full_text_searchable_spec.rb b/spec/models/concerns/pg_full_text_searchable_spec.rb
index 50a97e873a5..db7f652f494 100644
--- a/spec/models/concerns/pg_full_text_searchable_spec.rb
+++ b/spec/models/concerns/pg_full_text_searchable_spec.rb
@@ -115,6 +115,21 @@ RSpec.describe PgFullTextSearchable do
end
end
+ context 'with long words' do
+ let(:model) { model_class.create!(project: project, title: 'title ' + 'long/sequence+1' * 4, description: 'description ' + '@user1' * 20) }
+
+ it 'strips words that are 50 characters or longer' do
+ model.update_search_data!
+
+ expect(model.search_data.search_vector).to match(/'titl':1A/)
+ expect(model.search_data.search_vector).not_to match(/long/)
+ expect(model.search_data.search_vector).not_to match(/sequence/)
+
+ expect(model.search_data.search_vector).to match(/'descript':2B/)
+ expect(model.search_data.search_vector).not_to match(/@user1/)
+ end
+ end
+
context 'when upsert times out' do
it 're-raises the exception' do
expect(Issues::SearchData).to receive(:upsert).once.and_raise(ActiveRecord::StatementTimeout)
diff --git a/spec/support/helpers/terms_helper.rb b/spec/support/helpers/terms_helper.rb
index b71307a4d6d..2547ea62e37 100644
--- a/spec/support/helpers/terms_helper.rb
+++ b/spec/support/helpers/terms_helper.rb
@@ -19,3 +19,5 @@ module TermsHelper
expect(page).to have_content('Please accept the Terms of Service before continuing.')
end
end
+
+TermsHelper.prepend_mod