Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-22 15:12:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-22 15:12:04 +0300
commit03529a126f230d59e8528c4814f240fd761f286d (patch)
tree33ab4f22709ff994cce0a4e1b9f12a6098115102
parent32a829445c8cd9e542acbf3168e0592ea8bdf323 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--GITALY_SERVER_VERSION2
-rw-r--r--app/assets/javascripts/vue_shared/directives/validation.js17
-rw-r--r--app/models/ci/build_metadata.rb4
-rw-r--r--app/models/custom_emoji.rb2
-rw-r--r--app/models/customer_relations/contact.rb2
-rw-r--r--app/models/customer_relations/organization.rb2
-rw-r--r--app/models/members/group_member.rb2
-rw-r--r--app/models/namespace.rb6
-rw-r--r--app/models/packages/composer/cache_file.rb2
-rw-r--r--app/models/project.rb4
-rw-r--r--db/post_migrate/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata.rb17
-rw-r--r--db/schema_migrations/202109070139441
-rw-r--r--db/structure.sql24
-rw-r--r--doc/administration/package_information/index.md30
-rw-r--r--doc/administration/raketasks/check.md2
-rw-r--r--doc/api/projects.md28
-rw-r--r--doc/api/users.md42
-rw-r--r--doc/install/openshift_and_gitlab/index.md507
-rw-r--r--doc/integration/elasticsearch.md2
-rw-r--r--doc/operations/metrics/embed_grafana.md2
-rw-r--r--doc/public_access/public_access.md2
-rw-r--r--doc/raketasks/user_management.md2
-rw-r--r--doc/security/information_exclusivity.md2
-rw-r--r--doc/security/reset_user_password.md4
-rw-r--r--doc/user/admin_area/license.md2
-rw-r--r--doc/user/group/saml_sso/index.md12
-rw-r--r--doc/user/profile/account/create_accounts.md10
-rw-r--r--doc/user/project/integrations/img/zentao_product_id.pngbin40486 -> 0 bytes
-rw-r--r--doc/user/project/integrations/overview.md1
-rw-r--r--doc/user/project/integrations/zentao.md40
-rw-r--r--doc/user/project/merge_requests/approvals/rules.md2
-rw-r--r--doc/user/project/working_with_projects.md6
-rw-r--r--doc/user/workspace/index.md11
-rw-r--r--locale/gitlab.pot12
-rw-r--r--package.json2
-rw-r--r--spec/factories/groups.rb2
-rw-r--r--spec/frontend/vue_shared/directives/validation_spec.js137
-rw-r--r--spec/migrations/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata_spec.rb23
-rw-r--r--spec/models/namespace_spec.rb38
-rw-r--r--yarn.lock8
40 files changed, 317 insertions, 697 deletions
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index 2beb4cb099e..156ef774529 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-bdd6fb3bb684094932da2dfd01f9c6bc2b7eb63b
+a47a975ef7d4ef51e0d68c5662d5cb3bb5b83b76
diff --git a/app/assets/javascripts/vue_shared/directives/validation.js b/app/assets/javascripts/vue_shared/directives/validation.js
index 692f2769b88..779b04dc2bd 100644
--- a/app/assets/javascripts/vue_shared/directives/validation.js
+++ b/app/assets/javascripts/vue_shared/directives/validation.js
@@ -1,4 +1,3 @@
-import { merge } from 'lodash';
import { s__ } from '~/locale';
/**
@@ -21,8 +20,15 @@ const defaultFeedbackMap = {
},
};
-const getFeedbackForElement = (feedbackMap, el) =>
- Object.values(feedbackMap).find((f) => f.isInvalid(el))?.message || el.validationMessage;
+const getFeedbackForElement = (feedbackMap, el) => {
+ const field = Object.values(feedbackMap).find((f) => f.isInvalid(el));
+ let elMessage = null;
+ if (field) {
+ elMessage = el.getAttribute('validation-message');
+ }
+
+ return field?.message || elMessage || el.validationMessage;
+};
const focusFirstInvalidInput = (e) => {
const { target: formEl } = e;
@@ -68,6 +74,7 @@ const createValidator = (context, feedbackMap) => ({ el, reportInvalidInput = fa
/**
* Takes an object that allows to add or change custom feedback messages.
+ * See possibilities here: https://developer.mozilla.org/en-US/docs/Web/API/ValidityState
*
* The passed in object will be merged with the built-in feedback
* so it is possible to override a built-in message.
@@ -75,7 +82,7 @@ const createValidator = (context, feedbackMap) => ({ el, reportInvalidInput = fa
* @example
* validate({
* tooLong: {
- * check: el => el.validity.tooLong === true,
+ * isInvalid: el => el.validity.tooLong === true,
* message: 'Your custom feedback'
* }
* })
@@ -91,7 +98,7 @@ const createValidator = (context, feedbackMap) => ({ el, reportInvalidInput = fa
* @returns {{ inserted: function, update: function }} validateDirective
*/
export default function initValidation(customFeedbackMap = {}) {
- const feedbackMap = merge(defaultFeedbackMap, customFeedbackMap);
+ const feedbackMap = { ...defaultFeedbackMap, ...customFeedbackMap };
const elDataMap = new WeakMap();
return {
diff --git a/app/models/ci/build_metadata.rb b/app/models/ci/build_metadata.rb
index 90237a4be52..0d6d6f7a6a5 100644
--- a/app/models/ci/build_metadata.rb
+++ b/app/models/ci/build_metadata.rb
@@ -37,8 +37,8 @@ module Ci
job_timeout_source: 4
}
- ignore_column :build_id_convert_to_bigint, remove_with: '14.2', remove_after: '2021-08-22'
- ignore_columns :id_convert_to_bigint, remove_with: '14.3', remove_after: '2021-09-22'
+ ignore_column :build_id_convert_to_bigint, remove_with: '14.5', remove_after: '2021-10-22'
+ ignore_columns :id_convert_to_bigint, remove_with: '14.5', remove_after: '2021-10-22'
def update_timeout_state
timeout = timeout_with_highest_precedence
diff --git a/app/models/custom_emoji.rb b/app/models/custom_emoji.rb
index aea48a5ec20..ecdac64b31b 100644
--- a/app/models/custom_emoji.rb
+++ b/app/models/custom_emoji.rb
@@ -5,7 +5,7 @@ class CustomEmoji < ApplicationRecord
belongs_to :namespace, inverse_of: :custom_emoji
- belongs_to :group, -> { where(type: 'Group') }, foreign_key: 'namespace_id'
+ belongs_to :group, -> { where(type: Group.sti_name) }, foreign_key: 'namespace_id'
belongs_to :creator, class_name: "User", inverse_of: :created_custom_emoji
# For now only external emoji are supported. See https://gitlab.com/gitlab-org/gitlab/-/issues/230467
diff --git a/app/models/customer_relations/contact.rb b/app/models/customer_relations/contact.rb
index aaa7e2ae175..d4a18bdfa04 100644
--- a/app/models/customer_relations/contact.rb
+++ b/app/models/customer_relations/contact.rb
@@ -5,7 +5,7 @@ class CustomerRelations::Contact < ApplicationRecord
self.table_name = "customer_relations_contacts"
- belongs_to :group, -> { where(type: 'Group') }, foreign_key: 'group_id'
+ belongs_to :group, -> { where(type: Group.sti_name) }, foreign_key: 'group_id'
belongs_to :organization, optional: true
strip_attributes! :phone, :first_name, :last_name
diff --git a/app/models/customer_relations/organization.rb b/app/models/customer_relations/organization.rb
index a18d3ab8148..c206d1e05f5 100644
--- a/app/models/customer_relations/organization.rb
+++ b/app/models/customer_relations/organization.rb
@@ -5,7 +5,7 @@ class CustomerRelations::Organization < ApplicationRecord
self.table_name = "customer_relations_organizations"
- belongs_to :group, -> { where(type: 'Group') }, foreign_key: 'group_id'
+ belongs_to :group, -> { where(type: Group.sti_name) }, foreign_key: 'group_id'
strip_attributes! :name
diff --git a/app/models/members/group_member.rb b/app/models/members/group_member.rb
index a13133c90e9..55e565e1cb6 100644
--- a/app/models/members/group_member.rb
+++ b/app/models/members/group_member.rb
@@ -43,7 +43,7 @@ class GroupMember < Member
# Because source_type is `Namespace`...
def real_source_type
- 'Group'
+ Group.sti_name
end
def notifiable_options
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 2f5219b6fdb..61f7aa2c267 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -138,11 +138,11 @@ class Namespace < ApplicationRecord
class << self
def sti_class_for(type_name)
case type_name
- when 'Group'
+ when Group.sti_name
Group
- when 'Project'
+ when Namespaces::ProjectNamespace.sti_name
Namespaces::ProjectNamespace
- when 'User'
+ when Namespaces::UserNamespace.sti_name
# TODO: We create a normal Namespace until
# https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68894 is ready
Namespace
diff --git a/app/models/packages/composer/cache_file.rb b/app/models/packages/composer/cache_file.rb
index ecd7596b989..15a6dd59925 100644
--- a/app/models/packages/composer/cache_file.rb
+++ b/app/models/packages/composer/cache_file.rb
@@ -9,7 +9,7 @@ module Packages
mount_file_store_uploader Packages::Composer::CacheUploader
- belongs_to :group, -> { where(type: 'Group') }, foreign_key: 'namespace_id'
+ belongs_to :group, -> { where(type: Group.sti_name) }, foreign_key: 'namespace_id'
belongs_to :namespace
validates :namespace, presence: true
diff --git a/app/models/project.rb b/app/models/project.rb
index 353d9ce2657..5cc5d31d4ec 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -159,7 +159,7 @@ class Project < ApplicationRecord
# Relations
belongs_to :pool_repository
belongs_to :creator, class_name: 'User'
- belongs_to :group, -> { where(type: 'Group') }, foreign_key: 'namespace_id'
+ belongs_to :group, -> { where(type: Group.sti_name) }, foreign_key: 'namespace_id'
belongs_to :namespace
# Sync deletion via DB Trigger to ensure we do not have
# a project without a project_namespace (or vice-versa)
@@ -852,7 +852,7 @@ class Project < ApplicationRecord
end
def group_ids
- joins(:namespace).where(namespaces: { type: 'Group' }).select(:namespace_id)
+ joins(:namespace).where(namespaces: { type: Group.sti_name }).select(:namespace_id)
end
# Returns ids of projects with issuables available for given user
diff --git a/db/post_migrate/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata.rb b/db/post_migrate/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata.rb
new file mode 100644
index 00000000000..54dce0a7da8
--- /dev/null
+++ b/db/post_migrate/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class CleanupBigintConversionForCiBuildsMetadata < Gitlab::Database::Migration[1.0]
+ enable_lock_retries!
+
+ TABLE = :ci_builds_metadata
+
+ def up
+ cleanup_conversion_of_integer_to_bigint(TABLE, :id)
+ cleanup_conversion_of_integer_to_bigint(TABLE, :build_id)
+ end
+
+ def down
+ restore_conversion_of_integer_to_bigint(TABLE, :build_id)
+ restore_conversion_of_integer_to_bigint(TABLE, :id)
+ end
+end
diff --git a/db/schema_migrations/20210907013944 b/db/schema_migrations/20210907013944
new file mode 100644
index 00000000000..97cf6ef7b2f
--- /dev/null
+++ b/db/schema_migrations/20210907013944
@@ -0,0 +1 @@
+1a449d347248cacae48d10340c5682abe6de57d2991712f4e0a39c921892e0c5 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 86480778321..967ba5bc096 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -77,24 +77,6 @@ RETURN NULL;
END
$$;
-CREATE FUNCTION trigger_542d6c2ad72e() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
-BEGIN
- NEW."id_convert_to_bigint" := NEW."id";
- RETURN NEW;
-END;
-$$;
-
-CREATE FUNCTION trigger_8487d4de3e7b() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
-BEGIN
- NEW."build_id_convert_to_bigint" := NEW."build_id";
- RETURN NEW;
-END;
-$$;
-
CREATE FUNCTION trigger_91dc388a5fe6() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -11385,8 +11367,6 @@ CREATE SEQUENCE ci_builds_id_seq
ALTER SEQUENCE ci_builds_id_seq OWNED BY ci_builds.id;
CREATE TABLE ci_builds_metadata (
- id_convert_to_bigint integer DEFAULT 0 NOT NULL,
- build_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
project_id integer NOT NULL,
timeout integer,
timeout_source integer DEFAULT 1 NOT NULL,
@@ -27357,10 +27337,6 @@ ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_p
ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63_pkey;
-CREATE TRIGGER trigger_542d6c2ad72e BEFORE INSERT OR UPDATE ON ci_builds_metadata FOR EACH ROW EXECUTE FUNCTION trigger_542d6c2ad72e();
-
-CREATE TRIGGER trigger_8487d4de3e7b BEFORE INSERT OR UPDATE ON ci_builds_metadata FOR EACH ROW EXECUTE FUNCTION trigger_8487d4de3e7b();
-
CREATE TRIGGER trigger_91dc388a5fe6 BEFORE INSERT OR UPDATE ON dep_ci_build_trace_sections FOR EACH ROW EXECUTE FUNCTION trigger_91dc388a5fe6();
CREATE TRIGGER trigger_aebe8b822ad3 BEFORE INSERT OR UPDATE ON taggings FOR EACH ROW EXECUTE FUNCTION trigger_aebe8b822ad3();
diff --git a/doc/administration/package_information/index.md b/doc/administration/package_information/index.md
index e18fb621b89..25a1487bff4 100644
--- a/doc/administration/package_information/index.md
+++ b/doc/administration/package_information/index.md
@@ -4,7 +4,7 @@ group: Distribution
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/#designated-technical-writers
---
-# Package information
+# Package information **(FREE SELF)**
The Omnibus GitLab package is bundled with all dependencies required for GitLab
to function correctly. More details can be found
@@ -15,10 +15,10 @@ at [bundling dependencies document](omnibus_packages.md).
The released package versions are in the format `MAJOR.MINOR.PATCH-EDITION.OMNIBUS_RELEASE`
| Component | Meaning | Example |
-| --------- | ------- | ------- |
-| MAJOR.MINOR.PATCH | The GitLab version this corresponds to | 13.3.0 |
-| EDITION | The edition of GitLab this corresponds to | ee |
-| OMNIBUS_RELEASE | The omnibus release. Usually, this will be 0. This will be incremented if we need to build a new package without changing the GitLab version. | 0 |
+|-------------------|---------|---------|
+| MAJOR.MINOR.PATCH | The GitLab version this corresponds to. | 13.3.0 |
+| EDITION | The edition of GitLab this corresponds to. | ee |
+| OMNIBUS_RELEASE | The Omnibus GitLab release. Usually, this will be 0. This is incremented if we need to build a new package without changing the GitLab version. | 0 |
## Licenses
@@ -26,23 +26,22 @@ See [licensing](licensing.md)
## Defaults
-The Omnibus GitLab package requires various configuration to get the
-components in working order.
-If the configuration is not provided, the package will use the default
-values assumed in the package.
+The Omnibus GitLab package requires various configuration to get the components
+in working order. If the configuration is not provided, the package will use
+the default values assumed in the package.
These defaults are noted in the package [defaults document](defaults.md).
## Checking the versions of bundled software
-Once the Omnibus GitLab package is installed, all versions of the bundled
+After the Omnibus GitLab package is installed, all versions of the bundled
libraries are located in `/opt/gitlab/version-manifest.txt`.
If you don't have the package installed, you can always check the Omnibus GitLab
[source repository](https://gitlab.com/gitlab-org/omnibus-gitlab/tree/master), specifically the
[config directory](https://gitlab.com/gitlab-org/omnibus-gitlab/tree/master/config).
-For example, if you take a look at the `8-6-stable` branch, you can conclude that
+For example, if you examine the `8-6-stable` branch, you can conclude that
8.6 packages were running [Ruby 2.1.8](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/8-6-stable/config/projects/gitlab.rb#L48).
Or, that 8.5 packages were bundled with [NGINX 1.9.0](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/8-5-stable/config/software/nginx.rb#L20).
@@ -70,11 +69,10 @@ To view a diff between your configuration file and the latest version, run:
sudo gitlab-ctl diff-config
```
-_**Note:** This command is available from GitLab 8.17_
-
-**Important:** If you are copy-pasting the output of this command into your
-`/etc/gitlab/gitlab.rb` configuration file, make sure to omit leading `+` and `-`
-on each line.
+WARNING:
+If you are pasting the output of this command into your
+`/etc/gitlab/gitlab.rb` configuration file, omit any leading `+` and `-`
+characters on each line.
## Init system detection
diff --git a/doc/administration/raketasks/check.md b/doc/administration/raketasks/check.md
index 7cd7ecc26f7..60c9f04fc35 100644
--- a/doc/administration/raketasks/check.md
+++ b/doc/administration/raketasks/check.md
@@ -105,7 +105,7 @@ Optionally, specific project IDs can be checksummed by setting an environment
variable `CHECKSUM_PROJECT_IDS` with a list of comma-separated integers, for example:
```shell
-CHECKSUM_PROJECT_IDS="1,3" sudo gitlab-rake gitlab:git:checksum_projects
+sudo CHECKSUM_PROJECT_IDS="1,3" gitlab-rake gitlab:git:checksum_projects
```
## Uploaded files integrity
diff --git a/doc/api/projects.md b/doc/api/projects.md
index 29e3cdf6cbf..a5f4250b2e6 100644
--- a/doc/api/projects.md
+++ b/doc/api/projects.md
@@ -53,10 +53,10 @@ GET /projects
| `last_activity_before` | datetime | **{dotted-circle}** No | Limit results to projects with last_activity before specified time. Format: ISO 8601 (`YYYY-MM-DDTHH:MM:SSZ`) |
| `membership` | boolean | **{dotted-circle}** No | Limit by projects that the current user is a member of. |
| `min_access_level` | integer | **{dotted-circle}** No | Limit by current user minimal [access level](members.md#valid-access-levels). |
-| `order_by` | string | **{dotted-circle}** No | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, `last_activity_at`, or `similarity` fields. `repository_size`, `storage_size`, `packages_size` or `wiki_size` fields are only allowed for admins. `similarity` ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/332890) in GitLab 14.1) is only available when searching and is limited to projects that the current user is a member of. Default is `created_at`. |
+| `order_by` | string | **{dotted-circle}** No | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, `last_activity_at`, or `similarity` fields. `repository_size`, `storage_size`, `packages_size` or `wiki_size` fields are only allowed for administrators. `similarity` ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/332890) in GitLab 14.1) is only available when searching and is limited to projects that the current user is a member of. Default is `created_at`. |
| `owned` | boolean | **{dotted-circle}** No | Limit by projects explicitly owned by the current user. |
| `repository_checksum_failed` **(PREMIUM)** | boolean | **{dotted-circle}** No | Limit projects where the repository checksum calculation has failed ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/6137) in GitLab 11.2). |
-| `repository_storage` | string | **{dotted-circle}** No | Limit results to projects stored on `repository_storage`. _(admins only)_ |
+| `repository_storage` | string | **{dotted-circle}** No | Limit results to projects stored on `repository_storage`. _(administrators only)_ |
| `search_namespaces` | boolean | **{dotted-circle}** No | Include ancestor namespaces when matching search criteria. Default is `false`. |
| `search` | string | **{dotted-circle}** No | Return list of projects matching the search criteria. |
| `simple` | boolean | **{dotted-circle}** No | Return only limited fields for each project. This is a no-op without authentication as then _only_ simple fields are returned. |
@@ -66,7 +66,7 @@ GET /projects
| `topic` | string | **{dotted-circle}** No | Comma-separated topic names. Limit results to projects that match all of given topics. See `topics` attribute. |
| `visibility` | string | **{dotted-circle}** No | Limit by visibility `public`, `internal`, or `private`. |
| `wiki_checksum_failed` **(PREMIUM)** | boolean | **{dotted-circle}** No | Limit projects where the wiki checksum calculation has failed ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/6137) in GitLab 11.2). |
-| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(admins only)_ |
+| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(administrator only)_ |
| `with_issues_enabled` | boolean | **{dotted-circle}** No | Limit by enabled issues feature. |
| `with_merge_requests_enabled` | boolean | **{dotted-circle}** No | Limit by enabled merge requests feature. |
| `with_programming_language` | string | **{dotted-circle}** No | Limit by projects which use the given programming language. |
@@ -386,7 +386,7 @@ GET /users/:user_id/projects
| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Only available to Reporter or higher level role members. |
| `user_id` | string | **{check-circle}** Yes | The ID or username of the user. |
| `visibility` | string | **{dotted-circle}** No | Limit by visibility `public`, `internal`, or `private`. |
-| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(admins only)_ |
+| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(administrator only)_ |
| `with_issues_enabled` | boolean | **{dotted-circle}** No | Limit by enabled issues feature. |
| `with_merge_requests_enabled` | boolean | **{dotted-circle}** No | Limit by enabled merge requests feature. |
| `with_programming_language` | string | **{dotted-circle}** No | Limit by projects which use the given programming language. |
@@ -621,7 +621,7 @@ GET /users/:user_id/starred_projects
| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Only available to Reporter or higher level role members. |
| `user_id` | string | **{check-circle}** Yes | The ID or username of the user. |
| `visibility` | string | **{dotted-circle}** No | Limit by visibility `public`, `internal`, or `private`. |
-| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(admins only)_ |
+| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(administrator only)_ |
| `with_issues_enabled` | boolean | **{dotted-circle}** No | Limit by enabled issues feature. |
| `with_merge_requests_enabled` | boolean | **{dotted-circle}** No | Limit by enabled merge requests feature. |
@@ -840,7 +840,7 @@ GET /projects/:id
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding). |
| `license` | boolean | **{dotted-circle}** No | Include project license data. |
| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Only available to Reporter or higher level role members. |
-| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(admins only)_ |
+| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(administrators only)_ |
```json
{
@@ -1218,7 +1218,7 @@ POST /projects
| `public_builds` | boolean | **{dotted-circle}** No | If `true`, jobs can be viewed by non-project members. |
| `remove_source_branch_after_merge` | boolean | **{dotted-circle}** No | Enable `Delete source branch` option by default for all new merge requests. |
| `repository_access_level` | string | **{dotted-circle}** No | One of `disabled`, `private`, or `enabled`. |
-| `repository_storage` | string | **{dotted-circle}** No | Which storage shard the repository is on. _(admins only)_ |
+| `repository_storage` | string | **{dotted-circle}** No | Which storage shard the repository is on. _(administrator only)_ |
| `request_access_enabled` | boolean | **{dotted-circle}** No | Allow users to request member access. |
| `resolve_outdated_diff_discussions` | boolean | **{dotted-circle}** No | Automatically resolve merge request diffs discussions on lines changed with a push. |
| `shared_runners_enabled` | boolean | **{dotted-circle}** No | Enable shared runners for this project. |
@@ -1237,7 +1237,7 @@ POST /projects
## Create project for user
-Creates a new project owned by the specified user. Available only for admins.
+Creates a new project owned by the specified user. Available only for administrators.
If your HTTP repository isn't publicly accessible, add authentication information
to the URL `https://username:password@gitlab.company.com/group/project.git`,
@@ -1295,7 +1295,7 @@ POST /projects/user/:user_id
| `public_builds` | boolean | **{dotted-circle}** No | If `true`, jobs can be viewed by non-project-members. |
| `remove_source_branch_after_merge` | boolean | **{dotted-circle}** No | Enable `Delete source branch` option by default for all new merge requests. |
| `repository_access_level` | string | **{dotted-circle}** No | One of `disabled`, `private`, or `enabled`. |
-| `repository_storage` | string | **{dotted-circle}** No | Which storage shard the repository is on. _(admins only)_ |
+| `repository_storage` | string | **{dotted-circle}** No | Which storage shard the repository is on. _(administrators only)_ |
| `request_access_enabled` | boolean | **{dotted-circle}** No | Allow users to request member access. |
| `resolve_outdated_diff_discussions` | boolean | **{dotted-circle}** No | Automatically resolve merge request diffs discussions on lines changed with a push. |
| `shared_runners_enabled` | boolean | **{dotted-circle}** No | Enable shared runners for this project. |
@@ -1360,7 +1360,7 @@ PUT /projects/:id
| `merge_requests_enabled` | boolean | **{dotted-circle}** No | _(Deprecated)_ Enable merge requests for this project. Use `merge_requests_access_level` instead. |
| `mirror_overwrites_diverged_branches` **(PREMIUM)** | boolean | **{dotted-circle}** No | Pull mirror overwrites diverged branches. |
| `mirror_trigger_builds` **(PREMIUM)** | boolean | **{dotted-circle}** No | Pull mirroring triggers builds. |
-| `mirror_user_id` **(PREMIUM)** | integer | **{dotted-circle}** No | User responsible for all the activity surrounding a pull mirror event. _(admins only)_ |
+| `mirror_user_id` **(PREMIUM)** | integer | **{dotted-circle}** No | User responsible for all the activity surrounding a pull mirror event. _(administrators only)_ |
| `mirror` **(PREMIUM)** | boolean | **{dotted-circle}** No | Enables pull mirroring in a project. |
| `name` | string | **{dotted-circle}** No | The name of the project. |
| `operations_access_level` | string | **{dotted-circle}** No | One of `disabled`, `private`, or `enabled`. |
@@ -1375,7 +1375,7 @@ PUT /projects/:id
| `public_builds` | boolean | **{dotted-circle}** No | If `true`, jobs can be viewed by non-project members. |
| `remove_source_branch_after_merge` | boolean | **{dotted-circle}** No | Enable `Delete source branch` option by default for all new merge requests. |
| `repository_access_level` | string | **{dotted-circle}** No | One of `disabled`, `private`, or `enabled`. |
-| `repository_storage` | string | **{dotted-circle}** No | Which storage shard the repository is on. _(admins only)_ |
+| `repository_storage` | string | **{dotted-circle}** No | Which storage shard the repository is on. _(administrators only)_ |
| `request_access_enabled` | boolean | **{dotted-circle}** No | Allow users to request member access. |
| `resolve_outdated_diff_discussions` | boolean | **{dotted-circle}** No | Automatically resolve merge request diffs discussions on lines changed with a push. |
| `service_desk_enabled` | boolean | **{dotted-circle}** No | Enable or disable Service Desk feature. |
@@ -1442,7 +1442,7 @@ GET /projects/:id/forks
| `starred` | boolean | **{dotted-circle}** No | Limit by projects starred by the current user. |
| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Only available to Reporter or higher level role members. |
| `visibility` | string | **{dotted-circle}** No | Limit by visibility `public`, `internal`, or `private`. |
-| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(admins only)_ |
+| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(administrators only)_ |
| `with_issues_enabled` | boolean | **{dotted-circle}** No | Limit by enabled issues feature. |
| `with_merge_requests_enabled` | boolean | **{dotted-circle}** No | Limit by enabled merge requests feature. |
@@ -2047,7 +2047,7 @@ This endpoint:
merge requests).
- From [GitLab 13.2](https://gitlab.com/gitlab-org/gitlab/-/issues/220382) on
[Premium or higher](https://about.gitlab.com/pricing/) tiers, group
- admins can [configure](../user/group/index.md#enable-delayed-project-removal)
+ administrators can [configure](../user/group/index.md#enable-delayed-project-removal)
projects within a group to be deleted after a delayed period. When enabled,
actual deletion happens after the number of days specified in the
[default deletion delay](../user/admin_area/settings/visibility_and_access_controls.md#default-deletion-delay).
@@ -2373,7 +2373,7 @@ is returned.
## Fork relationship
Allows modification of the forked relationship between existing projects.
-Available only for project owners and admins.
+Available only for project owners and administrators.
### Create a forked from/to relation between existing projects
diff --git a/doc/api/users.md b/doc/api/users.md
index dfd2f6cc87d..17864526f8a 100644
--- a/doc/api/users.md
+++ b/doc/api/users.md
@@ -987,7 +987,7 @@ error occurs a `400 Bad Request` is returned with a message explaining the error
## Add SSH key for user
-Create new key owned by specified user. Available only for admin
+Create new key owned by specified user. Available only for administrator.
```plaintext
POST /users/:id/keys
@@ -1018,7 +1018,7 @@ Parameters:
## Delete SSH key for given user
-Deletes key owned by a specified user. Available only for admin.
+Deletes key owned by a specified user. Available only for administrator.
```plaintext
DELETE /users/:id/keys/:key_id
@@ -1165,7 +1165,7 @@ Example response:
## Get a specific GPG key for a given user
Get a specific GPG key for a given user. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43693)
-in GitLab 13.5, this endpoint can be accessed without admin authentication.
+in GitLab 13.5, this endpoint can be accessed without administrator authentication.
```plaintext
GET /users/:id/gpg_keys/:key_id
@@ -1194,7 +1194,7 @@ Example response:
## Add a GPG key for a given user
-Create new GPG key owned by the specified user. Available only for admins.
+Create new GPG key owned by the specified user. Available only for administrator.
```plaintext
POST /users/:id/gpg_keys
@@ -1226,7 +1226,7 @@ Example response:
## Delete a GPG key for a given user
-Delete a GPG key owned by a specified user. Available only for admins.
+Delete a GPG key owned by a specified user. Available only for administrator.
```plaintext
DELETE /users/:id/gpg_keys/:key_id
@@ -1276,7 +1276,7 @@ Parameters:
## List emails for user
-Get a list of a specified user's emails. Available only for admin
+Get a list of a specified user's emails. Available only for administrator
NOTE:
Due to [a bug](https://gitlab.com/gitlab-org/gitlab/-/issues/25077) this endpoint currently
@@ -1345,7 +1345,7 @@ error occurs a `400 Bad Request` is returned with a message explaining the error
## Add email for user
-Create new email owned by specified user. Available only for admin
+Create new email owned by specified user. Available only for administrator
```plaintext
POST /users/:id/emails
@@ -1372,7 +1372,7 @@ Parameters:
## Delete email for given user
-Deletes email owned by a specified user. Available only for admin.
+Deletes email owned by a specified user. Available only for administrator.
```plaintext
DELETE /users/:id/emails/:email_id
@@ -1385,7 +1385,7 @@ Parameters:
## Block user
-Blocks the specified user. Available only for admin.
+Blocks the specified user. Available only for administrator.
```plaintext
POST /users/:id/block
@@ -1405,7 +1405,7 @@ Returns:
## Unblock user
-Unblocks the specified user. Available only for admin.
+Unblocks the specified user. Available only for administrator.
```plaintext
POST /users/:id/unblock
@@ -1422,7 +1422,7 @@ Returns `201 OK` on success, `404 User Not Found` is user cannot be found or
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/22257) in GitLab 12.4.
-Deactivates the specified user. Available only for admin.
+Deactivates the specified user. Available only for administrator.
```plaintext
POST /users/:id/deactivate
@@ -1437,7 +1437,7 @@ Returns:
- `201 OK` on success.
- `404 User Not Found` if user cannot be found.
- `403 Forbidden` when trying to deactivate a user:
- - Blocked by admin or by LDAP synchronization.
+ - Blocked by administrator or by LDAP synchronization.
- That has any activity in past 90 days. These users cannot be deactivated.
- That is internal.
@@ -1445,7 +1445,7 @@ Returns:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/22257) in GitLab 12.4.
-Activates the specified user. Available only for admin.
+Activates the specified user. Available only for administrator.
```plaintext
POST /users/:id/activate
@@ -1465,7 +1465,7 @@ Returns:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/327354) in GitLab 14.3.
-Bans the specified user. Available only for admin.
+Bans the specified user. Available only for administrator.
```plaintext
POST /users/:id/ban
@@ -1485,7 +1485,7 @@ Returns:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/327354) in GitLab 14.3.
-Unbans the specified user. Available only for admin.
+Unbans the specified user. Available only for administrator.
```plaintext
POST /users/:id/unban
@@ -1507,7 +1507,7 @@ Please refer to the [Events API documentation](events.md#get-user-contribution-e
## Get all impersonation tokens of a user
-> Requires admin permissions.
+> Requires administrator permissions.
It retrieves every impersonation token of the user. Use the pagination
parameters `page` and `per_page` to restrict the list of impersonation tokens.
@@ -1639,7 +1639,7 @@ Example Responses:
## Get an impersonation token of a user
-> Requires admin permissions.
+> Requires administrators permissions.
It shows a user's impersonation token.
@@ -1678,7 +1678,7 @@ Example response:
## Create an impersonation token
-> Requires admin permissions.
+> Requires administrator permissions.
> Token values are returned once. Make sure you save it - you can't access it again.
It creates a new impersonation token. Only administrators can do this.
@@ -1723,7 +1723,7 @@ Example response:
## Revoke an impersonation token
-> Requires admin permissions.
+> Requires administrator permissions.
It revokes an impersonation token.
@@ -1845,7 +1845,7 @@ Example response:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/20532) in GitLab 12.8.
-Lists all projects and groups a user is a member of. This endpoint is available for admins only.
+Lists all projects and groups a user is a member of. This endpoint is available for administrators only.
It returns the `source_id`, `source_name`, `source_type` and `access_level` of a membership.
Source can be of type `Namespace` (representing a group) or `Project`. The response represents only direct memberships. Inherited memberships, for example in subgroups, are not included.
Access levels are represented by an integer value. For more details, read about the meaning of [access level values](access_requests.md#valid-access-levels).
@@ -1865,7 +1865,7 @@ Returns:
- `200 OK` on success.
- `404 User Not Found` if user can't be found.
-- `403 Forbidden` when not requested by an admin.
+- `403 Forbidden` when not requested by an administrator.
- `400 Bad Request` when requested type is not supported.
```shell
diff --git a/doc/install/openshift_and_gitlab/index.md b/doc/install/openshift_and_gitlab/index.md
index b13293eccfc..3b7ea5c1975 100644
--- a/doc/install/openshift_and_gitlab/index.md
+++ b/doc/install/openshift_and_gitlab/index.md
@@ -1,506 +1,9 @@
---
-stage: Enablement
-group: Distribution
-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
-type: howto
+redirect_to: 'https://docs.gitlab.com/charts/installation/operator.html'
+remove_date: '2022-09-22'
---
-# How to install GitLab on OpenShift Origin 3 **(FREE SELF)**
+This file was moved to [another location](https://docs.gitlab.com/charts/installation/operator.html).
-WARNING:
-This article is deprecated. Use the official Kubernetes Helm charts for
-installing GitLab to OpenShift. Check out the
-[official installation docs](https://docs.gitlab.com/charts/installation/cloud/openshift.html)
-for details.
-
-## Introduction
-
-[OpenShift Origin](https://www.okd.io/) (**Note:** renamed to OKD in August 2018) is an open source container application
-platform created by [RedHat](https://www.redhat.com/en), based on [Kubernetes](https://kubernetes.io/) and [Docker](https://www.docker.com). That means
-you can host your own PaaS for free and almost with no hassle.
-
-In this tutorial, we will see how to deploy GitLab in OpenShift using the GitLab
-official Docker image while getting familiar with the web interface and CLI
-tools that help us achieve our goal.
-
-## Prerequisites
-
-WARNING:
-This information is no longer up to date, as the current versions
-have changed and products have been renamed.
-
-OpenShift 3 is not yet deployed on RedHat's offered [Online platform](https://www.openshift.com/),
-so in order to test it, we use an [all-in-one VirtualBox image](https://www.okd.io/minishift/) that is
-offered by the OpenShift developers and managed by Vagrant. If you haven't done
-already, go ahead and install the following components as they are essential to
-test OpenShift easily:
-
-- [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
-- [Vagrant](https://www.vagrantup.com/downloads)
-- [OpenShift Client](https://docs.okd.io/3.11/cli_reference/get_started_cli.html) (`oc` for short)
-
-It is also important to mention that for the purposes of this tutorial, the
-latest Origin release is used:
-
-- **`oc`** `v1.3.0` (must be [installed](https://github.com/openshift/origin/releases/tag/v1.3.0) locally on your computer)
-- **OpenShift** `v1.3.0` (is pre-installed in the [VM image](https://app.vagrantup.com/openshift/boxes/origin-all-in-one))
-- **Kubernetes** `v1.3.0` (is pre-installed in the [VM image](https://app.vagrantup.com/openshift/boxes/origin-all-in-one))
-
-NOTE:
-If you intend to deploy GitLab on a production OpenShift cluster, there are some
-limitations to bare in mind. Read on the [limitations](#current-limitations)
-section for more information and follow the linked links for the relevant
-discussions.
-
-Now that you have all batteries, let's see how easy it is to test OpenShift
-on your computer.
-
-## Getting familiar with OpenShift Origin
-
-The environment we are about to use is based on CentOS 7, which comes with all
-the tools needed pre-installed, including Docker, Kubernetes, and OpenShift.
-
-### Test OpenShift using Vagrant
-
-As of this writing, the all-in-one VM is at version 1.3, and that's
-what we use in this tutorial.
-
-In short:
-
-1. Open a terminal and in a new directory run:
-
- ```shell
- vagrant init openshift/origin-all-in-one
- ```
-
-1. This generates a Vagrantfile based on the all-in-one VM image
-1. In the same directory where you generated the Vagrantfile
- enter:
-
- ```shell
- vagrant up
- ```
-
-This downloads the VirtualBox image and fire up the VM with some preconfigured
-values as you can see in the Vagrantfile. As you may have noticed, you need
-plenty of RAM (5GB in our example), so make sure you have enough.
-
-Now that OpenShift is set up, let's see how the web console looks like.
-
-### Explore the OpenShift web console
-
-Once Vagrant finishes its thing with the VM, you are presented with a
-message which has some important information. One of them is the IP address
-of the deployed OpenShift platform and in particular `https://10.2.2.2:8443/console/`.
-Open this link with your browser and accept the self-signed certificate in
-order to proceed.
-
-Let's login as admin with username/password `admin/admin`. This is what the
-landing page looks like:
-
-![OpenShift web console](img/web-console.png)
-
-You can see that a number of [projects](https://docs.okd.io/3.11/dev_guide/projects.html) are already created for testing purposes.
-
-If you head over the `openshift-infra` project, a number of services with their
-respective pods are there to explore.
-
-![OpenShift web console](img/openshift-infra-project.png)
-
-We are not exploring the whole interface, but if you want to learn about
-the key concepts of OpenShift, read the [core concepts reference](https://docs.okd.io/3.11/architecture/core_concepts/index.html)
-in the official documentation.
-
-### Explore the OpenShift CLI
-
-OpenShift Client (`oc`), is a powerful CLI tool that talks to the OpenShift API
-and performs pretty much everything you can do from the web UI and much more.
-
-Assuming you have [installed](https://docs.okd.io/3.11/cli_reference/get_started_cli.html) it, let's explore some of its main
-functionalities.
-
-Let's first see the version of `oc`:
-
-```shell
-$ oc version
-
-oc v1.3.0
-kubernetes v1.3.0+52492b4
-```
-
-With `oc help` you can see the top level arguments you can run with `oc` and
-interact with your cluster, Kubernetes, run applications, create projects and
-much more.
-
-Let's login to the all-in-one VM and see how to achieve the same results like
-when we visited the web console earlier. The username/password for the
-administrator user is `admin/admin`. There is also a test user with username/
-password `user/user`, with limited access. Let's login as admin for the moment:
-
-```shell
-$ oc login https://10.2.2.2:8443
-
-Authentication required for https://10.2.2.2:8443 (openshift)
-Username: admin
-Password:
-Login successful.
-
-You have access to the following projects and can switch between them with 'oc project <projectname>':
-
-- cockpit
-- default (current)
-- delete
-- openshift
-- openshift-infra
-- sample
-
-Using project "default".
-```
-
-Switch to the `openshift-infra` project with:
-
-```shell
-oc project openshift-infra
-```
-
-And finally, see its status:
-
-```shell
-oc status
-```
-
-The last command should spit a bunch of information about the statuses of the
-pods and the services, which if you look closely is what we encountered in the
-second image when we explored the web console.
-
-You can always read more about `oc` in the [OpenShift CLI documentation](https://docs.okd.io/3.11/cli_reference/get_started_cli.html).
-
-### Troubleshooting the all-in-one VM
-
-Using the all-in-one VM gives you the ability to test OpenShift whenever you
-want. That means you get to play with it, shutdown the VM, and pick up where
-you left off.
-
-Occasionally, you may encounter issues, like OpenShift not running when booting
-up the VM. The web UI may not respond, or you may see issues when trying to sign
-in with `oc`, like:
-
-```plaintext
-The connection to the server 10.2.2.2:8443 was refused - did you specify the right host or port?
-```
-
-In that case, the OpenShift service might not be running, so in order to fix it:
-
-1. SSH into the VM by selecting the directory where the Vagrantfile is and then
- run:
-
- ```shell
- vagrant ssh
- ```
-
-1. Run `systemctl` and verify by the output that the `openshift` service is not
- running (it is in red color). If that's the case start the service with:
-
- ```shell
- sudo systemctl start openshift
- ```
-
-1. Verify the service is up with:
-
- ```shell
- systemctl status openshift -l
- ```
-
-You can now sign in by using `oc` (like we did before) and visit the web console.
-
-## Deploy GitLab
-
-Now that you got a taste of what OpenShift looks like, let's deploy GitLab!
-
-### Create a new project
-
-First, create a new project to host our application. You can do this
-either by running the CLI client:
-
-```shell
-oc new-project gitlab
-```
-
-or by using the web interface:
-
-![Create a new project from the UI](img/create-project-ui.png)
-
-If you used the command line, `oc` automatically uses the new project and you
-can see its status with:
-
-```shell
-$ oc status
-
-In project gitlab on server https://10.2.2.2:8443
-
-You have no services, deployment configs, or build configs.
-Run 'oc new-app' to create an application.
-```
-
-If you visit the web console, you can now see `gitlab` listed in the projects list.
-
-The next step is to import the OpenShift template for GitLab.
-
-### Import the template
-
-The [template](https://docs.okd.io/3.11/architecture/core_concepts/templates.html) is basically a JSON file which describes a set of
-related object definitions to be created together, as well as a set of
-parameters for those objects.
-
-The template for GitLab resides in the Omnibus GitLab repository under the
-Docker directory. Let's download it locally with `wget`:
-
-```shell
-wget https://gitlab.com/gitlab-org/omnibus-gitlab/raw/master/docker/openshift-template.json
-```
-
-And then let's import it in OpenShift:
-
-```shell
-oc create -f openshift-template.json -n openshift
-```
-
-NOTE:
-The `-n openshift` namespace flag is a trick to make the template available to all
-projects. If you recall from when we created the `gitlab` project, `oc` switched
-to it automatically, and that can be verified by the `oc status` command. If
-you omit the namespace flag, the application will be available only to the
-current project, in our case `gitlab`. The `openshift` namespace is a global
-one that the administrators should use if they want the application to be
-available to all users.
-
-We are now ready to finally deploy GitLab!
-
-### Create a new application
-
-The next step is to use the template we previously imported. Head over to the
-`gitlab` project and hit the **Add to Project** button.
-
-![Add to project](img/add-to-project.png)
-
-This will bring you to the catalog where you can find all the pre-defined
-applications ready to deploy with the click of a button. Search for `gitlab`
-and you will see the previously imported template:
-
-![Add GitLab to project](img/add-gitlab-to-project.png)
-
-Select it, and in the following screen you will be presented with the predefined
-values used with the GitLab template:
-
-![GitLab settings](img/gitlab-settings.png)
-
-Notice at the top that there are three resources to be created with this
-template:
-
-- `gitlab-ce`
-- `gitlab-ce-redis`
-- `gitlab-ce-postgresql`
-
-While PostgreSQL and Redis are bundled in Omnibus GitLab, the template is using
-separate images as you can see from [this line](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/658c065c8d022ce858dd63eaeeadb0b2ddc8deea/docker/openshift-template.json#L239) in the template.
-
-The predefined values have been calculated for the purposes of testing out
-GitLab in the all-in-one VM. You don't need to change anything here, hit
-**Create** to start the deployment.
-
-If you are deploying to production you will want to change the **GitLab instance
-hostname** and use greater values for the volume sizes. If you don't provide a
-password for PostgreSQL, it will be created automatically.
-
-NOTE:
-The `gitlab.apps.10.2.2.2.nip.io` hostname that is used by default will
-resolve to the host with IP `10.2.2.2` which is the IP our VM uses. It is a
-trick to have distinct FQDNs pointing to services that are on our local network.
-Read more on how this works at [nip.io](https://nip.io).
-
-Now that we configured this, let's see how to manage and scale GitLab.
-
-## Manage and scale GitLab
-
-Setting up GitLab for the first time might take a while depending on your
-internet connection and the resources you have attached to the all-in-one VM.
-The GitLab Docker image is quite big (approximately 500 MB), so you'll have to
-wait until it's downloaded and configured before you use it.
-
-### Watch while GitLab gets deployed
-
-Navigate to the `gitlab` project at **Overview**. You can notice that the
-deployment is in progress by the orange color. The Docker images are being
-downloaded and soon they will be up and running.
-
-![GitLab overview](img/gitlab-overview.png)
-
-Switch to the **Browse > Pods** and you will eventually see all 3 pods in a
-running status. Remember the 3 resources that were to be created when we first
-created the GitLab app? This is where you can see them in action.
-
-![Running pods](img/running-pods.png)
-
-You can see GitLab being reconfigured by taking look at the logs in real time.
-Click on `gitlab-ce-2-j7ioe` (your ID will be different) and go to the **Logs**
-tab.
-
-![GitLab logs](img/gitlab-logs.png)
-
-At a point you should see a `gitlab Reconfigured!` message in the logs.
-Navigate back to the **Overview** and hopefully all pods will be up and running.
-
-![GitLab running](img/gitlab-running.png)
-
-Congratulations! You can now navigate to your new shinny GitLab instance by
-visiting `http://gitlab.apps.10.2.2.2.nip.io` where you will be asked to
-change the root user password. Login using `root` as username and providing the
-password you just set, and start using GitLab!
-
-### Scale GitLab with the push of a button
-
-If you reach to a point where your GitLab instance could benefit from a boost
-of resources, you'd be happy to know that you can scale up with the push of a
-button.
-
-In the **Overview** page just click the up arrow button in the pod where
-GitLab is. The change is instant and you can see the number of [replicas](https://docs.okd.io/3.11/architecture/core_concepts/deployments.html#replication-controllers) now
-running scaled to 2.
-
-![GitLab scale](img/gitlab-scale.png)
-
-Upping the GitLab pods is actually like adding new application servers to your
-cluster. You can see how that would work if you didn't use GitLab with
-OpenShift by following the [HA documentation](../../administration/reference_architectures/index.md) for the application servers.
-
-Bare in mind that you may need more resources (CPU, RAM, disk space) when you
-scale up. If a pod is in pending state for too long, you can navigate to
-**Browse > Events** and see the reason and message of the state.
-
-![No resources](img/no-resources.png)
-
-### Scale GitLab using the `oc` CLI
-
-Using `oc` is super easy to scale up the replicas of a pod. You may want to
-skim through the [basic CLI operations](https://docs.okd.io/3.11/cli_reference/basic_cli_operations.html) to get a taste how the CLI
-commands are used. Pay extra attention to the object types as we will use some
-of them and their abbreviated versions below.
-
-In order to scale up, we need to find out the name of the replication controller.
-Let's see how to do that using the following steps.
-
-1. Make sure you are in the `gitlab` project:
-
- ```shell
- oc project gitlab
- ```
-
-1. See what services are used for this project:
-
- ```shell
- oc get svc
- ```
-
- The output will be similar to:
-
- ```plaintext
- NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
- gitlab-ce 172.30.243.177 <none> 22/TCP,80/TCP 5d
- gitlab-ce-postgresql 172.30.116.75 <none> 5432/TCP 5d
- gitlab-ce-redis 172.30.105.88 <none> 6379/TCP 5d
- ```
-
-1. We need to see the replication controllers of the `gitlab-ce` service.
- Get a detailed view of the current ones:
-
- ```shell
- oc describe rc gitlab-ce
- ```
-
- This will return a large detailed list of the current replication controllers.
- Search for the name of the GitLab controller, usually `gitlab-ce-1` or if
- that failed at some point and you spawned another one, it will be named
- `gitlab-ce-2`.
-
-1. Scale GitLab using the previous information:
-
- ```shell
- oc scale --replicas=2 replicationcontrollers gitlab-ce-2
- ```
-
-1. Get the new replicas number to make sure scaling worked:
-
- ```shell
- oc get rc gitlab-ce-2
- ```
-
- which will return something like:
-
- ```plaintext
- NAME DESIRED CURRENT AGE
- gitlab-ce-2 2 2 5d
- ```
-
-And that's it! We successfully scaled the replicas to 2 using the CLI.
-
-As always, you can find the name of the controller using the web console. Just
-click on the service you are interested in and you will see the details in the
-right sidebar.
-
-![Replication controller name](img/rc-name.png)
-
-### Autoscaling GitLab
-
-In case you were wondering whether there is an option to autoscale a pod based
-on the resources of your server, the answer is yes, of course there is.
-
-We will not expand on this matter, but feel free to read the documentation on
-OpenShift's website about [autoscaling](https://docs.okd.io/3.11/dev_guide/pod_autoscaling.html).
-
-## Current limitations
-
-As stated in the [all-in-one VM](https://www.okd.io/minishift/) page:
-
-> By default, OpenShift will not allow a container to run as root or even a
-non-random container assigned user ID. Most Docker images in Docker Hub do not
-follow this best practice and instead run as root.
-
-The all-in-one VM we are using has this security turned off so it will not
-bother us. In any case, it is something to keep in mind when deploying GitLab
-on a production cluster.
-
-In order to deploy GitLab on a production cluster, you will need to assign the
-GitLab service account to the `anyuid` [Security Context Constraints](https://docs.okd.io/3.11/admin_guide/manage_scc.html).
-
-For OpenShift v3.0, you will need to do this manually:
-
-1. Edit the Security Context:
-
- ```shell
- oc edit scc anyuid
- ```
-
-1. Add `system:serviceaccount:<project>:gitlab-ce-user` to the `users` section.
- If you changed the Application Name from the default the user will
- will be `<app-name>-user` instead of `gitlab-ce-user`
-
-1. Save and exit the editor
-
-For OpenShift v3.1 and above, you can do:
-
-```shell
-oc adm policy add-scc-to-user anyuid system:serviceaccount:gitlab:gitlab-ce-user
-```
-
-## Conclusion
-
-You should now have an understanding of the basic OpenShift Origin concepts, and
-a sense of how things work using the web console or the CLI.
-
-Upload a template, create a project, add an application, and you're done. You're
-ready to sign in to your new GitLab instance.
-
-Remember that this tutorial doesn't address all that Origin is capable of. As
-always, refer to the detailed [documentation](https://docs.okd.io) to learn more
-about deploying your own OpenShift PaaS and managing your applications with
-containers.
+<!-- This redirect file can be deleted after <2022-09-22>. -->
+<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->
diff --git a/doc/integration/elasticsearch.md b/doc/integration/elasticsearch.md
index 9514c298885..6af46417e85 100644
--- a/doc/integration/elasticsearch.md
+++ b/doc/integration/elasticsearch.md
@@ -155,7 +155,7 @@ may need to set the `production -> elasticsearch -> indexer_path` setting in you
For GitLab instances with more than 50GB repository data you can follow the instructions for [Indexing large
instances](#indexing-large-instances) below.
-To enable Advanced Search, you must have admin access to GitLab:
+To enable Advanced Search, you must have administrator access to GitLab:
1. On the top bar, select **Menu > Admin**.
1. On the left sidebar, select **Settings > Advanced Search**.
diff --git a/doc/operations/metrics/embed_grafana.md b/doc/operations/metrics/embed_grafana.md
index 473b335d4c5..81b1f8a3bc6 100644
--- a/doc/operations/metrics/embed_grafana.md
+++ b/doc/operations/metrics/embed_grafana.md
@@ -51,7 +51,7 @@ To set up the Grafana API in Grafana:
section.
1. To enable the integration, check the **Active** checkbox.
1. For **Grafana URL**, enter the base URL of the Grafana instance.
-1. For **API Token**, enter the Admin API token you just generated.
+1. For **API Token**, enter the Administrator API token you just generated.
1. Click **Save Changes**.
### Generate a link to a panel
diff --git a/doc/public_access/public_access.md b/doc/public_access/public_access.md
index 0d7885bf875..f9a7bdd35b5 100644
--- a/doc/public_access/public_access.md
+++ b/doc/public_access/public_access.md
@@ -81,7 +81,7 @@ Prerequisite:
You can restrict the use of visibility levels for users when they create a project or a snippet.
This is useful to prevent users from publicly exposing their repositories by accident. The
-restricted visibility settings do not apply to admin users.
+restricted visibility settings do not apply to administrators.
For details, see [Restricted visibility levels](../user/admin_area/settings/visibility_and_access_controls.md#restrict-visibility-levels).
diff --git a/doc/raketasks/user_management.md b/doc/raketasks/user_management.md
index 08f0005883b..f63c35ab475 100644
--- a/doc/raketasks/user_management.md
+++ b/doc/raketasks/user_management.md
@@ -32,7 +32,7 @@ sudo gitlab-rake gitlab:import:all_users_to_all_projects
bundle exec rake gitlab:import:all_users_to_all_projects RAILS_ENV=production
```
-Admin users are added as maintainers.
+Administrators are added as maintainers.
## Add user as a developer to all groups
diff --git a/doc/security/information_exclusivity.md b/doc/security/information_exclusivity.md
index 69223b5edb9..dd5ef6e6a65 100644
--- a/doc/security/information_exclusivity.md
+++ b/doc/security/information_exclusivity.md
@@ -24,7 +24,7 @@ limitation.
You can take steps to prevent unintentional sharing and information
destruction. This limitation is the reason why only certain people are allowed
to [add users to a project](../user/project/members/index.md)
-and why only a GitLab admin can [force push a protected
+and why only a GitLab administrator can [force push a protected
branch](../user/project/protected_branches.md).
<!-- ## Troubleshooting
diff --git a/doc/security/reset_user_password.md b/doc/security/reset_user_password.md
index 344cfcae46a..aee50c7d279 100644
--- a/doc/security/reset_user_password.md
+++ b/doc/security/reset_user_password.md
@@ -32,7 +32,7 @@ sudo gitlab-rake "gitlab:password:reset[johndoe]"
NOTE:
To reset the default admin password, run this Rake task with the username
-`root`, which is the default username of that admin account.
+`root`, which is the default username of that administrator account.
## Rails console
@@ -110,7 +110,7 @@ password.
If the username was changed to something else and has been forgotten, one
possible way is to reset the password using Rails console with user ID `1` (in
-almost all the cases, the first user is the default admin account).
+almost all the cases, the first user is the default administrator account).
<!-- ## Troubleshooting
diff --git a/doc/user/admin_area/license.md b/doc/user/admin_area/license.md
index 4e97cb8e49c..ce2714be225 100644
--- a/doc/user/admin_area/license.md
+++ b/doc/user/admin_area/license.md
@@ -30,7 +30,7 @@ To begin the activation process with your activation code:
## Activate GitLab EE with a License File **(PREMIUM SELF)**
-If you receive a license file from GitLab (for example a new trial), you can upload it by signing into your GitLab instance as an admin or adding it during installation. The license is a base64-encoded ASCII text file with a `.gitlab-license` extension.
+If you receive a license file from GitLab (for example a new trial), you can upload it by signing into your GitLab instance as an administrator or adding it during installation. The license is a base64-encoded ASCII text file with a `.gitlab-license` extension.
## Uploading your license
diff --git a/doc/user/group/saml_sso/index.md b/doc/user/group/saml_sso/index.md
index 8f6b3e7244a..0b69e609437 100644
--- a/doc/user/group/saml_sso/index.md
+++ b/doc/user/group/saml_sso/index.md
@@ -42,7 +42,7 @@ GitLab.com uses the SAML NameID to identify users. The NameID element:
- Is a required field in the SAML response.
- Must be unique to each user.
-- Must be a persistent value that will never change, such as a randomly generated unique user ID.
+- Must be a persistent value that never changes, such as a randomly generated unique user ID.
- Is case sensitive. The NameID must match exactly on subsequent login attempts, so should not rely on user input that could change between upper and lower case.
- Should not be an email address or username. We strongly recommend against these as it's hard to
guarantee it doesn't ever change, for example, when a person's name changes. Email addresses are
@@ -131,7 +131,7 @@ When SCIM updates, the user's access is immediately revoked.
## Providers
-The SAML standard means that a wide range of identity providers will work with GitLab. Your identity provider may have relevant documentation. It may be generic SAML documentation, or specifically targeted for GitLab.
+The SAML standard means that you can use a wide range of identity providers with GitLab. Your identity provider might have relevant documentation. It can be generic SAML documentation or specifically targeted for GitLab.
When [configuring your identity provider](#configuring-your-identity-provider), please consider the notes below for specific providers to help avoid common issues and as a guide for terminology used.
@@ -480,7 +480,7 @@ If you receive a `404` during setup when using "verify configuration", make sure
[SHA-1 generated fingerprint](../../../integration/saml.md#notes-on-configuring-your-identity-provider).
If a user is trying to sign in for the first time and the GitLab single sign-on URL has not [been configured](#configuring-your-identity-provider), they may see a 404.
-As outlined in the [user access section](#linking-saml-to-your-existing-gitlabcom-account), a group Owner will need to provide the URL to users.
+As outlined in the [user access section](#linking-saml-to-your-existing-gitlabcom-account), a group Owner needs to provide the URL to users.
### Message: "SAML authentication failed: Extern UID has already been taken"
@@ -502,13 +502,13 @@ Here are possible causes and solutions:
| Cause | Solution |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
-| When a user account with the email address already exists in GitLab, but the user does not have the SAML identity tied to their account. | The user will need to [link their account](#user-access-and-management). |
+| When a user account with the email address already exists in GitLab, but the user does not have the SAML identity tied to their account. | The user needs to [link their account](#user-access-and-management). |
### Message: "SAML authentication failed: Extern UID has already been taken, User has already been taken"
Getting both of these errors at the same time suggests the NameID capitalization provided by the identity provider didn't exactly match the previous value for that user.
-This can be prevented by configuring the [NameID](#nameid) to return a consistent value. Fixing this for an individual user involves [unlinking SAML in the GitLab account](#unlinking-accounts), although this will cause group membership and to-dos to be lost.
+This can be prevented by configuring the [NameID](#nameid) to return a consistent value. Fixing this for an individual user involves [unlinking SAML in the GitLab account](#unlinking-accounts), although this causes group membership and to-do items to be lost.
### Message: "Request to link SAML account must be authorized"
@@ -541,7 +541,7 @@ Otherwise, to change the SAML app used for sign in, users need to [unlink the cu
Many SAML terms can vary between providers. It is possible that the information you are looking for is listed under another name.
-For more information, start with your identity provider's documentation. Look for their options and examples to see how they configure SAML. This can provide hints on what you'll need to configure GitLab to work with these providers.
+For more information, start with your identity provider's documentation. Look for their options and examples to see how they configure SAML. This can provide hints on what you need to configure GitLab to work with these providers.
It can also help to look at our [more detailed docs for self-managed GitLab](../../../integration/saml.md).
SAML configuration for GitLab.com is mostly the same as for self-managed instances.
diff --git a/doc/user/profile/account/create_accounts.md b/doc/user/profile/account/create_accounts.md
index 3cc56cc47e6..ab0cae976d2 100644
--- a/doc/user/profile/account/create_accounts.md
+++ b/doc/user/profile/account/create_accounts.md
@@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
You can create users:
-- Manually through the sign in page or Admin Area.
+- Manually through the sign in page or Administrator Area.
- Automatically through user authentication integrations.
## Create users on sign in page
@@ -24,17 +24,17 @@ their own accounts by either:
## Create users in Admin Area
-As an Admin user, you can manually create users:
+As an Administrator user, you can manually create users:
1. On the top bar, select **Menu > Admin**.
1. On the left sidebar, select **Overview > Users** (`/admin/users`).
1. Select **New user**.
-You can also [create users through the API](../../../api/users.md) as an admin.
+You can also [create users through the API](../../../api/users.md) as an administrator.
-![Admin User Button](img/admin_user_button.png)
+![Administrator User Button](img/admin_user_button.png)
-![Admin User Form](img/admin_user_form.png)
+![Administrator User Form](img/admin_user_form.png)
## Create users through authentication integrations
diff --git a/doc/user/project/integrations/img/zentao_product_id.png b/doc/user/project/integrations/img/zentao_product_id.png
deleted file mode 100644
index a91b4c3f82d..00000000000
--- a/doc/user/project/integrations/img/zentao_product_id.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/project/integrations/overview.md b/doc/user/project/integrations/overview.md
index 4184662893b..249f6c4305c 100644
--- a/doc/user/project/integrations/overview.md
+++ b/doc/user/project/integrations/overview.md
@@ -62,7 +62,6 @@ Click on the service links to see further configuration instructions and details
| [Unify Circuit](unify_circuit.md) | Send notifications about project events to Unify Circuit. | **{dotted-circle}** No |
| [Webex Teams](webex_teams.md) | Receive events notifications. | **{dotted-circle}** No |
| [YouTrack](youtrack.md) | Use YouTrack as the issue tracker. | **{dotted-circle}** No |
-| [ZenTao](zentao.md) | Use ZenTao as the issue tracker. | **{dotted-circle}** No |
## Push hooks limit
diff --git a/doc/user/project/integrations/zentao.md b/doc/user/project/integrations/zentao.md
deleted file mode 100644
index ab8a7829139..00000000000
--- a/doc/user/project/integrations/zentao.md
+++ /dev/null
@@ -1,40 +0,0 @@
----
-stage: Ecosystem
-group: Integrations
-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
----
-
-# ZenTao product integration **(PREMIUM)**
-
-[ZenTao](https://www.zentao.net/) is a web-based project management platform.
-
-## Configure ZenTao
-
-This integration requires a ZenTao API secret key.
-
-Complete these steps in ZenTao:
-
-1. Go to your **Admin** page and select **Develop > Application**.
-1. Select **Add Application**.
-1. Under **Name** and **Code**, enter a name and a code for the new secret key.
-1. Under **Account**, select an existing account name.
-1. Select **Save**.
-1. Copy the generated key to use in GitLab.
-
-## Configure GitLab
-
-Complete these steps in GitLab:
-
-1. Go to your project and select **Settings > Integrations**.
-1. Select **ZenTao**.
-1. Turn on the **Active** toggle under **Enable Integration**.
-1. Provide the ZenTao configuration information:
- - **ZenTao Web URL**: The base URL of the ZenTao instance web interface you're linking to this GitLab project (for example, `example.zentao.net`).
- - **ZenTao API URL** (optional): The base URL to the ZenTao instance API. Defaults to the Web URL value if not set.
- - **ZenTao API token**: Use the key you generated when you [configured ZenTao](#configure-zentao).
- - **ZenTao Product ID**: To display issues from a single ZenTao product in a given GitLab project. The Product ID can be found in the ZenTao product page under **Settings > Overview**.
-
- ![ZenTao settings page](img/zentao_product_id.png)
-
-1. To verify the ZenTao connection is working, select **Test settings**.
-1. Select **Save changes**.
diff --git a/doc/user/project/merge_requests/approvals/rules.md b/doc/user/project/merge_requests/approvals/rules.md
index 6dc06d22028..b422982c0e7 100644
--- a/doc/user/project/merge_requests/approvals/rules.md
+++ b/doc/user/project/merge_requests/approvals/rules.md
@@ -154,7 +154,7 @@ become eligible approvers in the project. To enable this merge request approval
1. Go to your project and select **Settings > General**.
1. Expand **Merge request (MR) approvals**.
-1. Locate **Any eligible user** and select the number of approvals required:
+1. Locate **Eligible users** and select the number of approvals required:
![MR approvals by Code Owners](img/mr_approvals_by_code_owners_v12_7.png)
diff --git a/doc/user/project/working_with_projects.md b/doc/user/project/working_with_projects.md
index f7a89c89779..cd6f5ea04ac 100644
--- a/doc/user/project/working_with_projects.md
+++ b/doc/user/project/working_with_projects.md
@@ -187,6 +187,12 @@ You can view your new project at `https://gitlab.example.com/namespace/myproject
Your project's visibility is set to **Private** by default, but you can change it
in your [project's settings](../../public_access/public_access.md#change-project-visibility)).
+This feature does not work for project paths that have previously been in use and
+[renamed](settings/index.md#renaming-a-repository). A redirect exists over the previous project path
+that causes push attempts to redirect requests to the renamed project location, instead of creating
+a new project. To create a new project, use the [Web UI](#create-a-project) or the
+[Projects API](../../api/projects.md#create-project).
+
## Fork a project
A fork is a copy of an original repository that you put in another namespace
diff --git a/doc/user/workspace/index.md b/doc/user/workspace/index.md
index 02a4ae75308..600c9ecce03 100644
--- a/doc/user/workspace/index.md
+++ b/doc/user/workspace/index.md
@@ -6,15 +6,18 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Workspace
-Workspace will be above the [top-level namespaces](../group/index.md#namespaces) for you to manage everything you can do as a GitLab administrator, including:
+Workspace will be above the [top-level namespaces](../group/index.md#namespaces) for you to manage
+everything you do as a GitLab administrator, including:
- Defining and applying settings to all of your groups, subgroups, and projects.
- Aggregating data from all your groups, subgroups, and projects.
-Our goal is to reach feature parity between SaaS and Self-Managed installations, with all [Admin Area settings](/ee/user/admin_area/settings/) moving to either:
+Our goal is to reach feature parity between SaaS and self-managed installations, with all
+[Admin Area settings](/ee/user/admin_area/settings/) moving to either:
-1. Groups (available in the Workspace, Top-level group namespaces, and Sub-groups)
-1. Hardware Controls (for functionality that does not apply to Groups, Hardware Controls are only applicable to Self-managed Installations, there is one Hardware Controls section per installation)
+- Groups. Available in the Workspace, top-level group namespaces, and sub-groups.
+- Hardware Controls. For functionality that does not apply to groups, Hardware Controls are only
+ applicable to self-managed installations. There is one Hardware Controls section per installation.
NOTE:
Workspace is currently in development.
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index fe666a2c6b4..e6e1b4af5c8 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -3937,9 +3937,6 @@ msgstr ""
msgid "Any Milestone"
msgstr ""
-msgid "Any eligible user"
-msgstr ""
-
msgid "Any encrypted tokens"
msgstr ""
@@ -12346,6 +12343,9 @@ msgstr ""
msgid "Elastic|None. Select projects to index."
msgstr ""
+msgid "Eligible users"
+msgstr ""
+
msgid "Email"
msgstr ""
@@ -32771,6 +32771,9 @@ msgstr ""
msgid "SuperSonics|Plan"
msgstr ""
+msgid "SuperSonics|Please agree to the Subscription Agreement"
+msgstr ""
+
msgid "SuperSonics|Ready to get started? A GitLab plan is ideal for scaling organizations and for multi team usage."
msgstr ""
@@ -32801,6 +32804,9 @@ msgstr ""
msgid "SuperSonics|The activation code is not valid. Please make sure to copy it exactly from the Customers Portal or confirmation email. Learn more about %{linkStart}activating your subscription%{linkEnd}."
msgstr ""
+msgid "SuperSonics|The activation code should be a 24-character alphanumeric string"
+msgstr ""
+
msgid "SuperSonics|There is a connectivity issue."
msgstr ""
diff --git a/package.json b/package.json
index ffc6504882d..38241685410 100644
--- a/package.json
+++ b/package.json
@@ -203,7 +203,7 @@
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
- "@gitlab/eslint-plugin": "9.3.0",
+ "@gitlab/eslint-plugin": "9.4.0",
"@gitlab/stylelint-config": "2.3.0",
"@testing-library/dom": "^7.16.2",
"@vue/test-utils": "1.2.0",
diff --git a/spec/factories/groups.rb b/spec/factories/groups.rb
index bd6e37c1cef..cb34321c83d 100644
--- a/spec/factories/groups.rb
+++ b/spec/factories/groups.rb
@@ -4,7 +4,7 @@ FactoryBot.define do
factory :group, class: 'Group', parent: :namespace do
sequence(:name) { |n| "group#{n}" }
path { name.downcase.gsub(/\s/, '_') }
- type { 'Group' }
+ type { Group.sti_name }
owner { nil }
project_creation_level { ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS }
diff --git a/spec/frontend/vue_shared/directives/validation_spec.js b/spec/frontend/vue_shared/directives/validation_spec.js
index 51ee73cabde..dcd3a44a6fc 100644
--- a/spec/frontend/vue_shared/directives/validation_spec.js
+++ b/spec/frontend/vue_shared/directives/validation_spec.js
@@ -4,11 +4,13 @@ import validation, { initForm } from '~/vue_shared/directives/validation';
describe('validation directive', () => {
let wrapper;
- const createComponentFactory = ({ inputAttributes, template, data }) => {
- const defaultInputAttributes = {
- type: 'text',
- required: true,
- };
+ const createComponentFactory = (options) => {
+ const {
+ inputAttributes = { type: 'text', required: true },
+ template,
+ data,
+ feedbackMap = {},
+ } = options;
const defaultTemplate = `
<form>
@@ -18,11 +20,11 @@ describe('validation directive', () => {
const component = {
directives: {
- validation: validation(),
+ validation: validation(feedbackMap),
},
data() {
return {
- attributes: inputAttributes || defaultInputAttributes,
+ attributes: inputAttributes,
...data,
};
},
@@ -32,8 +34,10 @@ describe('validation directive', () => {
wrapper = shallowMount(component, { attachTo: document.body });
};
- const createComponent = ({ inputAttributes, showValidation, template } = {}) =>
- createComponentFactory({
+ const createComponent = (options = {}) => {
+ const { inputAttributes, showValidation, template, feedbackMap } = options;
+
+ return createComponentFactory({
inputAttributes,
data: {
showValidation,
@@ -48,10 +52,14 @@ describe('validation directive', () => {
},
},
template,
+ feedbackMap,
});
+ };
+
+ const createComponentWithInitForm = (options = {}) => {
+ const { inputAttributes, feedbackMap } = options;
- const createComponentWithInitForm = ({ inputAttributes } = {}) =>
- createComponentFactory({
+ return createComponentFactory({
inputAttributes,
data: {
form: initForm({
@@ -68,7 +76,9 @@ describe('validation directive', () => {
<input v-validation:[form.showValidation] name="exampleField" v-bind="attributes" />
</form>
`,
+ feedbackMap,
});
+ };
afterEach(() => {
wrapper.destroy();
@@ -209,6 +219,111 @@ describe('validation directive', () => {
});
});
+ describe('with custom feedbackMap', () => {
+ const customMessage = 'Please fill out the name field.';
+ const template = `
+ <form>
+ <div v-validation:[showValidation]>
+ <input name="exampleField" v-bind="attributes" />
+ </div>
+ </form>
+ `;
+ beforeEach(() => {
+ const feedbackMap = {
+ valueMissing: {
+ isInvalid: (el) => el.validity?.valueMissing,
+ message: customMessage,
+ },
+ };
+
+ createComponent({
+ template,
+ inputAttributes: {
+ required: true,
+ },
+ feedbackMap,
+ });
+ });
+
+ describe('with invalid value', () => {
+ beforeEach(() => {
+ setValueAndTriggerValidation('');
+ });
+
+ it('should set correct field state', () => {
+ expect(getFormData().fields.exampleField).toEqual({
+ state: false,
+ feedback: customMessage,
+ });
+ });
+ });
+
+ describe('with valid value', () => {
+ beforeEach(() => {
+ setValueAndTriggerValidation('hello');
+ });
+
+ it('set the correct state', () => {
+ expect(getFormData().fields.exampleField).toEqual({
+ state: true,
+ feedback: '',
+ });
+ });
+ });
+ });
+
+ describe('with validation-message present on the element', () => {
+ const customMessage = 'The name field is required.';
+ const template = `
+ <form>
+ <div v-validation:[showValidation]>
+ <input name="exampleField" v-bind="attributes" validation-message="${customMessage}" />
+ </div>
+ </form>
+ `;
+ beforeEach(() => {
+ const feedbackMap = {
+ valueMissing: {
+ isInvalid: (el) => el.validity?.valueMissing,
+ },
+ };
+
+ createComponent({
+ template,
+ inputAttributes: {
+ required: true,
+ },
+ feedbackMap,
+ });
+ });
+
+ describe('with invalid value', () => {
+ beforeEach(() => {
+ setValueAndTriggerValidation('');
+ });
+
+ it('should set correct field state', () => {
+ expect(getFormData().fields.exampleField).toEqual({
+ state: false,
+ feedback: customMessage,
+ });
+ });
+ });
+
+ describe('with valid value', () => {
+ beforeEach(() => {
+ setValueAndTriggerValidation('hello');
+ });
+
+ it('set the correct state', () => {
+ expect(getFormData().fields.exampleField).toEqual({
+ state: true,
+ feedback: '',
+ });
+ });
+ });
+ });
+
describe('component using initForm', () => {
it('sets the form fields correctly', () => {
createComponentWithInitForm();
diff --git a/spec/migrations/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata_spec.rb b/spec/migrations/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata_spec.rb
new file mode 100644
index 00000000000..ece5ed8251d
--- /dev/null
+++ b/spec/migrations/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata_spec.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+require_migration!('cleanup_bigint_conversion_for_ci_builds_metadata')
+
+RSpec.describe CleanupBigintConversionForCiBuildsMetadata do
+ let(:ci_builds_metadata) { table(:ci_builds_metadata) }
+
+ it 'correctly migrates up and down' do
+ reversible_migration do |migration|
+ migration.before -> {
+ expect(ci_builds_metadata.column_names).to include('id_convert_to_bigint')
+ expect(ci_builds_metadata.column_names).to include('build_id_convert_to_bigint')
+ }
+
+ migration.after -> {
+ ci_builds_metadata.reset_column_information
+ expect(ci_builds_metadata.column_names).not_to include('id_convert_to_bigint')
+ expect(ci_builds_metadata.column_names).not_to include('build_id_convert_to_bigint')
+ }
+ end
+ end
+end
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb
index cfd8400dc76..a1c2444ee27 100644
--- a/spec/models/namespace_spec.rb
+++ b/spec/models/namespace_spec.rb
@@ -7,6 +7,10 @@ RSpec.describe Namespace do
include GitHelpers
include ReloadHelpers
+ let_it_be(:group_sti_name) { Group.sti_name }
+ let_it_be(:project_sti_name) { Namespaces::ProjectNamespace.sti_name }
+ let_it_be(:user_sti_name) { Namespaces::UserNamespace.sti_name }
+
let!(:namespace) { create(:namespace, :with_namespace_settings) }
let(:gitlab_shell) { Gitlab::Shell.new }
let(:repository_storage) { 'default' }
@@ -38,20 +42,22 @@ RSpec.describe Namespace do
context 'validating the parent of a namespace' do
using RSpec::Parameterized::TableSyntax
+ # rubocop:disable Lint/BinaryOperatorWithIdenticalOperands
where(:parent_type, :child_type, :error) do
- nil | 'User' | nil
- nil | 'Group' | nil
- nil | 'Project' | 'must be set for a project namespace'
- 'Project' | 'User' | 'project namespace cannot be the parent of another namespace'
- 'Project' | 'Group' | 'project namespace cannot be the parent of another namespace'
- 'Project' | 'Project' | 'project namespace cannot be the parent of another namespace'
- 'Group' | 'User' | 'cannot not be used for user namespace'
- 'Group' | 'Group' | nil
- 'Group' | 'Project' | nil
- 'User' | 'User' | 'cannot not be used for user namespace'
- 'User' | 'Group' | 'user namespace cannot be the parent of another namespace'
- 'User' | 'Project' | nil
- end
+ nil | ref(:user_sti_name) | nil
+ nil | ref(:group_sti_name) | nil
+ nil | ref(:project_sti_name) | 'must be set for a project namespace'
+ ref(:project_sti_name) | ref(:user_sti_name) | 'project namespace cannot be the parent of another namespace'
+ ref(:project_sti_name) | ref(:group_sti_name) | 'project namespace cannot be the parent of another namespace'
+ ref(:project_sti_name) | ref(:project_sti_name) | 'project namespace cannot be the parent of another namespace'
+ ref(:group_sti_name) | ref(:user_sti_name) | 'cannot not be used for user namespace'
+ ref(:group_sti_name) | ref(:group_sti_name) | nil
+ ref(:group_sti_name) | ref(:project_sti_name) | nil
+ ref(:user_sti_name) | ref(:user_sti_name) | 'cannot not be used for user namespace'
+ ref(:user_sti_name) | ref(:group_sti_name) | 'user namespace cannot be the parent of another namespace'
+ ref(:user_sti_name) | ref(:project_sti_name) | nil
+ end
+ # rubocop:enable Lint/BinaryOperatorWithIdenticalOperands
with_them do
it 'validates namespace parent' do
@@ -170,7 +176,7 @@ RSpec.describe Namespace do
let(:namespace) { Namespace.find(create(:namespace, type: namespace_type, parent: parent).id) }
context 'creating a Group' do
- let(:namespace_type) { 'Group' }
+ let(:namespace_type) { group_sti_name }
it 'is valid' do
expect(namespace).to be_a(Group)
@@ -180,7 +186,7 @@ RSpec.describe Namespace do
end
context 'creating a ProjectNamespace' do
- let(:namespace_type) { 'Project' }
+ let(:namespace_type) { project_sti_name }
let(:parent) { create(:group) }
it 'is valid' do
@@ -191,7 +197,7 @@ RSpec.describe Namespace do
end
context 'creating a UserNamespace' do
- let(:namespace_type) { 'User' }
+ let(:namespace_type) { user_sti_name }
it 'is valid' do
# TODO: We create a normal Namespace until
diff --git a/yarn.lock b/yarn.lock
index c0f440277c2..d04edfe90e0 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -933,10 +933,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/at.js/-/at.js-1.5.7.tgz#1ee6f838cc4410a1d797770934df91d90df8179e"
integrity sha512-c6ySRK/Ma7lxwpIVbSAF3P+xiTLrNTGTLRx4/pHK111AdFxwgUwrYF6aVZFXvmG65jHOJHoa0eQQ21RW6rm0Rg==
-"@gitlab/eslint-plugin@9.3.0":
- version "9.3.0"
- resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-9.3.0.tgz#c1765b28d5a2a29143c0a556650fb7527cd9ab0d"
- integrity sha512-c0bR9sgZuyHsC8xzYNrTl6koXBrLgBnVGG2UWwRbs8QnAF0Sf3LTPMjq0vulXZgKqPvMG++em0O5d6nN+oWvuQ==
+"@gitlab/eslint-plugin@9.4.0":
+ version "9.4.0"
+ resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-9.4.0.tgz#cad8f63b7985c22865859cc7d2688eb446ad0bbb"
+ integrity sha512-llPypEQrm9/6Xas5GCoSPAK7W/DgO7CKhzDvAk/Ea9BP0rI2+t8Wg4PFhE1XDctYnnUIS/GrdqVKQkpODk24hQ==
dependencies:
babel-eslint "^10.0.3"
eslint-config-airbnb-base "^14.2.1"