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:
-rw-r--r--GITALY_SERVER_VERSION2
-rw-r--r--app/assets/stylesheets/page_bundles/merge_requests.scss6
-rw-r--r--app/controllers/concerns/uploads_actions.rb2
-rw-r--r--app/models/appearance.rb6
-rw-r--r--config/routes/uploads.rb2
-rw-r--r--danger/ci_templates/Dangerfile15
-rw-r--r--danger/gitaly/Dangerfile4
-rw-r--r--danger/pipeline/Dangerfile6
-rw-r--r--db/migrate/20221223114543_add_pwa_icon_to_appearances.rb13
-rw-r--r--db/migrate/20221227080606_add_text_limit_to_pwa_icon.rb13
-rw-r--r--db/schema_migrations/202212231145431
-rw-r--r--db/schema_migrations/202212270806061
-rw-r--r--db/structure.sql4
-rw-r--r--doc/api/appearance.md11
-rw-r--r--doc/api/users.md74
-rw-r--r--doc/ci/yaml/index.md16
-rw-r--r--doc/user/permissions.md4
-rw-r--r--doc/user/project/import/bitbucket.md2
-rw-r--r--lib/api/appearance.rb1
-rw-r--r--lib/api/entities/appearance.rb4
-rw-r--r--lib/gitlab/analytics/cycle_analytics/request_params.rb2
-rw-r--r--spec/controllers/uploads_controller_spec.rb34
-rw-r--r--spec/factories/appearances.rb4
-rw-r--r--spec/models/appearance_spec.rb2
-rw-r--r--spec/requests/api/appearance_spec.rb4
25 files changed, 152 insertions, 81 deletions
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index 21bec6da00d..b846b693ba2 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-350364f6476bb6b0ef965418a5e1b1239ce2f85b
+faa85e577ef9dd8063e7a1096d04e68dd22da3fc
diff --git a/app/assets/stylesheets/page_bundles/merge_requests.scss b/app/assets/stylesheets/page_bundles/merge_requests.scss
index 2cc4ca55d19..5c699dd81df 100644
--- a/app/assets/stylesheets/page_bundles/merge_requests.scss
+++ b/app/assets/stylesheets/page_bundles/merge_requests.scss
@@ -1002,12 +1002,12 @@ $tabs-holder-z-index: 250;
.md-header {
.gl-tab-nav-item {
- @include gl-text-gray-900;
+ color: var(--gl-text-color, $gl-text-color);
@include gl-pb-5;
&:hover {
@include gl-bg-none;
- @include gl-text-gray-900;
+ color: var(--gl-text-color, $gl-text-color);
&:not(.gl-tab-nav-item-active) {
@include gl-inset-border-b-2-gray-200;
@@ -1017,7 +1017,7 @@ $tabs-holder-z-index: 250;
.gl-tab-nav-item-active {
@include gl-font-weight-bold;
- @include gl-text-gray-900;
+ color: var(--gl-text-color, $gl-text-color);
@include gl-inset-border-b-2-theme-accent;
&:active,
diff --git a/app/controllers/concerns/uploads_actions.rb b/app/controllers/concerns/uploads_actions.rb
index 0ba13896631..308da018a42 100644
--- a/app/controllers/concerns/uploads_actions.rb
+++ b/app/controllers/concerns/uploads_actions.rb
@@ -5,7 +5,7 @@ module UploadsActions
include Gitlab::Utils::StrongMemoize
include SendFileUpload
- UPLOAD_MOUNTS = %w[avatar attachment file logo header_logo favicon].freeze
+ UPLOAD_MOUNTS = %w[avatar attachment file logo pwa_icon header_logo favicon].freeze
included do
prepend_before_action :set_request_format_from_path_extension
diff --git a/app/models/appearance.rb b/app/models/appearance.rb
index de709667576..3a5e06e9a1c 100644
--- a/app/models/appearance.rb
+++ b/app/models/appearance.rb
@@ -23,6 +23,7 @@ class Appearance < ApplicationRecord
cache_markdown_field :footer_message, pipeline: :broadcast_message
validates :logo, file_size: { maximum: 1.megabyte }
+ validates :pwa_icon, file_size: { maximum: 1.megabyte }
validates :header_logo, file_size: { maximum: 1.megabyte }
validates :message_background_color, allow_blank: true, color: true
validates :message_font_color, allow_blank: true, color: true
@@ -31,6 +32,7 @@ class Appearance < ApplicationRecord
validate :single_appearance_row, on: :create
mount_uploader :logo, AttachmentUploader
+ mount_uploader :pwa_icon, AttachmentUploader
mount_uploader :header_logo, AttachmentUploader
mount_uploader :favicon, FaviconUploader
@@ -49,6 +51,10 @@ class Appearance < ApplicationRecord
logo_system_path(logo, 'logo')
end
+ def pwa_icon_path
+ logo_system_path(pwa_icon, 'pwa_icon')
+ end
+
def header_logo_path
logo_system_path(header_logo, 'header_logo')
end
diff --git a/config/routes/uploads.rb b/config/routes/uploads.rb
index 7b598e84975..ff4c11e805a 100644
--- a/config/routes/uploads.rb
+++ b/config/routes/uploads.rb
@@ -19,7 +19,7 @@ scope path: :uploads do
# Appearance
get "-/system/:model/:mounted_as/:id/:filename",
to: "uploads#show",
- constraints: { model: /appearance/, mounted_as: /logo|header_logo|favicon/, filename: /.+/ },
+ constraints: { model: /appearance/, mounted_as: /logo|header_logo|pwa_icon|favicon/, filename: /.+/ },
as: 'appearance_upload'
# create uploads for models, snippets (notes) available for now
diff --git a/danger/ci_templates/Dangerfile b/danger/ci_templates/Dangerfile
index ace9905e91d..bc8bba388c6 100644
--- a/danger/ci_templates/Dangerfile
+++ b/danger/ci_templates/Dangerfile
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-TEMPLATE_MESSAGE = <<~MSG
+CI_CD_TEMPLATE_MESSAGE = <<~MSG
This merge request requires a CI/CD Template review. To make sure these
changes are reviewed, take the following steps:
@@ -11,7 +11,7 @@ changes are reviewed, take the following steps:
1. Assign and `@` mention the CI/CD Template reviewer suggested by Reviewer Roulette.
MSG
-TEMPLATE_FILES_MESSAGE = <<~MSG
+CI_CD_TEMPLATE_FILES_MESSAGE = <<~MSG
The following files require a review from the CI/CD Templates maintainers:
MSG
@@ -20,9 +20,12 @@ return unless helper.ci?
template_paths_to_review = helper.changes_by_category[:ci_template]
if helper.mr_labels.include?('ci::templates') || template_paths_to_review.any?
- message 'This merge request adds or changes files that require a ' \
- 'review from the CI/CD Templates maintainers.'
+ message('This merge request adds or changes files that require a ' \
+ 'review from the CI/CD Templates maintainers.')
- markdown(TEMPLATE_MESSAGE)
- markdown(TEMPLATE_FILES_MESSAGE + helper.markdown_list(template_paths_to_review)) if template_paths_to_review.any?
+ markdown(CI_CD_TEMPLATE_MESSAGE)
+
+ if template_paths_to_review.any?
+ markdown(CI_CD_TEMPLATE_FILES_MESSAGE + helper.markdown_list(template_paths_to_review))
+ end
end
diff --git a/danger/gitaly/Dangerfile b/danger/gitaly/Dangerfile
index 59e55845c83..d7ff8d6446a 100644
--- a/danger/gitaly/Dangerfile
+++ b/danger/gitaly/Dangerfile
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-TEMPLATE_MESSAGE = <<~MSG
+GITALY_COORDINATION_MESSAGE = <<~MSG
This merge request requires coordination with gitaly deployments.
Before merging this merge request we should verify that gitaly
running in production already implements the new gRPC interface
@@ -18,5 +18,5 @@ changed_lines = helper.changed_lines('Gemfile.lock')
if changed_lines.any? { |line| line =~ /^\+\s+gitaly \(/ }
warn 'Changing gitaly gem can cause a multi-version incompatibility incident'
- markdown(TEMPLATE_MESSAGE)
+ markdown(GITALY_COORDINATION_MESSAGE)
end
diff --git a/danger/pipeline/Dangerfile b/danger/pipeline/Dangerfile
index 2fffd94be2e..c61fca86beb 100644
--- a/danger/pipeline/Dangerfile
+++ b/danger/pipeline/Dangerfile
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-MESSAGE = <<~MESSAGE
+PIPELINE_CHANGES_MESSAGE = <<~MSG
## Pipeline Changes
This merge request contains changes to the pipeline configuration for the GitLab project.
@@ -15,8 +15,8 @@ Please consider the effect of the changes in this merge request on the following
- Effects on [pipeline performance](https://about.gitlab.com/handbook/engineering/quality/performance-indicators/#average-merge-request-pipeline-duration-for-gitlab)
Please consider communicating these changes to the broader team following the [communication guideline for pipeline changes](https://about.gitlab.com/handbook/engineering/quality/engineering-productivity/#pipeline-changes)
-MESSAGE
+MSG
if helper.has_ci_changes?
- markdown(MESSAGE)
+ markdown(PIPELINE_CHANGES_MESSAGE)
end
diff --git a/db/migrate/20221223114543_add_pwa_icon_to_appearances.rb b/db/migrate/20221223114543_add_pwa_icon_to_appearances.rb
new file mode 100644
index 00000000000..9a1711be75d
--- /dev/null
+++ b/db/migrate/20221223114543_add_pwa_icon_to_appearances.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddPwaIconToAppearances < Gitlab::Database::Migration[2.1]
+ # rubocop:disable Migration/AddLimitToTextColumns
+ def up
+ add_column :appearances, :pwa_icon, :text
+ end
+ # rubocop:enable Migration/AddLimitToTextColumns
+
+ def down
+ remove_column :appearances, :pwa_icon
+ end
+end
diff --git a/db/migrate/20221227080606_add_text_limit_to_pwa_icon.rb b/db/migrate/20221227080606_add_text_limit_to_pwa_icon.rb
new file mode 100644
index 00000000000..66edad4f53e
--- /dev/null
+++ b/db/migrate/20221227080606_add_text_limit_to_pwa_icon.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddTextLimitToPwaIcon < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit :appearances, :pwa_icon, 1024
+ end
+
+ def down
+ remove_text_limit :appearances, :pwa_icon
+ end
+end
diff --git a/db/schema_migrations/20221223114543 b/db/schema_migrations/20221223114543
new file mode 100644
index 00000000000..0a36ef8a481
--- /dev/null
+++ b/db/schema_migrations/20221223114543
@@ -0,0 +1 @@
+09ecb70b517dd6a4116288bf10a399786a59ae0adfe9d6f9b600913c74347248 \ No newline at end of file
diff --git a/db/schema_migrations/20221227080606 b/db/schema_migrations/20221227080606
new file mode 100644
index 00000000000..fbb13af3578
--- /dev/null
+++ b/db/schema_migrations/20221227080606
@@ -0,0 +1 @@
+3dc372c96fad7f47f03b3bf5799af9fd19b2f9c9822116d28057227708abeeb2 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 62a5bb0ce7c..ac2cf0d4dc6 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -11080,8 +11080,10 @@ CREATE TABLE appearances (
profile_image_guidelines text,
profile_image_guidelines_html text,
pwa_short_name text,
+ pwa_icon text,
CONSTRAINT appearances_profile_image_guidelines CHECK ((char_length(profile_image_guidelines) <= 4096)),
- CONSTRAINT check_5c3fd63577 CHECK ((char_length(pwa_short_name) <= 255))
+ CONSTRAINT check_5c3fd63577 CHECK ((char_length(pwa_short_name) <= 255)),
+ CONSTRAINT check_5e5b7ac344 CHECK ((char_length(pwa_icon) <= 1024))
);
CREATE SEQUENCE appearances_id_seq
diff --git a/doc/api/appearance.md b/doc/api/appearance.md
index 9e70ff129d7..eb88ec5e1b3 100644
--- a/doc/api/appearance.md
+++ b/doc/api/appearance.md
@@ -31,6 +31,7 @@ Example response:
"title": "GitLab Test Instance",
"pwa_short_name": "GitLab",
"description": "gitlab-test.example.com",
+ "pwa_icon": "/uploads/-/system/appearance/pwa_icon/1/pwa_logo.png",
"logo": "/uploads/-/system/appearance/logo/1/logo.png",
"header_logo": "/uploads/-/system/appearance/header_logo/1/header.png",
"favicon": "/uploads/-/system/appearance/favicon/1/favicon.png",
@@ -57,6 +58,7 @@ PUT /application/appearance
| `title` | string | no | Instance title on the sign in / sign up page
| `pwa_short_name` | string | no | Optional, short name for Progressive Web App
| `description` | string | no | Markdown text shown on the sign in / sign up page
+| `pwa_icon` | mixed | no | Icon used for Progressive Web App. See [Change logo](#change-logo). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/375708) in GitLab 15.8.
| `logo` | mixed | no | Instance image used on the sign in / sign up page. See [Change logo](#change-logo)
| `header_logo` | mixed | no | Instance image used for the main navigation bar
| `favicon` | mixed | no | Instance favicon in `.ico` or `.png` format
@@ -79,6 +81,7 @@ Example response:
"title": "GitLab Test Instance",
"pwa_short_name": "GitLab",
"description": "gitlab-test.example.com",
+ "pwa_icon": "/uploads/-/system/appearance/pwa_icon/1/pwa_logo.png",
"logo": "/uploads/-/system/appearance/logo/1/logo.png",
"header_logo": "/uploads/-/system/appearance/header_logo/1/header.png",
"favicon": "/uploads/-/system/appearance/favicon/1/favicon.png",
@@ -105,9 +108,10 @@ preceded by `@`.
PUT /application/appearance
```
-| Attribute | Type | Required | Description |
-| --------- | ------ | -------- | -------------- |
-| `logo` | mixed | Yes | File to upload |
+| Attribute | Type | Required | Description |
+| --------- | ------ | -------- | -------------- |
+| `logo` | mixed | Yes | File to upload |
+| `pwa_icon` | mixed | Yes | File to upload. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/375708) in GitLab 15.8. |
Example request:
@@ -123,4 +127,5 @@ Returned object:
```json
{
"logo":"/uploads/-/system/appearance/logo/1/logo.png"
+}
```
diff --git a/doc/api/users.md b/doc/api/users.md
index 621049fc1d6..11ec5b6dcd1 100644
--- a/doc/api/users.md
+++ b/doc/api/users.md
@@ -12,7 +12,7 @@ Get a list of users.
This function takes pagination parameters `page` and `per_page` to restrict the list of users.
-### For normal users
+### For non-administrator users
```plaintext
GET /users
@@ -486,7 +486,7 @@ Parameters:
| `avatar` | No | Image file for user's avatar |
| `bio` | No | User's biography |
| `can_create_group` | No | User can create groups - true or false |
-| `color_scheme_id` | No | User's color scheme for the file viewer (see [the user preference docs](../user/profile/preferences.md#syntax-highlighting-theme) for more information) |
+| `color_scheme_id` | No | User's color scheme for the file viewer (for more information, see the [user preference documentation](../user/profile/preferences.md#syntax-highlighting-theme)) |
| `email` | Yes | Email |
| `extern_uid` | No | External UID |
| `external` | No | Flags the user as external - true or false (default) |
@@ -506,7 +506,7 @@ Parameters:
| `shared_runners_minutes_limit` **(PREMIUM)** | No | Can be set by administrators only. Maximum number of monthly CI/CD minutes for this user. Can be `nil` (default; inherit system default), `0` (unlimited), or `> 0`. |
| `skip_confirmation` | No | Skip confirmation - true or false (default) |
| `skype` | No | Skype ID |
-| `theme_id` | No | GitLab theme for the user (see [the user preference docs](../user/profile/preferences.md#navigation-theme) for more information) |
+| `theme_id` | No | GitLab theme for the user (for more information, see the [user preference documentation](../user/profile/preferences.md#navigation-theme) for more information) |
| `twitter` | No | Twitter account |
| `username` | Yes | Username |
| `view_diffs_file_by_file` | No | Flag indicating the user sees only one file diff per page |
@@ -534,7 +534,7 @@ Parameters:
| `avatar` | No | Image file for user's avatar |
| `bio` | No | User's biography |
| `can_create_group` | No | User can create groups - true or false |
-| `color_scheme_id` | No | User's color scheme for the file viewer (see [the user preference docs](../user/profile/preferences.md#syntax-highlighting-theme) for more information) |
+| `color_scheme_id` | No | User's color scheme for the file viewer (for more information, see the [user preference documentation](../user/profile/preferences.md#syntax-highlighting-theme) for more information) |
| `commit_email` | No | User's commit email. Set to `_private` to use the private commit email. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/375148) in GitLab 15.5. |
| `email` | No | Email |
| `extern_uid` | No | External UID |
@@ -556,7 +556,7 @@ Parameters:
| `shared_runners_minutes_limit` **(PREMIUM)** | No | Can be set by administrators only. Maximum number of monthly CI/CD minutes for this user. Can be `nil` (default; inherit system default), `0` (unlimited) or `> 0`. |
| `skip_reconfirmation` | No | Skip reconfirmation - true or false (default) |
| `skype` | No | Skype ID |
-| `theme_id` | No | GitLab theme for the user (see [the user preference docs](../user/profile/preferences.md#navigation-theme) for more information) |
+| `theme_id` | No | GitLab theme for the user (for more information, see the [user preference documentation](../user/profile/preferences.md#navigation-theme) for more information) |
| `twitter` | No | Twitter account |
| `username` | No | Username |
| `view_diffs_file_by_file` | No | Flag indicating the user sees only one file diff per page |
@@ -602,9 +602,9 @@ Parameters:
Get current user.
-### For normal users
+### For non-administrator users
-Gets currently authenticated user.
+Gets the authenticated user.
```plaintext
GET /user
@@ -730,7 +730,7 @@ parameters:
## User status
-Get the status of the currently signed in user.
+Get the status of the signed in user.
```plaintext
GET /user/status
@@ -797,7 +797,7 @@ PATCH /user/status
Difference between `PUT` and `PATCH`
-When using `PUT` any parameters that are not passed will be set to `null` and therefore cleared. When using `PATCH` any parameters that are not passed will be ignored. Explicitly pass `null` to clear a field.
+When using `PUT` any parameters that are not passed are set to `null` and therefore cleared. When using `PATCH` any parameters that are not passed are ignored. Explicitly pass `null` to clear a field.
```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --data "clear_status_after=1_day" --data "emoji=coffee" \
@@ -817,7 +817,7 @@ Example responses
## Get user preferences
-Get a list of currently authenticated user's preferences.
+Get a list of the authenticated user's preferences.
```plaintext
GET /user/preferences
@@ -946,7 +946,7 @@ Example response:
## User counts
-Get the counts (same as in top right menu) of the currently signed in user.
+Get the counts (same as in top right menu) of the signed in user.
| Attribute | Type | Description |
| --------------------------------- | ------ | ---------------------------------------------------------------------------- |
@@ -978,11 +978,16 @@ Example response:
## List user projects
-Please refer to the [List of user projects](projects.md#list-user-projects).
+See the [list of user projects](projects.md#list-user-projects).
## List associations count for user
-Get a list of a specified user's count of projects, groups, issues and merge requests.
+Get a list of a specified user's count of:
+
+- Projects.
+- Groups.
+- Issues.
+- Merge requests.
Administrators can query any user, but non-administrators can only query themselves.
@@ -1009,7 +1014,7 @@ Example response:
## List SSH keys
-Get a list of currently authenticated user's SSH keys.
+Get a list of the authenticated user's SSH keys.
```plaintext
GET /user/keys
@@ -1101,7 +1106,7 @@ Parameters:
> The `usage_type` parameter was [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/105551) in GitLab 15.7.
-Creates a new key owned by the currently authenticated user.
+Creates a new key owned by the authenticated user.
```plaintext
POST /user/keys
@@ -1191,8 +1196,10 @@ This also adds an audit event, as described in [audit instance events](../admini
## Delete SSH key for current user
-Deletes key owned by currently authenticated user.
-This returns a `204 No Content` status code if the operation was successfully or `404` if the resource was not found.
+Deletes key owned by the authenticated user.
+
+This returns a `204 No Content` status code if the operation was successfully
+or `404` if the resource was not found.
```plaintext
DELETE /user/keys/:key_id
@@ -1221,7 +1228,7 @@ Parameters:
## List all GPG keys
-Get a list of currently authenticated user's GPG keys.
+Get a list of the authenticated user's GPG keys.
```plaintext
GET /user/gpg_keys
@@ -1245,7 +1252,7 @@ Example response:
## Get a specific GPG key
-Get a specific GPG key of currently authenticated user.
+Get a specific GPG key of authenticated user.
```plaintext
GET /user/gpg_keys/:key_id
@@ -1273,7 +1280,7 @@ Example response:
## Add a GPG key
-Creates a new GPG key owned by the currently authenticated user.
+Creates a new GPG key owned by the authenticated user.
```plaintext
POST /user/gpg_keys
@@ -1304,7 +1311,7 @@ Example response:
## Delete a GPG key
-Delete a GPG key owned by currently authenticated user.
+Delete a GPG key owned by the authenticated user.
```plaintext
DELETE /user/gpg_keys/:key_id
@@ -1435,11 +1442,10 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://git
## List emails
-Get a list of currently authenticated user's emails.
+Get a list of the authenticated user's emails.
NOTE:
-Due to [a bug](https://gitlab.com/gitlab-org/gitlab/-/issues/25077) this endpoint currently
-does not return the primary email address.
+This endpoint does not return the primary email address, but [issue 25077](https://gitlab.com/gitlab-org/gitlab/-/issues/25077) proposes to change this behavior.
```plaintext
GET /user/emails
@@ -1469,8 +1475,7 @@ Parameters:
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
-does not return the primary email address.
+This endpoint does not return the primary email address, but [issue 25077](https://gitlab.com/gitlab-org/gitlab/-/issues/25077) proposes to change this behavior.
```plaintext
GET /users/:id/emails
@@ -1506,7 +1511,7 @@ Parameters:
## Add email
-Creates a new email owned by the currently authenticated user.
+Creates a new email owned by the authenticated user.
```plaintext
POST /user/emails
@@ -1557,8 +1562,11 @@ Parameters:
## Delete email for current user
-Deletes email owned by currently authenticated user.
-This returns a `204 No Content` status code if the operation was successfully or `404` if the resource was not found.
+Deletes email owned by authenticated user.
+
+This returns a `204 No Content` status code if the operation was successfully
+or `404` if the resource was not found.
+
This cannot delete a primary email address.
```plaintext
@@ -1649,10 +1657,10 @@ Returns:
- `201 OK` on success.
- `404 User Not Found` if user cannot be found.
-- `403 Forbidden` when trying to deactivate a user:
+- `403 Forbidden` when trying to deactivate a user that is:
- Blocked by administrator or by LDAP synchronization.
- - That is not [dormant](../user/admin_area/moderate_users.md#automatically-deactivate-dormant-users).
- - That is internal.
+ - Not [dormant](../user/admin_area/moderate_users.md#automatically-deactivate-dormant-users).
+ - Internal.
## Activate user **(FREE SELF)**
@@ -1718,7 +1726,7 @@ Returns:
## Get user contribution events
-Please refer to the [Events API documentation](events.md#get-user-contribution-events)
+See the [Events API documentation](events.md#get-user-contribution-events)
## Get all impersonation tokens of a user **(FREE SELF)**
diff --git a/doc/ci/yaml/index.md b/doc/ci/yaml/index.md
index b6ddbf5a1a2..6a7089f7599 100644
--- a/doc/ci/yaml/index.md
+++ b/doc/ci/yaml/index.md
@@ -669,6 +669,7 @@ In this example, `job1` and `job2` run in parallel:
**Additional details**:
- You can use `allow_failure` as a subkey of [`rules`](#rulesallow_failure).
+- If `allow_failure: true` is set, the job is always considered successful, and later jobs with [`when: on_failure`](#when) don't start if this job fails.
- You can use `allow_failure: false` with a manual job to create a [blocking manual job](../jobs/job_control.md#types-of-manual-jobs).
A blocked pipeline does not run any jobs in later stages until the manual job
is started and completes successfully.
@@ -1299,6 +1300,11 @@ Untracked files include files that are:
- Ignored due to [`.gitignore` configuration](https://git-scm.com/docs/gitignore).
- Created, but not added to the checkout with [`git add`](https://git-scm.com/docs/git-add).
+Caching untracked files can create unexpectedly large caches if the job downloads:
+
+- Dependencies, like gems or node modules, which are usually untracked.
+- [Artifacts](#artifacts) from a different job. Files extracted from the artifacts are untracked by default.
+
**Keyword type**: Job keyword. You can use it only as part of a job or in the
[`default` section](#default).
@@ -1317,8 +1323,9 @@ rspec:
**Additional details**:
-- You can combine `cache:untracked` with `cache:paths` to cache all untracked files
- as well as files in the configured paths. This is useful for including files that are not tracked because of a `.gitignore` configuration. For example:
+- You can combine `cache:untracked` with `cache:paths` to cache all untracked files, as well as files in the configured paths.
+ Use `cache:paths` to cache any specific files, including tracked files, or files that are outside of the working directory,
+ and use `cache: untracked` to also cache all untracked files. For example:
```yaml
rspec:
@@ -1329,6 +1336,9 @@ rspec:
- binaries/
```
+ In this example, the job caches all untracked files in the repository, as well as all the files in `binaries/`.
+ If there are untracked files in `binaries/`, they are covered by both keywords.
+
#### `cache:unprotect`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/362114) in GitLab 15.8.
@@ -4427,7 +4437,7 @@ the default value is `when: on_success`.
or have `allow_failure: true`.
- `manual`: Run the job only when [triggered manually](../jobs/job_control.md#create-a-job-that-must-be-run-manually).
- `always`: Run the job regardless of the status of jobs in earlier stages. Can also be used in `workflow:rules`.
-- `on_failure`: Run the job only when at least one job in an earlier stage fails.
+- `on_failure`: Run the job only when at least one job in an earlier stage fails. A job with `allow_failure: true` is always considered successful.
- `delayed`: [Delay the execution of a job](../jobs/job_control.md#run-a-job-after-a-delay)
for a specified duration.
- `never`: Don't run the job. Can only be used in a [`rules`](#rules) section or `workflow: rules`.
diff --git a/doc/user/permissions.md b/doc/user/permissions.md
index 8e172dcebce..955c2121b32 100644
--- a/doc/user/permissions.md
+++ b/doc/user/permissions.md
@@ -222,8 +222,8 @@ The following table lists project permissions available for each role:
1. On self-managed GitLab instances, guest users are able to perform this action only on
public and internal projects (not on private projects). [External users](admin_area/external_users.md)
- must be given explicit access even if the project is internal. For GitLab.com, see the
- [GitLab.com visibility settings](gitlab_com/index.md#visibility-settings).
+ must be given explicit access even if the project is internal. Users with the Guest role on GitLab.com are
+ only able to perform this action on public projects because internal visibility is not available.
2. Guest users can only view the [confidential issues](project/issues/confidential_issues.md) they created themselves or are assigned to.
3. Not allowed for Guest, Reporter, Developer, Maintainer, or Owner. See [protected branches](project/protected_branches.md).
4. If the [branch is protected](project/protected_branches.md), this depends on the access given to Developers and Maintainers.
diff --git a/doc/user/project/import/bitbucket.md b/doc/user/project/import/bitbucket.md
index 98b46650b42..2a97848d089 100644
--- a/doc/user/project/import/bitbucket.md
+++ b/doc/user/project/import/bitbucket.md
@@ -102,7 +102,7 @@ Bitbucket username after connecting their Bitbucket account in the
To fix this, the user must verify that their Bitbucket external UID in the GitLab database matches their
current Bitbucket public name, and reconnect if there's a mismatch:
-1. [Use the API to get the currently authenticated user](../../../api/users.md#for-normal-users-1).
+1. [Use the API to get the currently authenticated user](../../../api/users.md#for-non-administrator-users-1).
1. In the API response, the `identities` attribute contains the Bitbucket account that exists in
the GitLab database. If the `extern_uid` doesn't match the current Bitbucket public name, the
diff --git a/lib/api/appearance.rb b/lib/api/appearance.rb
index 84b6b499117..99278bdf8b0 100644
--- a/lib/api/appearance.rb
+++ b/lib/api/appearance.rb
@@ -30,6 +30,7 @@ module API
optional :description, type: String, desc: 'Markdown text shown on the sign in / sign up page'
# TODO: remove rubocop disable - https://gitlab.com/gitlab-org/gitlab/issues/14960
optional :logo, type: File, desc: 'Instance image used on the sign in / sign up page' # rubocop:disable Scalability/FileUploads
+ optional :pwa_icon, type: File, desc: 'Icon used for Progressive Web App' # rubocop:disable Scalability/FileUploads
optional :header_logo, type: File, desc: 'Instance image used for the main navigation bar' # rubocop:disable Scalability/FileUploads
optional :favicon, type: File, desc: 'Instance favicon in .ico/.png format' # rubocop:disable Scalability/FileUploads
optional :new_project_guidelines, type: String, desc: 'Markdown text shown on the new project page'
diff --git a/lib/api/entities/appearance.rb b/lib/api/entities/appearance.rb
index 42a9103d7ca..cabdf68c23a 100644
--- a/lib/api/entities/appearance.rb
+++ b/lib/api/entities/appearance.rb
@@ -11,6 +11,10 @@ module API
appearance.logo.url
end
+ expose :pwa_icon do |appearance, options|
+ appearance.pwa_icon.url
+ end
+
expose :header_logo do |appearance, options|
appearance.header_logo.url
end
diff --git a/lib/gitlab/analytics/cycle_analytics/request_params.rb b/lib/gitlab/analytics/cycle_analytics/request_params.rb
index 42a7d8eecb0..d058782ae87 100644
--- a/lib/gitlab/analytics/cycle_analytics/request_params.rb
+++ b/lib/gitlab/analytics/cycle_analytics/request_params.rb
@@ -106,7 +106,7 @@ module Gitlab
def use_aggregated_backend?
# for now it's only available on the group-level
- group.present? && aggregation.enabled
+ group.present?
end
def aggregation_attributes
diff --git a/spec/controllers/uploads_controller_spec.rb b/spec/controllers/uploads_controller_spec.rb
index e128db8d1c1..f6348bc0f1e 100644
--- a/spec/controllers/uploads_controller_spec.rb
+++ b/spec/controllers/uploads_controller_spec.rb
@@ -640,19 +640,17 @@ RSpec.describe UploadsController do
end
context 'Appearance' do
- context 'when viewing a custom header logo' do
- let!(:appearance) { create :appearance, header_logo: fixture_file_upload('spec/fixtures/dk.png', 'image/png') }
-
+ shared_examples 'view custom logo' do |mounted_as|
context 'when not signed in' do
it 'responds with status 200' do
- get :show, params: { model: 'appearance', mounted_as: 'header_logo', id: appearance.id, filename: 'dk.png' }
+ get :show, params: { model: 'appearance', mounted_as: mounted_as, id: appearance.id, filename: 'dk.png' }
expect(response).to have_gitlab_http_status(:ok)
end
it_behaves_like 'content publicly cached' do
subject do
- get :show, params: { model: 'appearance', mounted_as: 'header_logo', id: appearance.id, filename: 'dk.png' }
+ get :show, params: { model: 'appearance', mounted_as: mounted_as, id: appearance.id, filename: 'dk.png' }
response
end
@@ -660,24 +658,22 @@ RSpec.describe UploadsController do
end
end
- context 'when viewing a custom logo' do
- let!(:appearance) { create :appearance, logo: fixture_file_upload('spec/fixtures/dk.png', 'image/png') }
+ context 'when viewing a custom pwa icon' do
+ let!(:appearance) { create :appearance, pwa_icon: fixture_file_upload('spec/fixtures/dk.png', 'image/png') }
- context 'when not signed in' do
- it 'responds with status 200' do
- get :show, params: { model: 'appearance', mounted_as: 'logo', id: appearance.id, filename: 'dk.png' }
+ it_behaves_like 'view custom logo', 'pwa_icon'
+ end
- expect(response).to have_gitlab_http_status(:ok)
- end
+ context 'when viewing a custom header logo' do
+ let!(:appearance) { create :appearance, header_logo: fixture_file_upload('spec/fixtures/dk.png', 'image/png') }
- it_behaves_like 'content publicly cached' do
- subject do
- get :show, params: { model: 'appearance', mounted_as: 'logo', id: appearance.id, filename: 'dk.png' }
+ it_behaves_like 'view custom logo', 'header_logo'
+ end
- response
- end
- end
- end
+ context 'when viewing a custom logo' do
+ let!(:appearance) { create :appearance, logo: fixture_file_upload('spec/fixtures/dk.png', 'image/png') }
+
+ it_behaves_like 'view custom logo', 'logo'
end
end
diff --git a/spec/factories/appearances.rb b/spec/factories/appearances.rb
index 8101cd8d8bf..321c31d7565 100644
--- a/spec/factories/appearances.rb
+++ b/spec/factories/appearances.rb
@@ -18,6 +18,10 @@ FactoryBot.define do
header_logo { fixture_file_upload('spec/fixtures/dk.png') }
end
+ trait :with_pwa_icon do
+ pwa_icon { fixture_file_upload('spec/fixtures/dk.png') }
+ end
+
trait :with_favicon do
favicon { fixture_file_upload('spec/fixtures/dk.png') }
end
diff --git a/spec/models/appearance_spec.rb b/spec/models/appearance_spec.rb
index 52a9bc31d2a..54dc280d7ac 100644
--- a/spec/models/appearance_spec.rb
+++ b/spec/models/appearance_spec.rb
@@ -77,7 +77,7 @@ RSpec.describe Appearance do
end
end
- %i(logo header_logo favicon).each do |logo_type|
+ %i(logo header_logo pwa_icon favicon).each do |logo_type|
it_behaves_like 'logo paths', logo_type
end
diff --git a/spec/requests/api/appearance_spec.rb b/spec/requests/api/appearance_spec.rb
index 44ba55d82d7..5aba7e096a7 100644
--- a/spec/requests/api/appearance_spec.rb
+++ b/spec/requests/api/appearance_spec.rb
@@ -23,6 +23,7 @@ RSpec.describe API::Appearance, 'Appearance', feature_category: :navigation do
expect(json_response).to be_an Hash
expect(json_response['description']).to eq('')
expect(json_response['email_header_and_footer_enabled']).to be(false)
+ expect(json_response['pwa_icon']).to be_nil
expect(json_response['favicon']).to be_nil
expect(json_response['footer_message']).to eq('')
expect(json_response['header_logo']).to be_nil
@@ -62,6 +63,7 @@ RSpec.describe API::Appearance, 'Appearance', feature_category: :navigation do
expect(json_response).to be_an Hash
expect(json_response['description']).to eq('gitlab-test.example.com')
expect(json_response['email_header_and_footer_enabled']).to be(false)
+ expect(json_response['pwa_icon']).to be_nil
expect(json_response['favicon']).to be_nil
expect(json_response['footer_message']).to eq('')
expect(json_response['header_logo']).to be_nil
@@ -118,12 +120,14 @@ RSpec.describe API::Appearance, 'Appearance', feature_category: :navigation do
put api("/application/appearance", admin), params: {
logo: fixture_file_upload("spec/fixtures/dk.png", "image/png"),
header_logo: fixture_file_upload("spec/fixtures/dk.png", "image/png"),
+ pwa_icon: fixture_file_upload("spec/fixtures/dk.png", "image/png"),
favicon: fixture_file_upload("spec/fixtures/dk.png", "image/png")
}
expect(response).to have_gitlab_http_status(:ok)
expect(json_response['logo']).to eq("/uploads/-/system/appearance/logo/#{appearance.id}/dk.png")
expect(json_response['header_logo']).to eq("/uploads/-/system/appearance/header_logo/#{appearance.id}/dk.png")
+ expect(json_response['pwa_icon']).to eq("/uploads/-/system/appearance/pwa_icon/#{appearance.id}/dk.png")
expect(json_response['favicon']).to eq("/uploads/-/system/appearance/favicon/#{appearance.id}/dk.png")
end