-
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
Improve module Edit Settings form when owner loses access to the module #7588
Comments
I have renamed this issue as this affects all modules and not simply Search Console. It is possible that the current owner of a module, i.e. the person that first set up the module, can lose access to the module for which the "Insufficient Permissions" errors are displayed in widgets on the dashboard. However, when VIEWING settings, certain modules like Analytics do throw an error whereas Search Console does not as the current saved settings are simply displayed from the database. Now, when EDITING settings, all drop-downs end up being blank and there is no proper error message on some forms. If the logged in user is not the owner of a module, we always display a well designed error message and simply display the saved settings values (and no additional information which cannot be fetched if the user has no permissions). This is because in #4825 and other related issues, we first check if the current logged in user is the owner of a module. If they are, we do NOT check if the user has access to this module or not. This is then used to display the above behaviour (error + saved settings values only). The module owner check was done mainly to avoid changing all our tests/E2E tests (see point 2 in this comment). Should we handle the case where the current logged in user themselves don't have access? |
@jimmymadon Checking to ensure the current user doesn't have access makes sense. It'd be great if we could do it only when there's an error if it'll save an otherwise redundant request (that's probably rare), but that's more of an IB detail. I think it makes sense to write up ACs for that scenario 👍🏻 |
@tofumatt Thanks - I've drafted some ACs here. c.c.ing @aaemnnosttv as he drafted the original ACs for #4825 and advocated for a "module owner" check BEFORE doing a "module access" check. |
Can this please have a priority label added @jimmymadon or @tofumatt thank you |
ACs here work for me, moving this to IB 🙂 |
@aaemnnosttv I'm moving this back to ACR as when I was doing the IB for this issue, I realise this does make the code a lot more complex, affects many tests and will overall be a 15 or 19 if we do this carefully for all modules. So I'd like to discuss if this rather rare case is worth the effort of fixing. c.c. @tofumatt |
Bug Description
If an user doesn't have access to the connected SC property, they'll see a warning on the Site Kit dashboard as per the below:
If they try to edit the Search Console module, and if this is the only Search Console property available, there will be a dropdown with nothing available for selection. It's not possible to confirm any changes.
Improve this scenario by adding some textual context, or a "Request accsses" button as it appears on the dashboard.
Steps to reproduce
Screenshots
Additional Context
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
The text was updated successfully, but these errors were encountered: