-
Notifications
You must be signed in to change notification settings - Fork 293
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
Conditionally render authentication-dependent components for authenticated users #4819
Comments
PermissionsModal
for authenticated users
IB ✔️ |
@aaemnnosttv There's a little discussion regarding it on the Slack, just posting it here as well. As it's not possible to call Cheers. |
@kuasha420 that might be fine too – the only thing is that there may be side-effects from running resolvers or other hooks within |
@aaemnnosttv I like that, will do! Thanks. |
QA ❌37101d9 introduced a regression where loading the dashboard without a This can be observed by loading the dashboard and then clicking "Dashboard" in the admin menu. |
QA Update:
|
@wpdarren The changes here should be more/less unnoticeable as this mostly affects unauthenticated views which would only be the splash page for now. It's worth noting that
We haven't integrated with Strict mode yet so you'll see the same notice from before as well, so not to worry there. |
@wpdarren I think Evan answered all your questions perfectly and I have nothing more to add here. This felt kinda like Also, yea, my bad about the Cheers. |
QA Update: ✅Verified: On the splash page.
|
Feature Description
Historically, Site Kit has always been limited to authenticated users, but with dashboard sharing this will no longer be the case so some components will need to be rendered conditionally that weren't before.
The
Root
component currently renders thePermissionsModal
component which is only relevant for authenticated users because in the context of this component, "permissions" specifically refer to oAuth scopes which implies Google authentication. Going forward, this should only be rendered if the user is authenticated.Similarly, the
UnsatisfiedScopesAlert
component is only relevant to render for authenticated users as well.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
PermissionsModal
UnsatisfiedScopesAlert
Implementation Brief
assets/js/components/Root/index.js
, render thePermissionsModal
component only if the user has been authenticated.assets/js/components/notifications/ErrorNotifications.js
, render theUnsatisfiedScopesAlert
component only if the user has been authenticated.isAuthenticated
selector.Test Coverage
QA Brief
PermissionModal
andUnsatisfiedScopesAlert
continues appearing like before. ie. appears for the authenticated user in the situations they should appear.Changelog entry
The text was updated successfully, but these errors were encountered: