Conversation
…ing on a support session check
Contributor
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Contributor
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryCoverage changed in 1 file.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #
Proposed changes
Tools → Feature Flags (a8c), added in #51324, often doesn't show up for Automatticians on Atomic sites, even when the "PROXIED V2" banner and Debug Bar do. Those two only check
AT_PROXIED_REQUEST. The Feature Flags screen also needs wpcomsh's_wpcomsh_support_session_detectedcookie with the valuefalse. That cookie is often missing:SameSite=Strict, so a cross-site navigation into wp-admin (from Calypso, Slack, a P2…) doesn't send it. The menu entry is missing on that first page load.This PR separates viewing the screen from saving on it:
AT_PROXIED_REQUEST+manage_options. That is the same condition as the PROXIED V2 banner. Simple is unchanged (is_automattician()).handle_save()now uses a newcurrent_user_can_save(). On Atomic it also needs a stored "not a support session" verdict, so a submission without one is refused on the server./_wpcomsh_detect_support_session). It then returns through/wp-login.php?redirect_to=<this screen>, which forwards a logged-in user straight back.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
You need a WoA dev site running this branch of
jetpack-mu-wpcom(via wpcomsh), which you reach through the a8c proxy.Menu visibility
_wpcomsh_support_session_detectedif it is there, then reload.Saving is blocked without a verdict
Verification flow
_wpcomsh_support_session_detectedis now set tofalse.Support session
true), the screen shows "Saving is disabled during a support session", no Verify button, and a disabled Save button.Things to look out for
wp-login.phpon the way back. If that happens, you should still end up on the screen with the cookie set, because SSO success sets it as well.