diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-25 06:07:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-25 06:07:45 +0300 |
commit | 3b0494df16590fbb3dd085841655b9099ecc7564 (patch) | |
tree | 22934ae1bfbe6583b2021cf13845bc60a55b4dde | |
parent | ce545ca5d74c9eabf6f2412c1332820c81342271 (diff) |
Add latest changes from gitlab-org/gitlab@master
-rw-r--r-- | app/assets/javascripts/members/components/action_dropdowns/constants.js | 1 | ||||
-rw-r--r-- | app/assets/javascripts/members/components/action_dropdowns/user_action_dropdown.vue | 13 | ||||
-rw-r--r-- | db/migrate/20230119214643_add_deactivation_email_additional_text_to_application_settings.rb | 12 | ||||
-rw-r--r-- | db/migrate/20230123150648_add_deactivation_email_additional_text_to_application_settings_text_limits.rb | 13 | ||||
-rw-r--r-- | db/schema_migrations/20230119214643 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20230123150648 | 1 | ||||
-rw-r--r-- | db/structure.sql | 2 | ||||
-rw-r--r-- | doc/api/jobs.md | 3 | ||||
-rw-r--r-- | doc/api/rest/index.md | 1 | ||||
-rw-r--r-- | doc/ci/testing/code_quality.md | 8 | ||||
-rw-r--r-- | doc/user/application_security/index.md | 4 | ||||
-rw-r--r-- | doc/user/group/import/index.md | 2 | ||||
-rw-r--r-- | doc/user/group/reporting/git_abuse_rate_limit.md | 14 | ||||
-rw-r--r-- | locale/gitlab.pot | 3 |
14 files changed, 66 insertions, 12 deletions
diff --git a/app/assets/javascripts/members/components/action_dropdowns/constants.js b/app/assets/javascripts/members/components/action_dropdowns/constants.js index 8ccfc57dc28..ce6865a8f0a 100644 --- a/app/assets/javascripts/members/components/action_dropdowns/constants.js +++ b/app/assets/javascripts/members/components/action_dropdowns/constants.js @@ -19,4 +19,5 @@ export const I18N = { lastGroupOwnerCannotBeRemoved: s__( 'Members|A group must have at least one owner. To remove the member, assign a new owner.', ), + banMember: s__('Members|Ban member'), }; diff --git a/app/assets/javascripts/members/components/action_dropdowns/user_action_dropdown.vue b/app/assets/javascripts/members/components/action_dropdowns/user_action_dropdown.vue index 82f5c5457ec..c82ebadea6e 100644 --- a/app/assets/javascripts/members/components/action_dropdowns/user_action_dropdown.vue +++ b/app/assets/javascripts/members/components/action_dropdowns/user_action_dropdown.vue @@ -23,6 +23,8 @@ export default { import('ee_component/members/components/action_dropdowns/ldap_override_dropdown_item.vue'), LeaveGroupDropdownItem, RemoveMemberDropdownItem, + BanMemberDropdownItem: () => + import('ee_component/members/components/action_dropdowns/ban_member_dropdown_item.vue'), }, directives: { GlTooltip: GlTooltipDirective, @@ -77,7 +79,10 @@ export default { }, showDropdown() { return ( - this.permissions.canDisableTwoFactor || this.showLeaveOrRemove || this.showLdapOverride + this.permissions.canDisableTwoFactor || + this.showLeaveOrRemove || + this.showLdapOverride || + this.showBan ); }, showLeaveOrRemove() { @@ -86,6 +91,9 @@ export default { showLdapOverride() { return this.permissions.canOverride && !this.member.isOverridden; }, + showBan() { + return !this.isCurrentUser && this.permissions.canBan; + }, }, }; </script> @@ -130,5 +138,8 @@ export default { <ldap-override-dropdown-item v-else-if="showLdapOverride" :member="member">{{ $options.i18n.editPermissions }}</ldap-override-dropdown-item> + <ban-member-dropdown-item v-if="showBan" :member="member">{{ + $options.i18n.banMember + }}</ban-member-dropdown-item> </gl-dropdown> </template> diff --git a/db/migrate/20230119214643_add_deactivation_email_additional_text_to_application_settings.rb b/db/migrate/20230119214643_add_deactivation_email_additional_text_to_application_settings.rb new file mode 100644 index 00000000000..e2b3e12c0ef --- /dev/null +++ b/db/migrate/20230119214643_add_deactivation_email_additional_text_to_application_settings.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class AddDeactivationEmailAdditionalTextToApplicationSettings < Gitlab::Database::Migration[2.1] + enable_lock_retries! + + # rubocop:disable Migration/AddLimitToTextColumns + # limit is added in 20230123150648_add_deactivation_email_additional_text_to_application_settings_text_limits.rb + def change + add_column :application_settings, :deactivation_email_additional_text, :text + end + # rubocop:enable Migration/AddLimitToTextColumns +end diff --git a/db/migrate/20230123150648_add_deactivation_email_additional_text_to_application_settings_text_limits.rb b/db/migrate/20230123150648_add_deactivation_email_additional_text_to_application_settings_text_limits.rb new file mode 100644 index 00000000000..ae3d3a516e3 --- /dev/null +++ b/db/migrate/20230123150648_add_deactivation_email_additional_text_to_application_settings_text_limits.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class AddDeactivationEmailAdditionalTextToApplicationSettingsTextLimits < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + def up + add_text_limit :application_settings, :deactivation_email_additional_text, 1000 + end + + def down + remove_text_limit :application_settings, :deactivation_email_additional_text + end +end diff --git a/db/schema_migrations/20230119214643 b/db/schema_migrations/20230119214643 new file mode 100644 index 00000000000..4b7817ad6ad --- /dev/null +++ b/db/schema_migrations/20230119214643 @@ -0,0 +1 @@ +9bd94352c496d2554d6f96cc8aeda484b3efa894f88d5f8ae69f01ef3a2982bf
\ No newline at end of file diff --git a/db/schema_migrations/20230123150648 b/db/schema_migrations/20230123150648 new file mode 100644 index 00000000000..859934593fc --- /dev/null +++ b/db/schema_migrations/20230123150648 @@ -0,0 +1 @@ +2e6b5f695349f464cbd5c73cffbb55e86044c6edf8708f785291ab85c0a4edbb
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index cbc4b291335..793eddd8c25 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -11599,6 +11599,7 @@ CREATE TABLE application_settings ( search_max_shard_size_gb integer DEFAULT 50 NOT NULL, search_max_docs_denominator integer DEFAULT 5000000 NOT NULL, search_min_docs_before_rollover integer DEFAULT 100000 NOT NULL, + deactivation_email_additional_text text, CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)), CONSTRAINT app_settings_container_registry_pre_import_tags_rate_positive CHECK ((container_registry_pre_import_tags_rate >= (0)::numeric)), CONSTRAINT app_settings_dep_proxy_ttl_policies_worker_capacity_positive CHECK ((dependency_proxy_ttl_group_policy_worker_capacity >= 0)), @@ -11636,6 +11637,7 @@ CREATE TABLE application_settings ( CONSTRAINT check_9a719834eb CHECK ((char_length(secret_detection_token_revocation_url) <= 255)), CONSTRAINT check_9c6c447a13 CHECK ((char_length(maintenance_mode_message) <= 255)), CONSTRAINT check_a5704163cc CHECK ((char_length(secret_detection_revocation_token_types_url) <= 255)), + CONSTRAINT check_b8c74ea5b3 CHECK ((char_length(deactivation_email_additional_text) <= 1000)), CONSTRAINT check_d03919528d CHECK ((char_length(container_registry_vendor) <= 255)), CONSTRAINT check_d4865d70f3 CHECK ((char_length(clickhouse_connection_string) <= 1024)), CONSTRAINT check_d820146492 CHECK ((char_length(spam_check_endpoint_url) <= 255)), diff --git a/doc/api/jobs.md b/doc/api/jobs.md index 64516f0c86b..2d65ea82edd 100644 --- a/doc/api/jobs.md +++ b/doc/api/jobs.md @@ -12,6 +12,9 @@ Get a list of jobs in a project. Jobs are sorted in descending order of their ID By default, this request returns 20 results at a time because the API results [are paginated](rest/index.md#pagination) +This endpoint supports both offset-based and [keyset-based](rest/index.md#keyset-based-pagination) pagination. Keyset-based +pagination is recommended when requesting consecutive pages of results. + ```plaintext GET /projects/:id/jobs ``` diff --git a/doc/api/rest/index.md b/doc/api/rest/index.md index 171267e0815..527677975ef 100644 --- a/doc/api/rest/index.md +++ b/doc/api/rest/index.md @@ -488,6 +488,7 @@ options: | [Projects](../projects.md) | `order_by=id` only | Authenticated and unauthenticated users | | [Groups](../groups.md) | `order_by=name`, `sort=asc` only | Unauthenticated users only | | [Group audit events](../audit_events.md#group-audit-events) | `order_by=id`, `sort=desc` only | Authenticated users only ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/333968) in GitLab 15.2) | +| [Jobs](../jobs.md) | `order_by=id`, `sort=desc` only | Authenticated users only ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/362172) in GitLab 15.9) | ### Pagination response headers diff --git a/doc/ci/testing/code_quality.md b/doc/ci/testing/code_quality.md index 2a1dffe07fc..08fa287843a 100644 --- a/doc/ci/testing/code_quality.md +++ b/doc/ci/testing/code_quality.md @@ -531,8 +531,6 @@ This can be due to multiple reasons: - Your pipeline is not set to run the code quality job on your target branch. If there is no report generated from the target branch, your merge request branch reports have nothing to compare to. In this situation you get an error stating `Base pipeline codequality artifact not found`. -- If no [degradation or error is detected](https://docs.codeclimate.com/docs/maintainability#section-checks), - nothing is displayed. - The [`artifacts:expire_in`](../yaml/index.md#artifactsexpire_in) CI/CD setting can cause the Code Quality artifacts to expire faster than desired. - The widgets use the pipeline of the latest commit to the target branch. If commits are made to the @@ -540,12 +538,6 @@ This can be due to multiple reasons: have no base report for comparison. - If you use the [`REPORT_STDOUT` environment variable](https://gitlab.com/gitlab-org/ci-cd/codequality#environment-variables), no report file is generated and nothing displays in the merge request. -- Large `gl-code-quality-report.json` files (esp. >10 MB) are [known to prevent the report from being displayed](https://gitlab.com/gitlab-org/gitlab/-/issues/2737). - As a workaround, try removing [properties](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types) - that are [ignored by GitLab](#implement-a-custom-tool). You can: - - Configure the Code Quality tool to not output those types. - - Use `sed`, `awk` or similar commands in the `.gitlab-ci.yml` script to edit the - `gl-code-quality-report.json` before the job completes. ### Only a single Code Quality report is displayed, but more are defined diff --git a/doc/user/application_security/index.md b/doc/user/application_security/index.md index 2adc8808572..3b2ae3ae280 100644 --- a/doc/user/application_security/index.md +++ b/doc/user/application_security/index.md @@ -443,9 +443,9 @@ You can always find supported and deprecated schema versions in the [source code You can interact with the results of the security scanning tools in several locations: - [Scan information in merge requests](#view-security-scan-information-in-merge-requests) -- [Project Security Dashboard](security_dashboard/index.md) +- [Project Security Dashboard](security_dashboard/index.md#view-vulnerabilities-over-time-for-a-project) - [Security pipeline tab](security_dashboard/index.md) -- [Group Security Dashboard](security_dashboard/index.md) +- [Group Security Dashboard](security_dashboard/index.md#view-vulnerabilities-over-time-for-a-group) - [Security Center](security_dashboard/index.md#security-center) - [Vulnerability Report](vulnerability_report/index.md) - [Vulnerability Pages](vulnerabilities/index.md) diff --git a/doc/user/group/import/index.md b/doc/user/group/import/index.md index a4a9c71eb3b..02d4f098b5d 100644 --- a/doc/user/group/import/index.md +++ b/doc/user/group/import/index.md @@ -63,7 +63,7 @@ Not all group and project resources are imported. See list of migrated resources - [Migrated group items](#migrated-group-items). - [Migrated project items](#migrated-project-items-beta). -Please leave your feedback about migrating by direct transfer in +We invite you to leave your feedback about migrating by direct transfer in [the feedback issue](https://gitlab.com/gitlab-org/gitlab/-/issues/284495). ### Visibility rules diff --git a/doc/user/group/reporting/git_abuse_rate_limit.md b/doc/user/group/reporting/git_abuse_rate_limit.md index a5515079294..14b188e1204 100644 --- a/doc/user/group/reporting/git_abuse_rate_limit.md +++ b/doc/user/group/reporting/git_abuse_rate_limit.md @@ -38,3 +38,17 @@ Prerequisites: 1. On the left sidebar, select **Group information > Members**. 1. Select the **Banned** tab. 1. For the account you want to unban, select **Unban**. + +## Ban a user + +> [Introduced](https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/155) in GitLab 15.8. + +Prerequisites: + +- You must have the Owner role. + +To manually ban a user: + +1. On the left sidebar, select **Group information > Members**. +1. Next to the member you want to ban, select the vertical ellipsis (**{ellipsis_v}**). +1. From the dropdown list, select **Ban member**. diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 1e5375d8b10..512432a0a0c 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -26123,6 +26123,9 @@ msgstr "" msgid "Members|Are you sure you want to withdraw your access request for \"%{source}\"" msgstr "" +msgid "Members|Ban member" +msgstr "" + msgid "Members|Cannot leave \"%{source}\"" msgstr "" |