google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.25k stars 292 forks source link

"Reset sharing permissions" is only applicable to modules owned by the administrator resetting #9638

Open jamesozzie opened 2 weeks ago

jamesozzie commented 2 weeks ago

Bug Description

When using dashboard sharing, if there are modules shared by different administrators, the "Reset sharing permissions" CTA will only reset permissions for the administrator selecting that option. It won't reset permissions for modules not owned by that administrator. This can cause issues as the other administrator may not longer be active, or their WordPress account was removed, leaving a message to "Contact managing user" when that user no longer exists.

Image

To address this, considering making the "Reset sharing permissions" option applicable to all modules, even those not owned by the user resetting.

Steps to reproduce

  1. Set up SK on a site with only Search Console active from a WordPress administrator account (adminA)
  2. Login with a different WordPress administrator account (adminB). Set up Site Kit as a secondary user and connect the Google Analytics or AdSense module. After doing so, grant sharing permissions to other users via Dashboard Sharing.
  3. Log back into the site from the original administrator account (adminA).
  4. Share the Search Console module (so the option to "Reset Sharing Permissions" appears
  5. Use the CTA to "Reset Sharing Permissions"
  6. Only the Search Console module sharing permissions are reset, and not GA.

Note: A fix here would mean we can also close #9617


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

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

jamesozzie commented 2 weeks ago

cc @aaemnnosttv