Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Check if email verified before allowing to update avatar #21568

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

AdamGrzybkowski
Copy link
Contributor

There was a backend fix applied at Gravatar to disallow using authenticated endpoints with account that hasn't verified the email. Using authenticated endpoint creates a Gravatar profile, but this shouldn't happen if email is not verified.

This means that before uploading a photo (via REST API or QuickEditor) we need to make sure the email is verified. If not, a proper message should be shown to the user.

This is the corresponding iOS PR. The copy for the message matches it as well.

Here's how it looks:

Screenshot 2025-01-08 at 12 32 00

To Test:

  1. Create a new account without verifying the email (I was only able to do it via web)
  2. Login in the Jetpack app
  3. Got the the me section
  4. Tap on the avatar in the top left
  5. Confirm you see a snack with the proper message about unverified email
  6. Log out and log in with your standard account
  7. Repeat steps 3 and 4 and confirm the Quick Editor was shown
  8. You can also disable the gravatar_quick_editor feature flag to test the old flow, but the email verification check is the same so if the above works, this should too.

Regression Notes

  1. Potential unintended areas of impact

    • None
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • TODO
  3. What automated tests I added (or what prevented me from doing so)

    • TODO

PR Submission Checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Testing Checklist (strike-out the not-applying and unnecessary ones):

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

@AdamGrzybkowski AdamGrzybkowski added the Gravatar Gravatar integration label Jan 8, 2025
@AdamGrzybkowski AdamGrzybkowski requested review from a team and nbradbury and removed request for a team January 8, 2025 13:00
@dangermattic
Copy link
Collaborator

dangermattic commented Jan 8, 2025

1 Warning
⚠️ strings.xml files should only be updated on release branches, when the translations are downloaded by our automation.

Generated by 🚫 Danger

@AdamGrzybkowski AdamGrzybkowski added this to the 26.0 milestone Jan 8, 2025
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 8, 2025

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr21568-7767c23
Commit7767c23
Direct Downloadwordpress-prototype-build-pr21568-7767c23.apk
Note: Google Login is not supported on these builds.

@nbradbury nbradbury self-assigned this Jan 8, 2025
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 8, 2025

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr21568-7767c23
Commit7767c23
Direct Downloadjetpack-prototype-build-pr21568-7767c23.apk
Note: Google Login is not supported on these builds.

Copy link
Contributor

@nbradbury nbradbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AdamGrzybkowski This looks good and I'll approve it. I left a comment about the placement of the new string resource, but it's not a big deal at all. I'll leave it to you whether to make the change, and you can merge when ready. :shipit:

Copy link

sonarqubecloud bot commented Jan 8, 2025

@AdamGrzybkowski AdamGrzybkowski merged commit dd12e2f into trunk Jan 8, 2025
22 checks passed
@AdamGrzybkowski AdamGrzybkowski deleted the adam/unverified_email_quick_editor branch January 8, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gravatar Gravatar integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants