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

Remove the option to "Skip sign-in and view limited dashboard" if the admin is the only admin #5380

Closed
eclarke1 opened this issue Jun 16, 2022 · 2 comments
Labels
P0 High priority Type: Bug Something isn't working

Comments

@eclarke1
Copy link
Collaborator

eclarke1 commented Jun 16, 2022

Bug Description

Bug bash issue: https://app.asana.com/0/1202258919887896/1202445528223675 please refer to Asana issue for background

Remove the option to "Skip sign-in and view limited dashboard" if the admin is the only admin, or if there were no modules shared with that admin. If an admin disconnects from Site Kit and only they have shared access to their connected modules (ie. Analytics) remove the option to "Skip sign-in an view limited dashboard".

Steps to reproduce

  1. Sign in to Site Kit and enable Dashboard Sharing of at least one module with all admins
  2. Disconnect Site Kit
  3. Go to Site Kit sign in splash page
  4. See there is an option to "view shared dashboard" that shouldn't be there.

Screenshots

Recording of experience - jump to 1 minute 35 seconds

image.png

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • When there is only one admin on the site, the "View shared Dashboard" link should never appear
  • The "View Shared Dashboard" link should never appear when no admins are authenticated with Site Kit
  • The "View Shared Dashboard" link should also not appear when no modules are being shared

Implementation Brief

  • Using assets/js/components/setup/SetupUsingProxyWithSignIn.js,
    • Update the condition (on top of the existing ones) to display the "Skip sign-in and view limited dashboard" button if:
      • there are multiple admins
        • Query the core/site data store via the hasMultipleAdmins selector to determine if there are multiple admins
      • there are authenticated admins
        • Query the core/site data store via the hasConnectedAdmins selector to determine if there are authenticated admins
  • Update assets/js/components/setup/SetupUsingProxyWithSignIn.stories.js to reflect above changes.

Test Coverage

  • No new tests to be added.

QA Brief

  • Follow the first three steps in the "Steps to reproduce" section above.
  • Make sure the "Skip sign-in and view limited dashboard" link isn't available.
  • In short, if the site only has one admin, the skip sign-in link shouldn't show up.
  • For the skip sign-in link to show up, the site needs to have more than one admin and at least one authenticated admin user.

Changelog entry

  • Remove "view limited dashboard" sign-in option when only one admin exists on the site.
@eclarke1 eclarke1 added P0 High priority Type: Bug Something isn't working labels Jun 16, 2022
@tofumatt tofumatt assigned tofumatt and unassigned tofumatt Jun 16, 2022
@asvinb asvinb assigned asvinb and unassigned asvinb Jun 16, 2022
@aaemnnosttv
Copy link
Collaborator

IB ✅

@nfmohit nfmohit self-assigned this Jun 19, 2022
@nfmohit nfmohit removed their assignment Jun 19, 2022
@tofumatt tofumatt assigned tofumatt and nfmohit and unassigned tofumatt Jun 20, 2022
@nfmohit nfmohit assigned tofumatt and unassigned nfmohit Jun 22, 2022
@tofumatt tofumatt removed their assignment Jun 22, 2022
@wpdarren wpdarren self-assigned this Jun 22, 2022
@wpdarren
Copy link
Collaborator

QA Update: ✅

Verified:

  • II the site only has one admin, the skip sign-in link does not show up. All I can see is the reset link.
  • If the site has more than one admin, the skip sign-in link does show up.

image

@wpdarren wpdarren removed their assignment Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants