google / google/site-kit-wp

Improve the error output for "Insufficient Permissions" notice when the same WP admin is referenced as the WP Admin to contact

Open
#5,264 2 comments 0 reactions 1 assignee Claimed by @marrrmarrr View on GitHub
Module: Analytics P2 Type: Enhancement Type: Support
Dominant language
JavaScript
Stars
1.4k
Forks
383
Avg merge
4d 12h
Merged PRs (30d)
80

Description

## Bug Description

At present it’s possible to encounter an “Insufficient permissions” notice if the same WP administrator disconnects their Google account and then reconnects, but uses a different Google account.

While the permissions error is normal and expected, the additional context in this scenario references the same WP administrator as the logged in WP administrator, suggesting they contact themselves.

If there is no way to determine that a WP administrator was the one himself who initially connected the plugin, but used a different Google account after re-connecting, consider changing the wording slightly.

```diff
- This service was originally connected by the administrator "****". You can contact them for more information.
+ This service was originally connected by the administrator "****", using a Google account that has access to the connected property. This Google account can grant access at Analytics level, to the Google account you used to set up the plugin.
```

![image](https://user-images.githubusercontent.com/41326532/170245435-d6fc7a60-6af4-420c-b14b-1dae7eed24be.png)

[Recording of issue](http://recordit.co/V6FGlxQDmh)

## Steps to reproduce

1. Setup SK on a taste WP site (with only 1 admin)
2. Connect the Analytics module
3. Disconnect SK (don't reset)
4. Set up the plugin once more, but this time use a different Google account
5. The notice will appear within the Analytics widgets. The reference to the other admin is actually the same admin - the only admin

While the video and screenshot above references Google Analytics the same can occur for both Tag Manager and I would imagine AdSense.

---------------

_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

*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.