diff --git a/src/app/Http/Controllers/API/V4/DomainsController.php b/src/app/Http/Controllers/API/V4/DomainsController.php --- a/src/app/Http/Controllers/API/V4/DomainsController.php +++ b/src/app/Http/Controllers/API/V4/DomainsController.php @@ -49,14 +49,14 @@ if (!$domain->confirm()) { return response()->json([ 'status' => 'error', - 'message' => self::trans('app.domain-verify-error'), + 'message' => self::trans('app.domain-confirm-error'), ]); } return response()->json([ 'status' => 'success', 'statusInfo' => self::statusInfo($domain), - 'message' => self::trans('app.domain-verify-success'), + 'message' => self::trans('app.domain-confirm-success'), ]); } diff --git a/src/resources/lang/en/app.php b/src/resources/lang/en/app.php --- a/src/resources/lang/en/app.php +++ b/src/resources/lang/en/app.php @@ -37,12 +37,12 @@ 'process-domain-new' => 'Registering a custom domain...', 'process-domain-ldap-ready' => 'Creating a custom domain...', 'process-domain-verified' => 'Verifying a custom domain...', - 'process-domain-confirmed' => 'Verifying an ownership of a custom domain...', + 'process-domain-confirmed' => 'Confirming an ownership of a custom domain...', 'process-success' => 'Setup process finished successfully.', 'process-error-distlist-ldap-ready' => 'Failed to create a distribution list.', 'process-error-domain-ldap-ready' => 'Failed to create a domain.', 'process-error-domain-verified' => 'Failed to verify a domain.', - 'process-error-domain-confirmed' => 'Failed to verify an ownership of a domain.', + 'process-error-domain-confirmed' => 'Failed to confirm an ownership of a domain.', 'process-error-resource-imap-ready' => 'Failed to verify that a shared folder exists.', 'process-error-resource-ldap-ready' => 'Failed to create a resource.', 'process-error-shared-folder-imap-ready' => 'Failed to verify that a shared folder exists.', @@ -70,8 +70,8 @@ 'domain-create-success' => 'Domain created successfully.', 'domain-delete-success' => 'Domain deleted successfully.', 'domain-notempty-error' => 'Unable to delete a domain with assigned users or other objects.', - 'domain-verify-success' => 'Domain verified successfully.', - 'domain-verify-error' => 'Domain ownership verification failed.', + 'domain-confirm-success' => 'Domain ownership confirmed successfully.', + 'domain-confirm-error' => 'Domain ownership confirmation failed.', 'domain-suspend-success' => 'Domain suspended successfully.', 'domain-unsuspend-success' => 'Domain unsuspended successfully.', 'domain-setconfig-success' => 'Domain settings updated successfully.', diff --git a/src/resources/lang/en/ui.php b/src/resources/lang/en/ui.php --- a/src/resources/lang/en/ui.php +++ b/src/resources/lang/en/ui.php @@ -18,6 +18,7 @@ 'back' => "Back", 'cancel' => "Cancel", 'close' => "Close", + 'confirm' => "Confirm", 'continue' => "Continue", 'copy' => "Copy", 'delete' => "Delete", @@ -113,32 +114,34 @@ ], 'domain' => [ + 'config' => "Domain configuration", + 'config-intro' => "In order to let {app} receive email traffic for your domain you need to adjust the DNS settings, more precisely the MX entries, accordingly.", + 'config-sample' => "Edit your domain's zone file and replace existing MX entries with the following values:", + 'config-hint' => "If you don't know how to set DNS entries for your domain, please contact the registration service where you registered the domain or your web hosting provider.", + 'confirm' => "Domain ownership confirmation", + 'confirm-intro' => "In order to confirm that you're the actual owner or administrator of the domain, " + . "we need to run a confirmation process before finally activating it for email delivery.", + 'confirm-dns' => "The domain must have one of the following entries in DNS:", + 'confirm-dns-txt' => "TXT entry with value:", + 'confirm-dns-cname' => "or CNAME entry:", + 'confirm-outro' => "Please add one of those records to the DNS of your domain via your domain name provider. " + . "When this is done press the button below to start the confirmation.", + 'confirm-sample' => "Here's a sample zone file for your domain:", + 'create' => "Create domain", 'delete' => "Delete domain", 'delete-domain' => "Delete {domain}", 'delete-text' => "Do you really want to delete this domain permanently?" . " This is only possible if there are no users, aliases or other objects in this domain." . " Please note that this action cannot be undone.", - 'dns-verify' => "Domain DNS verification sample:", + 'dns-confirm' => "Domain DNS confirmation sample:", 'dns-config' => "Domain DNS configuration sample:", 'list-empty' => "There are no domains in this account.", 'namespace' => "Namespace", + 'new' => "New domain", 'spf-whitelist' => "SPF Whitelist", 'spf-whitelist-text' => "The Sender Policy Framework allows a sender domain to disclose, through DNS, " . "which systems are allowed to send emails with an envelope sender address within said domain.", 'spf-whitelist-ex' => "Here you can specify a list of allowed servers, for example: .ess.barracuda.com.", - 'verify' => "Domain verification", - 'verify-intro' => "In order to confirm that you're the actual holder of the domain, we need to run a verification process before finally activating it for email delivery.", - 'verify-dns' => "The domain must have one of the following entries in DNS:", - 'verify-dns-txt' => "TXT entry with value:", - 'verify-dns-cname' => "or CNAME entry:", - 'verify-outro' => "When this is done press the button below to start the verification.", - 'verify-sample' => "Here's a sample zone file for your domain:", - 'config' => "Domain configuration", - 'config-intro' => "In order to let {app} receive email traffic for your domain you need to adjust the DNS settings, more precisely the MX entries, accordingly.", - 'config-sample' => "Edit your domain's zone file and replace existing MX entries with the following values:", - 'config-hint' => "If you don't know how to set DNS entries for your domain, please contact the registration service where you registered the domain or your web hosting provider.", - 'create' => "Create domain", - 'new' => "New domain", ], 'error' => [ @@ -434,8 +437,8 @@ 'ready-resource' => "The resource is almost ready.", 'ready-shared-folder' => "The shared-folder is almost ready.", 'ready-user' => "The user account is almost ready.", - 'verify' => "Verify your domain to finish the setup process.", - 'verify-domain' => "Verify domain", + 'confirm' => "Confirm your domain to finish the setup process.", + 'confirm-domain' => "Confirm domain", 'degraded' => "Degraded", 'deleted' => "Deleted", 'restricted' => "Restricted", diff --git a/src/resources/vue/Admin/Domain.vue b/src/resources/vue/Admin/Domain.vue --- a/src/resources/vue/Admin/Domain.vue +++ b/src/resources/vue/Admin/Domain.vue @@ -40,8 +40,8 @@
-

{{ $t('domain.dns-verify') }}

-

{{ domain.dns.join("\n") }}

+

{{ $t('domain.dns-confirm') }}

+

{{ domain.dns.join("\n") }}

{{ $t('domain.dns-config') }}

{{ domain.mx.join("\n") }}

diff --git a/src/resources/vue/Domain/Info.vue b/src/resources/vue/Domain/Info.vue --- a/src/resources/vue/Domain/Info.vue +++ b/src/resources/vue/Domain/Info.vue @@ -36,20 +36,20 @@ {{ $t('btn.submit') }}
-
-
{{ $t('domain.verify') }}
+
+
{{ $t('domain.confirm') }}
-

{{ $t('domain.verify-intro') }}

+

{{ $t('domain.confirm-intro') }}

- +

    -
  • {{ $t('domain.verify-dns-txt') }} {{ domain.hash_text }}
  • -
  • {{ $t('domain.verify-dns-cname') }} {{ domain.hash_cname }}.{{ domain.namespace }}. IN CNAME {{ domain.hash_code }}.{{ domain.namespace }}.
  • +
  • {{ $t('domain.confirm-dns-txt') }} {{ domain.hash_text }}
  • +
  • {{ $t('domain.confirm-dns-cname') }} {{ domain.hash_cname }}.{{ domain.namespace }}. IN CNAME {{ domain.hash_code }}.{{ domain.namespace }}.
- {{ $t('domain.verify-outro') }} + {{ $t('domain.confirm-outro') }}

-

{{ $t('domain.verify-sample') }}

{{ domain.dns.join("\n") }}

- {{ $t('btn.verify') }} +

{{ $t('domain.confirm-sample') }}

{{ domain.dns.join("\n") }}

+ {{ $t('btn.confirm') }}
@@ -130,7 +130,7 @@ this.spf_whitelist = this.domain.config.spf_whitelist || [] if (!this.domain.isConfirmed) { - $('#domain-verify button').focus() + $('#domain-confirm button').focus() } this.status = response.data.statusInfo diff --git a/src/resources/vue/Widgets/Status.vue b/src/resources/vue/Widgets/Status.vue --- a/src/resources/vue/Widgets/Status.vue +++ b/src/resources/vue/Widgets/Status.vue @@ -16,15 +16,15 @@

{{ $t('status.ready-' + scopeLabel()) }}
- {{ $t('status.verify') }} + {{ $t('status.confirm') }}

- - {{ $t('btn.verify') }} + + {{ $t('btn.confirm') }}
- {{ $t('status.verify-domain') }} + {{ $t('status.confirm-domain') }}
diff --git a/src/tests/Browser/Admin/DomainTest.php b/src/tests/Browser/Admin/DomainTest.php --- a/src/tests/Browser/Admin/DomainTest.php +++ b/src/tests/Browser/Admin/DomainTest.php @@ -93,7 +93,7 @@ // Assert Configuration tab $browser->assertSeeIn('@nav #tab-config', 'Configuration') ->with('@domain-config', function (Browser $browser) { - $browser->assertSeeIn('pre#dns-verify', 'kolab-verify.kolab.org.') + $browser->assertSeeIn('pre#dns-confirm', 'kolab-verify.kolab.org.') ->assertSeeIn('pre#dns-config', 'kolab.org.'); }); diff --git a/src/tests/Browser/DomainTest.php b/src/tests/Browser/DomainTest.php --- a/src/tests/Browser/DomainTest.php +++ b/src/tests/Browser/DomainTest.php @@ -112,11 +112,11 @@ 'Host a domain that is externally registered' ); }) - ->whenAvailable('@verify', function ($browser) use ($domain) { + ->whenAvailable('@confirm', function ($browser) use ($domain) { $browser->assertSeeIn('pre', $domain->namespace) ->assertSeeIn('pre', $domain->hash()) ->click('button') - ->assertToast(Toast::TYPE_SUCCESS, 'Domain verified successfully.'); + ->assertToast(Toast::TYPE_SUCCESS, 'Domain ownership confirmed successfully.'); // TODO: Test scenario when a domain confirmation failed }) @@ -124,12 +124,12 @@ $browser->assertSeeIn('pre', $domain->namespace); }) ->assertMissing('@general button[type=submit]') - ->assertMissing('@verify'); + ->assertMissing('@confirm'); // Check that confirmed domain page contains only the config box $browser->visit('/domain/' . $domain->id) ->on(new DomainInfo()) - ->assertMissing('@verify') + ->assertMissing('@confirm') ->assertPresent('@config'); }); } @@ -275,7 +275,7 @@ }) ->assertSeeIn('@general button.btn-primary[type=submit]', 'Submit') ->assertMissing('@config') - ->assertMissing('@verify') + ->assertMissing('@confirm') ->assertMissing('@settings') ->assertMissing('@status') // Test error handling diff --git a/src/tests/Browser/Pages/DomainInfo.php b/src/tests/Browser/Pages/DomainInfo.php --- a/src/tests/Browser/Pages/DomainInfo.php +++ b/src/tests/Browser/Pages/DomainInfo.php @@ -42,7 +42,7 @@ '@nav' => 'ul.nav-tabs', '@settings' => '#settings', '@status' => '#status-box', - '@verify' => '#domain-verify', + '@confirm' => '#domain-confirm', ]; } } diff --git a/src/tests/Browser/StatusTest.php b/src/tests/Browser/StatusTest.php --- a/src/tests/Browser/StatusTest.php +++ b/src/tests/Browser/StatusTest.php @@ -77,7 +77,7 @@ ->with(new Status(), function ($browser) use ($john) { $browser->assertSeeIn('@body', 'We are preparing your account') ->assertProgress(71, 'Creating a mailbox...', 'pending') - ->assertMissing('#status-verify') + ->assertMissing('#status-confirm') ->assertMissing('#status-link') ->assertMissing('@refresh-button') ->assertMissing('@refresh-text'); @@ -88,10 +88,10 @@ // Wait for auto-refresh, expect domain-confirmed step $browser->pause(6000) ->assertSeeIn('@body', 'Your account is almost ready') - ->assertProgress(85, 'Verifying an ownership of a custom domain...', 'failed') + ->assertProgress(85, 'Confirming an ownership of a custom domain...', 'failed') ->assertMissing('@refresh-button') ->assertMissing('@refresh-text') - ->assertMissing('#status-verify') + ->assertMissing('#status-confirm') ->assertVisible('#status-link'); }) // check if the link to domain info page works @@ -101,7 +101,7 @@ ->on(new Dashboard()) ->with(new Status(), function ($browser) { $browser->assertMissing('@refresh-button') - ->assertProgress(85, 'Verifying an ownership of a custom domain...', 'failed'); + ->assertProgress(85, 'Confirming an ownership of a custom domain...', 'failed'); }); // Confirm the domain and wait until the whole status box disappears @@ -187,7 +187,7 @@ ->assertMissing('@refresh-button') ->assertMissing('@refresh-text') ->assertMissing('#status-link') - ->assertMissing('#status-verify'); + ->assertMissing('#status-confirm'); }); $domain->status |= Domain::STATUS_VERIFIED; @@ -197,21 +197,21 @@ $browser->waitFor('@status.process-failed') ->with(new Status(), function ($browser) { $browser->assertSeeIn('@body', 'The domain is almost ready') - ->assertProgress(75, 'Verifying an ownership of a custom domain...', 'failed') + ->assertProgress(75, 'Confirming an ownership of a custom domain...', 'failed') ->assertMissing('@refresh-button') ->assertMissing('@refresh-text') ->assertMissing('#status-link') - ->assertVisible('#status-verify'); + ->assertVisible('#status-confirm'); }); $domain->status |= Domain::STATUS_CONFIRMED; $domain->save(); // Test Verify button - $browser->click('@status #status-verify') - ->assertToast(Toast::TYPE_SUCCESS, 'Domain verified successfully.') + $browser->click('@status #status-confirm') + ->assertToast(Toast::TYPE_SUCCESS, 'Domain ownership confirmed successfully.') ->waitUntilMissing('@status') - ->waitUntilMissing('@verify') + ->waitUntilMissing('#status-confirm') ->assertVisible('@config'); }); } @@ -256,7 +256,7 @@ ->with(new Status(), function ($browser) use ($john) { $browser->assertSeeIn('@body', 'We are preparing the user account') ->assertProgress(71, 'Creating a mailbox...', 'pending') - ->assertMissing('#status-verify') + ->assertMissing('#status-confirm') ->assertMissing('#status-link') ->assertMissing('@refresh-button') ->assertMissing('@refresh-text'); @@ -268,10 +268,10 @@ // Wait for auto-refresh, expect domain-confirmed step $browser->pause(6000) ->assertSeeIn('@body', 'The user account is almost ready') - ->assertProgress(85, 'Verifying an ownership of a custom domain...', 'failed') + ->assertProgress(85, 'Confirming an ownership of a custom domain...', 'failed') ->assertMissing('@refresh-button') ->assertMissing('@refresh-text') - ->assertMissing('#status-verify') + ->assertMissing('#status-confirm') ->assertVisible('#status-link'); }) ->assertSeeIn('#status', 'Active'); diff --git a/src/tests/Feature/Controller/DomainsTest.php b/src/tests/Feature/Controller/DomainsTest.php --- a/src/tests/Feature/Controller/DomainsTest.php +++ b/src/tests/Feature/Controller/DomainsTest.php @@ -73,7 +73,7 @@ $this->assertCount(2, $json); $this->assertEquals('error', $json['status']); - $this->assertEquals('Domain ownership verification failed.', $json['message']); + $this->assertEquals('Domain ownership confirmation failed.', $json['message']); $domain->status |= Domain::STATUS_CONFIRMED; $domain->save(); @@ -84,7 +84,7 @@ $json = $response->json(); $this->assertEquals('success', $json['status']); - $this->assertEquals('Domain verified successfully.', $json['message']); + $this->assertEquals('Domain ownership confirmed successfully.', $json['message']); $this->assertTrue(is_array($json['statusInfo'])); // Not authorized access