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>2023-12-20 15:07:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-20 15:07:18 +0300
commit6cde390d022b50a8a80c0f7d3950771474129562 (patch)
tree09f3ba747a6a9567372b9218cca11285d6e21db6
parent0b7d3f810f287523fd4ad72c019d78e8d2983f8a (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/captcha/captcha_modal.vue44
-rw-r--r--app/models/concerns/integrations/enable_ssl_verification.rb3
-rw-r--r--app/models/integrations/bamboo.rb12
-rw-r--r--doc/api/discussions.md10
-rw-r--r--doc/api/integrations.md4
-rw-r--r--doc/development/runner_fleet_dashboard.md3
-rw-r--r--doc/subscriptions/customers_portal.md71
-rw-r--r--doc/subscriptions/gitlab_com/index.md5
-rw-r--r--doc/subscriptions/quarterly_reconciliation.md6
-rw-r--r--doc/subscriptions/self_managed/index.md6
-rw-r--r--doc/user/application_security/vulnerability_report/index.md7
-rw-r--r--doc/user/application_security/vulnerability_report/pipeline.md23
-rw-r--r--lib/api/helpers/integrations_helpers.rb33
-rw-r--r--lib/gitlab/application_rate_limiter.rb2
-rw-r--r--locale/gitlab.pot21
-rw-r--r--spec/frontend/captcha/captcha_modal_spec.js63
16 files changed, 242 insertions, 71 deletions
diff --git a/app/assets/javascripts/captcha/captcha_modal.vue b/app/assets/javascripts/captcha/captcha_modal.vue
index 36aa098d5ff..fd37e498699 100644
--- a/app/assets/javascripts/captcha/captcha_modal.vue
+++ b/app/assets/javascripts/captcha/captcha_modal.vue
@@ -26,10 +26,21 @@ export default {
type: String,
required: true,
},
+ showModal: {
+ type: Boolean,
+ required: false,
+ default: true,
+ },
+ resetSession: {
+ type: Boolean,
+ required: false,
+ default: false,
+ },
},
data() {
return {
modalId: uniqueId('captcha-modal-'),
+ captcha: null,
};
},
watch: {
@@ -37,29 +48,44 @@ export default {
// If this is true, we need to present the captcha modal to the user.
// When the modal is shown we will also initialize and render the form.
if (newNeedsCaptchaResponse) {
- this.$refs.modal.show();
+ this.renderCaptcha();
}
},
+ resetSession: {
+ immediate: true,
+ handler(reset) {
+ if (reset && this.captcha) {
+ this.resetCaptcha();
+ }
+ },
+ },
},
mounted() {
// If this is true, we need to present the captcha modal to the user.
// When the modal is shown we will also initialize and render the form.
if (this.needsCaptchaResponse) {
- this.$refs.modal.show();
+ this.renderCaptcha();
}
},
methods: {
emitReceivedCaptchaResponse(captchaResponse) {
- this.$refs.modal.hide();
+ if (this.showModal) this.$refs.modal.hide();
this.$emit('receivedCaptchaResponse', captchaResponse);
},
emitNullReceivedCaptchaResponse() {
this.emitReceivedCaptchaResponse(null);
},
+ renderCaptcha() {
+ if (this.showModal) {
+ this.$refs.modal.show();
+ } else {
+ this.initCaptcha();
+ }
+ },
/**
* handler for when modal is shown
*/
- shown() {
+ initCaptcha() {
const containerRef = this.$refs.captcha;
// NOTE: This is the only bit that is specific to Google's reCAPTCHA captcha implementation.
@@ -72,12 +98,13 @@ export default {
// TODO: Also need to handle expired-callback and error-callback
// See https://gitlab.com/gitlab-org/gitlab/-/issues/217722#future-follow-on-issuesmrs
});
+
+ this.captcha = grecaptcha;
})
.catch((e) => {
// TODO: flash the error or notify the user some other way
// See https://gitlab.com/gitlab-org/gitlab/-/issues/217722#future-follow-on-issuesmrs
this.emitNullReceivedCaptchaResponse();
- this.$refs.modal.hide();
// eslint-disable-next-line no-console
console.error(
@@ -96,6 +123,9 @@ export default {
this.emitNullReceivedCaptchaResponse();
}
},
+ resetCaptcha() {
+ this.captcha.reset();
+ },
},
};
</script>
@@ -104,17 +134,19 @@ export default {
<!-- there must be at least one button or focusable element, or the gl-modal fails to render. -->
<!-- We could modify gl-model to remove this requirement. -->
<gl-modal
+ v-if="showModal"
ref="modal"
:modal-id="modalId"
:title="__('Please solve the captcha')"
:action-cancel="/* eslint-disable @gitlab/vue-no-new-non-primitive-in-template */ {
text: __('Cancel'),
} /* eslint-enable @gitlab/vue-no-new-non-primitive-in-template */"
- @shown="shown"
+ @shown="initCaptcha"
@hide="hide"
@hidden="$emit('hidden')"
>
<div ref="captcha"></div>
<p>{{ __('We want to be sure it is you, please confirm you are not a robot.') }}</p>
</gl-modal>
+ <div v-else ref="captcha" class="gl-display-inline-block"></div>
</template>
diff --git a/app/models/concerns/integrations/enable_ssl_verification.rb b/app/models/concerns/integrations/enable_ssl_verification.rb
index cb20955488a..1dffe183475 100644
--- a/app/models/concerns/integrations/enable_ssl_verification.rb
+++ b/app/models/concerns/integrations/enable_ssl_verification.rb
@@ -9,7 +9,8 @@ module Integrations
type: :checkbox,
title: -> { s_('Integrations|SSL verification') },
checkbox_label: -> { s_('Integrations|Enable SSL verification') },
- help: -> { s_('Integrations|Clear if using a self-signed certificate.') }
+ help: -> { s_('Integrations|Clear if using a self-signed certificate.') },
+ description: -> { s_('Enable SSL verification. Defaults to `true` (enabled).') }
end
def initialize_properties
diff --git a/app/models/integrations/bamboo.rb b/app/models/integrations/bamboo.rb
index 9fe73f86be3..1c68d09aa2f 100644
--- a/app/models/integrations/bamboo.rb
+++ b/app/models/integrations/bamboo.rb
@@ -8,12 +8,14 @@ module Integrations
field :bamboo_url,
title: -> { s_('BambooService|Bamboo URL') },
placeholder: -> { s_('https://bamboo.example.com') },
- help: -> { s_('BambooService|Bamboo service root URL.') },
+ help: -> { s_('BambooService|Bamboo root URL.') },
+ description: -> { s_('Bamboo root URL (for example, `https://bamboo.example.com`).') },
exposes_secrets: true,
required: true
field :build_key,
help: -> { s_('BambooService|Bamboo build plan key.') },
+ description: -> { s_('Bamboo build plan key (for example, `KEY`).') },
non_empty_password_title: -> { s_('BambooService|Enter new build key') },
non_empty_password_help: -> { s_('BambooService|Leave blank to use your current build key.') },
placeholder: -> { _('KEY') },
@@ -21,12 +23,16 @@ module Integrations
is_secret: true
field :username,
- help: -> { s_('BambooService|The user with API access to the Bamboo server.') }
+ help: -> { s_('BambooService|User with API access to the Bamboo server.') },
+ description: -> { s_('User with API access to the Bamboo server.') },
+ required: true
field :password,
type: :password,
non_empty_password_title: -> { s_('ProjectService|Enter new password') },
- non_empty_password_help: -> { s_('ProjectService|Leave blank to use your current password') }
+ non_empty_password_help: -> { s_('ProjectService|Leave blank to use your current password') },
+ description: -> { s_('Password of the user.') },
+ required: true
with_options if: :activated? do
validates :bamboo_url, presence: true, public_url: true
diff --git a/doc/api/discussions.md b/doc/api/discussions.md
index 8640f3b45c6..d821c9e0634 100644
--- a/doc/api/discussions.md
+++ b/doc/api/discussions.md
@@ -712,7 +712,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/discussions
"updated_at": "2018-03-03T21:54:39.668Z",
"system": false,
"noteable_id": 3,
- "noteable_type": "Merge request",
+ "noteable_type": "MergeRequest",
"project_id": 5,
"noteable_iid": null,
"resolved": false,
@@ -737,7 +737,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/discussions
"updated_at": "2018-03-04T13:38:02.127Z",
"system": false,
"noteable_id": 3,
- "noteable_type": "Merge request",
+ "noteable_type": "MergeRequest",
"project_id": 5,
"noteable_iid": null,
"resolved": false,
@@ -767,7 +767,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/discussions
"updated_at": "2018-03-04T09:17:22.520Z",
"system": false,
"noteable_id": 3,
- "noteable_type": "Merge request",
+ "noteable_type": "MergeRequest",
"project_id": 5,
"noteable_iid": null,
"resolved": false,
@@ -804,7 +804,7 @@ Diff comments also contain position:
"updated_at": "2018-03-04T09:17:22.520Z",
"system": false,
"noteable_id": 3,
- "noteable_type": "Merge request",
+ "noteable_type": "MergeRequest",
"project_id": 5,
"noteable_iid": null,
"commit_id": "4803c71e6b1833ca72b8b26ef2ecd5adc8a38031",
@@ -865,8 +865,6 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" \
### Create new merge request thread
-> The `commit id` entry was [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47130) in GitLab 13.7.
-
Creates a new thread to a single project merge request. Similar to creating
a note but other comments (replies) can be added to it later. For other approaches,
see [Post comment to commit](commits.md#post-comment-to-commit) in the Commits API,
diff --git a/doc/api/integrations.md b/doc/api/integrations.md
index ab0337e25c8..bb3f6579c58 100644
--- a/doc/api/integrations.md
+++ b/doc/api/integrations.md
@@ -198,8 +198,8 @@ Parameters:
| --------- | ---- | -------- | ----------- |
| `bamboo_url` | string | true | Bamboo root URL (for example, `https://bamboo.example.com`). |
| `enable_ssl_verification` | boolean | false | Enable SSL verification. Defaults to `true` (enabled). |
-| `build_key` | string | true | Bamboo build plan key like `KEY`. |
-| `username` | string | true | A user with API access, if applicable. |
+| `build_key` | string | true | Bamboo build plan key (for example, `KEY`). |
+| `username` | string | true | User with API access to the Bamboo server. |
| `password` | string | true | Password of the user. |
### Disable Atlassian Bamboo
diff --git a/doc/development/runner_fleet_dashboard.md b/doc/development/runner_fleet_dashboard.md
index 70499e5a087..577dafcf128 100644
--- a/doc/development/runner_fleet_dashboard.md
+++ b/doc/development/runner_fleet_dashboard.md
@@ -61,6 +61,9 @@ To setup ClickHouse as the GitLab data storage:
1. [Run ClickHouse migrations](#run-clickhouse-migrations).
1. [Enable the feature flags](#enable-feature-flags).
+<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
+For a video walkthrough, see [Setting up Runner Fleet Dashboard with ClickHouse](https://www.youtube.com/watch?v=YpGV95Ctbpk).
+
### Run and configure ClickHouse
The most straightforward way to run ClickHouse is with [ClickHouse Cloud](https://clickhouse.cloud/).
diff --git a/doc/subscriptions/customers_portal.md b/doc/subscriptions/customers_portal.md
index 10de69242d9..0b57945f7fb 100644
--- a/doc/subscriptions/customers_portal.md
+++ b/doc/subscriptions/customers_portal.md
@@ -50,7 +50,7 @@ if required.
The profile owner's personal details are used on invoices. The profile owner's email address is used for the [Customers Portal legacy sign-in](#sign-in-to-customers-portal) and license-related email.
-To change profile details, including name, billing address, and email address:
+To change profile details, including name and email address:
1. Sign in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in).
1. Select **My profile > Profile settings**.
@@ -64,13 +64,70 @@ to another person, after you enter that person's personal details, you must also
## Change your company details
-To change your company details, including company name and VAT number:
+To change your company details, including company name and tax ID:
1. Sign in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in).
-1. Select **My profile > Profile settings**.
-1. Edit **Your company details**.
+1. Select **Billing account settings**.
+1. Scroll down to the **Company information** section.
+1. Edit the company details.
+1. Select **Save changes**.
+
+## Subscription and billing contacts
+
+### Change your subscription contact
+
+The subscription contact is the primary contact for your billing account. They receive subscription event notifications and information about applying subscription.
+
+To change the subscription contact:
+
+1. Sign in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in).
+1. On the left sidebar, select **Billing account settings**.
+1. Scroll to the **Company information** section, then to **Subscription contact**.
+1. To select a different subscription contact, select from the **Billing account manager** dropdown list.
+1. Edit the contact details.
1. Select **Save changes**.
+### Change your billing contact
+
+The billing contact receives all invoices and subscription event notifications.
+
+To change the billing contact:
+
+1. Sign in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in).
+1. On the left sidebar, select **Billing account settings**.
+1. Scroll to the **Company information** section, then to **Billing contact**.
+
+ - To change your billing contact to your subscription contact:
+
+ 1. Select **Billing contact is the same as subscription contact**.
+ 1. Select **Save changes**.
+
+ - To change your billing contact to a different billing account manager:
+
+ 1. Clear the **Billing contact is the same as subscription contact** checkbox.
+ 1. Select a different billing account manager from the **User** dropdown list.
+ 1. Edit the contact details.
+ 1. Select **Save changes**.
+
+ - To change your billing contact to a custom contact:
+
+ 1. Clear the **Billing contact is the same as subscription contact** checkbox.
+ 1. Select **Enter a custom contact** from the **User** dropdown list.
+ 1. Enter the contact details.
+ 1. Select **Save changes**.
+
+### Troubleshooting your billing or subscription contact's name
+
+If the billing account manager's email is linked to contacts with different first or last names, you will be prompted to update the name.
+
+If you are the billing account manager, follow the instructions to [update your personal profile](#change-profile-owner-information).
+
+If you are not the billing account manager, notify them to update their personal profile.
+
+### Troubleshooting your subscription contact
+
+If the subscription contact is no longer a billing account manager, you will be prompted to select a new contact. Follow the instructions to [change your subscription contact](#change-your-subscription-contact).
+
## Change your payment method
Purchases in the Customers Portal require a credit card on record as a payment method. You can add
@@ -83,7 +140,7 @@ If you would like to use an alternative method to pay,
To change your payment method:
1. Sign in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in).
-1. Select **My profile > Payment methods**.
+1. On the left sidebar, select **Billing account settings**.
1. **Edit** an existing payment method's information or **Add new payment method**.
1. Select **Save Changes**.
@@ -93,7 +150,7 @@ Automatic renewal of a subscription is charged to your default payment method. T
method as the default:
1. Sign in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in).
-1. Select **My profile > Payment methods**.
+1. On the left sidebar, select **Billing account settings**.
1. **Edit** the selected payment method and check the **Make default payment method** checkbox.
1. Select **Save Changes**.
@@ -104,7 +161,7 @@ Follow this guideline if you have a legacy Customers Portal profile and use an e
To link a GitLab.com account to your Customers Portal profile:
1. Sign in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in?legacy=true) using email and password.
-1. On the Customers Portal page, select **My profile > Profile settings**.
+1. Select **My profile > Profile settings**.
1. Under **Your GitLab.com account**, select **Link account**.
1. Sign in to the [GitLab.com](https://gitlab.com/users/sign_in) account you want to link to the Customers Portal profile.
diff --git a/doc/subscriptions/gitlab_com/index.md b/doc/subscriptions/gitlab_com/index.md
index 9299028e56a..0b89f5b3412 100644
--- a/doc/subscriptions/gitlab_com/index.md
+++ b/doc/subscriptions/gitlab_com/index.md
@@ -310,8 +310,9 @@ To renew your subscription:
Before you renew your subscription:
1. Log in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in).
-1. On the **Account details** page, verify or update the invoice contact details.
-1. On the **Payment Methods** page, verify or update the credit card on file.
+1. On the left sidebar, select **Billing account settings**.
+1. Under **Payment methods**, verify or update the credit card on file.
+1. Scroll down to the **Company information** section to verify or update the invoice contact details.
1. In GitLab, review your list of user accounts and [remove inactive or unwanted users](#remove-users-from-your-subscription).
### Renew or change a GitLab SaaS subscription
diff --git a/doc/subscriptions/quarterly_reconciliation.md b/doc/subscriptions/quarterly_reconciliation.md
index 87a4b65833c..48b571322a1 100644
--- a/doc/subscriptions/quarterly_reconciliation.md
+++ b/doc/subscriptions/quarterly_reconciliation.md
@@ -84,9 +84,9 @@ sent and subject to your payment terms.
If your credit card is declined during the reconciliation process, an email will be sent with the subject `Your GitLab subscription failed to reconcile`. Follow these instructions to update your payment information, and the reconciliation will be automatically retried:
1. Log in to your account at `https://customers.gitlab.com`.
-1. Go to **Payment Methods**.
-1. Select **Add New Payment Method**.
-1. Make sure that the payment method is set as **Default**.
+1. On the left sidebar, select **Billing account settings**.
+1. Under **Payment methods**, select **Add new payment method**.
+1. After the new payment method has been added, select **Edit**, then select **Default** to mark it as the default payment method.
Reconciliation is retried automatically as soon as the payment method is updated.
diff --git a/doc/subscriptions/self_managed/index.md b/doc/subscriptions/self_managed/index.md
index e9a6f3720d2..b0510ba5910 100644
--- a/doc/subscriptions/self_managed/index.md
+++ b/doc/subscriptions/self_managed/index.md
@@ -284,10 +284,10 @@ You can renew your subscription starting from 15 days before your subscription e
The [Customers Portal](https://customers.gitlab.com/customers/sign_in) is your
tool for renewing and modifying your subscription. Before going ahead with renewal,
-sign in and verify or update:
+sign in and go to **Billing account settings**. Verify or update:
-- The invoice contact details on the **Account details** page.
-- The credit card on file on the **Payment Methods** page.
+- The credit card on file under the **Payment methods** section.
+- The invoice contact details in the **Company information** section.
NOTE:
Contact our [support team](https://support.gitlab.com/hc/en-us/requests/new?ticket_form_id=360000071293)
diff --git a/doc/user/application_security/vulnerability_report/index.md b/doc/user/application_security/vulnerability_report/index.md
index c5806ed6124..cd1738f73e6 100644
--- a/doc/user/application_security/vulnerability_report/index.md
+++ b/doc/user/application_security/vulnerability_report/index.md
@@ -188,10 +188,13 @@ To change the status of vulnerabilities:
- One or more vulnerabilities, select the checkbox beside each vulnerability.
- All vulnerabilities on the page, select the checkbox in the table header.
1. In the **Set status** dropdown list, select the desired status.
-1. If the **Dismissed** status is chosen, select the desired reason in the **Set dismissal reason** dropdown list.
-1. In the **Add a comment** input, you can provide a comment. For the **Dismissed** status, a comment is required.
+1. If the **Dismiss** status is chosen, select the desired reason in the **Set dismissal reason** dropdown list.
+1. In the **Add a comment** input, you can provide a comment. For the **Dismiss** status, a comment is required.
1. Select **Change status**.
+The status of the selected vulnerabilities is updated and the content of the vulnerability report is
+refreshed.
+
![Project Vulnerability Report](img/project_security_dashboard_status_change_v16_0.png)
## Sort vulnerabilities by date detected
diff --git a/doc/user/application_security/vulnerability_report/pipeline.md b/doc/user/application_security/vulnerability_report/pipeline.md
index e60ac7d4c21..aa6a4f07115 100644
--- a/doc/user/application_security/vulnerability_report/pipeline.md
+++ b/doc/user/application_security/vulnerability_report/pipeline.md
@@ -101,6 +101,29 @@ To view findings, either:
NOTE:
This does not apply for the vulnerabilities existing on the default branch.
+## Change status of findings
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/331408) in GitLab 16.7 [with a flag](../../../administration/feature_flags.md) named `pipeline_security_dashboard_graphql`. Disabled by default.
+
+FLAG:
+On self-managed GitLab, by default this feature is not available. To make it available, an administrator can [enable the feature flag](../../../administration/feature_flags.md) named `pipeline_security_dashboard_graphql`.
+On GitLab.com, this feature is not available.
+
+To change the status of findings to **Dismiss** or **Needs triage**:
+
+1. On the left sidebar, select **Search or go to** and find your project.
+1. Select **Build > Pipelines**.
+1. Select a pipeline and select the **Security** tab.
+1. To select:
+ - One or more findings, select the checkbox beside each finding.
+ - All findings on the page, select the checkbox in the table header.
+1. In the **Set status** dropdown list, select the desired status.
+1. If the **Dismiss** status is chosen, select the desired reason in the **Set dismissal reason** dropdown list.
+1. In the **Add a comment** input, you can provide a comment. For the **Dismiss** status, a comment is required.
+1. Select **Change status**.
+
+The status of the selected findings is updated and the content of the security tab is refreshed.
+
## Deduplication process
When a pipeline contains jobs that produce multiple security reports of the same type, it is possible that the same
diff --git a/lib/api/helpers/integrations_helpers.rb b/lib/api/helpers/integrations_helpers.rb
index bc4c07442eb..4b1312d6ab9 100644
--- a/lib/api/helpers/integrations_helpers.rb
+++ b/lib/api/helpers/integrations_helpers.rb
@@ -129,38 +129,7 @@ module API
'apple-app-store' => ::Integrations::AppleAppStore.api_fields,
'asana' => ::Integrations::Asana.api_fields,
'assembla' => ::Integrations::Assembla.api_fields,
- 'bamboo' => [
- {
- required: true,
- name: :bamboo_url,
- type: String,
- desc: 'Bamboo root URL like https://bamboo.example.com'
- },
- {
- required: false,
- name: :enable_ssl_verification,
- type: ::Grape::API::Boolean,
- desc: 'Enable SSL verification'
- },
- {
- required: true,
- name: :build_key,
- type: String,
- desc: 'Bamboo build plan key like'
- },
- {
- required: true,
- name: :username,
- type: String,
- desc: 'A user with API access, if applicable'
- },
- {
- required: true,
- name: :password,
- type: String,
- desc: 'Password of the user'
- }
- ],
+ 'bamboo' => ::Integrations::Bamboo.api_fields,
'bugzilla' => [
{
required: true,
diff --git a/lib/gitlab/application_rate_limiter.rb b/lib/gitlab/application_rate_limiter.rb
index 3d2f13af9dc..df7f2986304 100644
--- a/lib/gitlab/application_rate_limiter.rb
+++ b/lib/gitlab/application_rate_limiter.rb
@@ -52,7 +52,7 @@ module Gitlab
project_testing_integration: { threshold: 5, interval: 1.minute },
email_verification: { threshold: 10, interval: 10.minutes },
email_verification_code_send: { threshold: 10, interval: 1.hour },
- phone_verification_challenge: { threshold: 3, interval: 1.day },
+ phone_verification_challenge: { threshold: 2, interval: 1.day },
phone_verification_send_code: { threshold: 5, interval: 1.day },
phone_verification_verify_code: { threshold: 5, interval: 1.day },
namespace_exists: { threshold: 20, interval: 1.minute },
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 402598e076a..201c3866f22 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -7521,6 +7521,12 @@ msgstr ""
msgid "Badges|Your badges"
msgstr ""
+msgid "Bamboo build plan key (for example, `KEY`)."
+msgstr ""
+
+msgid "Bamboo root URL (for example, `https://bamboo.example.com`)."
+msgstr ""
+
msgid "BambooService|Atlassian Bamboo"
msgstr ""
@@ -7530,7 +7536,7 @@ msgstr ""
msgid "BambooService|Bamboo build plan key."
msgstr ""
-msgid "BambooService|Bamboo service root URL."
+msgid "BambooService|Bamboo root URL."
msgstr ""
msgid "BambooService|Enter new build key"
@@ -7545,7 +7551,7 @@ msgstr ""
msgid "BambooService|Run CI/CD pipelines with Atlassian Bamboo. You must set up automatic revision labeling and a repository trigger in Bamboo. %{docs_link}"
msgstr ""
-msgid "BambooService|The user with API access to the Bamboo server."
+msgid "BambooService|User with API access to the Bamboo server."
msgstr ""
msgid "Banned"
@@ -18556,6 +18562,9 @@ msgstr ""
msgid "Enable SSL verification"
msgstr ""
+msgid "Enable SSL verification. Defaults to `true` (enabled)."
+msgstr ""
+
msgid "Enable Snowplow tracking"
msgstr ""
@@ -29704,7 +29713,7 @@ msgstr ""
msgid "MemberInviteEmail|Invitation to join the %{project_or_group} %{project_or_group_name}"
msgstr ""
-msgid "MemberRole|%{requirement} has to be enabled in order to enable %{permission}."
+msgid "MemberRole|%{requirement} has to be enabled in order to enable %{permission}"
msgstr ""
msgid "MemberRole|Actions"
@@ -34715,6 +34724,9 @@ msgstr ""
msgid "Password confirmation"
msgstr ""
+msgid "Password of the user."
+msgstr ""
+
msgid "Password successfully changed"
msgstr ""
@@ -52797,6 +52809,9 @@ msgstr ""
msgid "User will not be allowed to create possible spam! Are you sure?"
msgstr ""
+msgid "User with API access to the Bamboo server."
+msgstr ""
+
msgid "User-based escalation rules must have a user with access to the project"
msgstr ""
diff --git a/spec/frontend/captcha/captcha_modal_spec.js b/spec/frontend/captcha/captcha_modal_spec.js
index 4bbed8ab3bb..977c685739f 100644
--- a/spec/frontend/captcha/captcha_modal_spec.js
+++ b/spec/frontend/captcha/captcha_modal_spec.js
@@ -1,6 +1,7 @@
import { GlModal } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import { stubComponent } from 'helpers/stub_component';
+import waitForPromises from 'helpers/wait_for_promises';
import CaptchaModal from '~/captcha/captcha_modal.vue';
import { initRecaptchaScript } from '~/captcha/init_recaptcha_script';
@@ -36,6 +37,7 @@ describe('Captcha Modal', () => {
beforeEach(() => {
grecaptcha = {
render: jest.fn(),
+ reset: jest.fn(),
};
initRecaptchaScript.mockResolvedValue(grecaptcha);
@@ -156,4 +158,65 @@ describe('Captcha Modal', () => {
});
});
});
+
+ describe('when showModal is false', () => {
+ beforeEach(() => {
+ createComponent({ props: { showModal: false, needsCaptchaResponse: true } });
+ });
+
+ it('does not render the modal', () => {
+ expect(findGlModal().exists()).toBe(false);
+ });
+
+ it('renders captcha', () => {
+ expect(grecaptcha.render).toHaveBeenCalledWith(wrapper.vm.$refs.captcha, {
+ sitekey: captchaSiteKey,
+ callback: expect.any(Function),
+ });
+ });
+ });
+
+ describe('needsCaptchaResponse watcher', () => {
+ describe('when showModal is true', () => {
+ beforeEach(() => {
+ createComponent({ props: { showModal: true, needsCaptchaResponse: false } });
+ wrapper.setProps({ needsCaptchaResponse: true });
+ });
+
+ it('shows modal', () => {
+ expect(showSpy).toHaveBeenCalled();
+ });
+ });
+
+ describe('when showModal is false', () => {
+ beforeEach(() => {
+ createComponent({ props: { showModal: false, needsCaptchaResponse: false } });
+ wrapper.setProps({ needsCaptchaResponse: true });
+ });
+
+ it('does not render the modal', () => {
+ expect(findGlModal().exists()).toBe(false);
+ });
+
+ it('renders captcha', () => {
+ expect(grecaptcha.render).toHaveBeenCalledWith(wrapper.vm.$refs.captcha, {
+ sitekey: captchaSiteKey,
+ callback: expect.any(Function),
+ });
+ });
+ });
+ });
+
+ describe('resetSession watcher', () => {
+ beforeEach(() => {
+ createComponent({ props: { showModal: false, needsCaptchaResponse: true } });
+ });
+
+ it('calls reset when resetSession is true', async () => {
+ await waitForPromises();
+ await wrapper.setProps({ resetSession: true });
+
+ expect(grecaptcha.reset).toHaveBeenCalled();
+ });
+ });
});