Bug Description
A view-only user without permission to view Analytics module can see the "activate Analytics" notification on the dashboard.
This was raised in the bug bash, see this Asana task.
Steps to reproduce
- Set up Site Kit with the
setupFlowRefresh feature flag enabled and Analytics connected.
- Share a module other than Analytics with a non-admin user.
- View the dashboard as that user.
- See the "activate Analytics" notification.
Screenshots
Additional Context
- PHP Version:
- OS: any
- Browser: any
- Plugin Version: 1.180.0
- Device: any
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The "activate Analytics" notification is not shown to a view-only user.
Implementation Brief
Test Coverage
- Add test for
checkRequirements to verify the notification is not active for view-only users without Analytics permission.
QA Brief
- Follow the steps given in
Steps to reproduce section above.
- Ensure that the notification is not visible to view only user.
Changelog entry
- Prevent the "activate Analytics" notification from appearing for view-only users.
Bug Description
A view-only user without permission to view Analytics module can see the "activate Analytics" notification on the dashboard.
This was raised in the bug bash, see this Asana task.
Steps to reproduce
setupFlowRefreshfeature flag enabled and Analytics connected.Screenshots
Additional Context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
assets/js/googlesitekit/notifications/register-defaults.js:checkRequirementsfor theactivate-analytics-notificationto include a permission check ensuring the user can view the Analytics module:requireIsAuthenticated()to the requirement chain usingasyncRequireAll().requireCanActivateModule()check.Test Coverage
checkRequirementsto verify the notification is not active for view-only users without Analytics permission.QA Brief
Steps to reproducesection above.Changelog entry