Update triggerSurvey
to be no-op for non-authenticated users
#4806
Labels
P0
High priority
QA: Eng
Requires specialized QA by an engineer
Rollover
Issues which role over to the next sprint
Type: Enhancement
Improvement of an existing feature
Feature Description
In the context of dashboard sharing, non-authenticated users will be able to use Site Kit dashboards where we currently trigger a number of surveys. This action however requires an access token which non-authenticated users don't have.
Accordingly, this action should be updated to be a no-op in the event the current user isn't authenticated.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
triggerSurvey
action on thecore/user
store should be updated to bypass its fetch request (similar to the logic for a an existing current survey) if the current user is not authenticatedImplementation Brief
assets/js/googlesitekit/datastore/user/surveys.js
, within thetriggerSurvey
action creator (generator) function:isAuthenticated()
selector and if it returns false, return an empty object (bail early).Test Coverage
assets/js/googlesitekit/datastore/user/surveys.test.js
:triggerSurvey
group that checks if the fetch is bypassed if the current user is not authenticated.QA Brief
QA Eng
Changelog entry
The text was updated successfully, but these errors were encountered: