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

SSO improvements main PR #35277

Merged
merged 35 commits into from
Feb 16, 2024
Merged

SSO improvements main PR #35277

merged 35 commits into from
Feb 16, 2024

Conversation

alshakero
Copy link
Member

@alshakero alshakero commented Jan 26, 2024

This is the main PR towards SSO improvements. It's a place to merge PRs into, please do not push anything to it that is not updating it against trunk.

Proposed changes:

Includes the following PRs:

Summary:

Site owners now have a much better experience managing users.

  • Different colors for users connected, not invited or with a pending invite to join WordPress.com
  • Possibility to quick send an invite to a user
  • Possibility to revoke an invitation
  • When adding a new user we now have a custom message sent, a notice that shows to the site owner that an invitation will be sent. And when the user is created, we send a WordPress.com invitation.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

  • Design/Kick-off thread: pdDR7T-1jU-p2
  • Project proposal / feedback requested thread: pdDR7T-1ja-p2

Does this pull request change what data or activity we track or use?

Testing instructions:

  • Sync the Jetpack plugin to your site.
  • Check that the summary changes are reflected.
  • Try to break this.
  • Check how it is on mobile.

@alshakero alshakero changed the title Initial SSO improvements main PR Jan 26, 2024
Copy link
Contributor

github-actions bot commented Jan 26, 2024

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team Review" label and ask someone from your team review the code. Once reviewed, it can then be merged.
If you need an extra review from someone familiar with the codebase, you can update the labels from "[Status] Needs Team Review" to "[Status] Needs Review", and in that case Jetpack Approvers will do a final review of your PR.


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen daily.
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly. The next release is scheduled for March 5, 2024 (scheduled code freeze on March 4, 2024).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

Copy link
Contributor

github-actions bot commented Jan 26, 2024

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the add/sso-improvements branch.

  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack add/sso-improvements
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Jan 26, 2024
* Initial implementation of email invitation

* Initial implementation of email invitation

* changelog

* Finishing api call

* Update improve_invite_form

* Update changelog

* Improve user role param

* Handle errors

* Use notice to render message

* Add admin create user stylesheets

* Hide unnecessary TR

* Add link to sso page

* Fix translation

---------

Co-authored-by: Omar Alshaker <[email protected]>
@jeherve
Copy link
Member

jeherve commented Jan 30, 2024

Is there a p2 post where I could find out more about this project? I'm curious what y'all have in mind for this feature :)

@agrullon95
Copy link
Contributor

Is there a p2 post where I could find out more about this project? I'm curious what y'all have in mind for this feature :)

@jeherve - You can read more about this project here:

  • Design/Kick-off thread: pdDR7T-1jU-p2
  • Project proposal / feedback requested thread: pdDR7T-1ja-p2

@jeherve
Copy link
Member

jeherve commented Feb 1, 2024

Thank you!

@escapemanuele escapemanuele marked this pull request as ready for review February 6, 2024 09:42
public function render_invitation_email_message() {
$message = wp_kses(
__(
'New users will receive an invite to join WordPress.com, so they can log in securely using <a class="jetpack-sso-admin-create-user-invite-message-link-sso" rel="noopener noreferrer" target="_blank" href="https://jetpack.com/support/sso/">Secure Sign On</a>.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor whine, but we could improve this to return support documentation based on the user's locale. For example https://jetpack.com/es/support/sso/ for spanish users

heavyweight

This comment was marked as outdated.

@heavyweight
Copy link
Contributor

heavyweight commented Feb 6, 2024

Screen.Recording.2024-02-06.at.11.53.11.mov

Created a new admin, visited the invitation link, and created my wp.com account. After that, I got redirected to the admin ui where I had that weird state as in the video. After logging in with wp.com again it got fixed.

To reproduce you will probably need to enable the classic admin setting in https://wpcalypso.wordpress.com/
Screenshot 2024-02-06 at 11 59 00

Edit @alshakero: this issue is documented 5158-gh-Automattic/dotcom-forge.

@heavyweight

This comment was marked as outdated.

@heavyweight

This comment was marked as outdated.

@heavyweight

This comment was marked as outdated.

Copy link
Contributor

@heavyweight heavyweight left a comment

Choose a reason for hiding this comment

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

Re-tested and didn't find any issues

Copy link
Contributor

@renancarvalho renancarvalho left a comment

Choose a reason for hiding this comment

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

Tested and did not locate any issues as well, I think we are good to go! 👍

@escapemanuele escapemanuele merged commit 898821d into trunk Feb 16, 2024
54 checks passed
@escapemanuele escapemanuele deleted the add/sso-improvements branch February 16, 2024 12:41
@github-actions github-actions bot added this to the jetpack/13.2 milestone Feb 16, 2024
@samiff samiff added the [Status] Needs Testing We need to add this change to the testing call for this month's release label Feb 25, 2024
@ice9js ice9js restored the add/sso-improvements branch March 21, 2024 15:06
@escapemanuele escapemanuele deleted the add/sso-improvements branch March 22, 2024 14:42
@escapemanuele escapemanuele restored the add/sso-improvements branch March 22, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs [Feature] SSO [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] Needs Testing We need to add this change to the testing call for this month's release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants