Commit Graph

16368 Commits

Author SHA1 Message Date
Rostislav Wolny
968cbb67d8 Refactor response caching in AuthorizedSenderDomainController
In the previous implementation the getDomainRecords couldn't be used without
calling getAllSenderDomains or getVerifiedSenderDomains upfront.
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
e03e375942 Fix variable names and comments typos
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
d625457174 Add logging of unexpected formats from sender domain endpoints on Bridge API
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
574c1cdd8f Reuse mocked api data in Bridre test case
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
c58c613959 Use WordPress translation functions directly
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
f4346c8957 Add links to sender domains API docs
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
543465d9de Fix indentation in Bridge
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
1642a5477c Use constants and add missing test case in DmarcPolicyCheckerTest
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
e36f105387 Add basic acceptance tests for sender domain verification
These tests test that basic checks works in both settings and send pages.
We can't verify the test domain for acceptance test docker so the tests just check the error state.
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
6411182705 Hide sender domains error when editing sender address
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
1ede10fce6 Update list of popular free ESP domains
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
baea06abf5 Unify loaders size in sender domain/email tabs and render in column
This makes sure that the modal has some reasonable initial size (small column).
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
39b431b7b3 Display correct tab in sender domain/email configuration modal based on clicked link
Previously when both errors were present authorized email tab was always opened no matter what error was clicked.
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
866c22c336 Use common/button component fot copy button
The proprietary button had displaying issues. This commit add props
that enable connection with a tooltip into the common button and replaces
the proprietary button with the common component.
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
de2b0c34b6 Remove unused max_width property from manage_sender_domain
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
838903bc41 Removing protypes from Typescript component
We use only typed props in components written in TS.
[MAILPOER-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
aee63444fe Skip DMARC address check when email domain is freemail
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
d389595d72 Prevent triggering domain and authorized email checks when MSS is not active
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
0fe260f605 Refactor sender address errors rendering on send page
Both auht. email error and DMARC check warning were rendered via parsley error.
There was not enough space for both messages to display and also both were rendered
as errors that block sending. But so far we allow sending when the DMARC warning is present.

This commit changes displaying of both error messages so that they are rendered in
a custom component and use the parsley only to mark the input red.
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
67b6d2279f Fetch authorized domains and emails for JS Apps only when MSS is active
This prevents calling bridge API in cases when user use different sending methods.
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
af203ba29e Refactor AuthorizedSenderDomainControllerTest to avoid live api calls
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
d0b1ff3aef Refactor sender domain related bridge integration tests to use mocks
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
fd1ac46207 Fix typo in isDomainDmarcRestricted method name
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
4ffdd5bed5 Add declare(strict_types = 1); to newly added PHP files
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
ccb070c500 Update information provided for tracking
MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
fcd12b41b5 Update DMARC Status check
Handle edge case for domains where DMARC `p` policy is set to  reject or quarantine but `sp` (subdomain policy) is set to none

The previous implementation will return dmarcStatus === none when
sp is none but will not check for p policy as well.

If the `sp` is reject or quarantine, it would supersede the `p` status

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
449fde75a7 Add tracking for authorized email and sender domain
MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
bbd27a5b3e Update ManageSenderDomain component UI
Add DomainKeyComponent to assist with rendering the input fields
and DomainStatusComponent for rendering the DNS records status

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
f09616dc46 General refactor
Use a single click handler for css lookup

Set to mailpoet-js-button-authorize-email-and-sender-domain

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
55f10a403c Show sender domain verification modal on newsletter
sending page

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
bd5ea1041d Use unidirectional data store, remove unnecessary useState
MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
25013e8c8c Add AuthorizeSenderEmailAndDomainModal component
This component wraps the AuthorizeSenderEmailModal  and
AuthorizeSenderDomainModal and displays them in a Tabbed
manner

This gives the user the ability to either authorize an email or verify
a domain

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
fcfcbcc4d7 Update SenderDomainModal and AuthorizeSenderEmailModal
Provide the ability to display content without modal

I included the `useModal` option for backward compatibility and
to not break any other components

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
f9588484a6 Feat: Add classname to tabs
This would give us the ability to selectively display or hide the
tab component with CSS classes without causing issues
with the JavaScript code

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
1a0796c627 Add clean up action after domain is verified
MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
847d199352 Implement the Manage Sender Domain component and
The AuthorizeSenderDomainModal

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
5c3a9fe9b2 Add API methods for creating and verifying sender domains
We also included an API method for fetching Sender Domains

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
aba68d2305 Add mailpoet_all_sender_domains to Newsletter and settings
MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
9e5f1d0ff0 Implement Show sender domain warning for settings
This would show the sender domain warning message for
domains that are not verified and have a Retricted DMARC Policy

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
370de8050a Add mailpoet_verified_sender_domains to newsletters and settings page
Update tests

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
c961e0a363 Add AuthorizedSenderDomainController class and tests
MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
601b3e775b Add DMARC Policy Checker class and
getDomainDmarcPolicy method

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
417c0897e8 Add API methods for fetching, creating and verifying
sender domain

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Rostislav Wolny
02af3d6c2e Update sed command for fixing code sniffer to be Mac OS compatible
[MAILPOET-4560]
2022-08-11 12:30:33 +02:00
David Remer
42dce4280a Use correct error code and translator comment
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
David Remer
0d1b51c7ba Query a workflow in a specific version in the StepHandler
The StepHandler must run a specific version of a workflow. Therefore, we need to
query this specific Workflow.

[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
David Remer
9f2ae81835 Remove outdated $change variable
The usage of $change was a leftover from a rebase which was
necessary.

[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
David Remer
293c1f4a46 Fix use statements in test
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
David Remer
ee54440c03 Fix intendation for SQL strings
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
David Remer
ea07bbe9fa Use INNER JOIN to combine workflows with their versions
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00