Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3156484
D10619.id35572.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10619.id35572.diff
View Options
diff --git a/lib/reducers/report-store-reducer.js b/lib/reducers/report-store-reducer.js
--- a/lib/reducers/report-store-reducer.js
+++ b/lib/reducers/report-store-reducer.js
@@ -29,6 +29,7 @@
import { setNewSessionActionType } from '../utils/action-utils.js';
import { isDev } from '../utils/dev-utils.js';
import { isReportEnabled } from '../utils/report-utils.js';
+import { usingCommServicesAccessToken } from '../utils/services-utils.js';
export const updateReportsEnabledActionType = 'UPDATE_REPORTS_ENABLED';
@@ -79,29 +80,33 @@
(action.type === setNewSessionActionType &&
action.payload.sessionChange.cookieInvalidated)
) {
- return {
- reportStore: {
- queuedReports: [],
- enabledReports: isDev
- ? defaultDevEnabledReports
- : defaultEnabledReports,
- },
- reportStoreOperations: [{ type: 'remove_all_reports' }],
- };
+ if (!usingCommServicesAccessToken) {
+ return {
+ reportStore: {
+ queuedReports: [],
+ enabledReports: isDev
+ ? defaultDevEnabledReports
+ : defaultEnabledReports,
+ },
+ reportStoreOperations: [{ type: 'remove_all_reports' }],
+ };
+ }
} else if (
action.type === logInActionTypes.success ||
action.type === siweAuthActionTypes.success
) {
- return {
- reportStore: {
- queuedReports: [],
- enabledReports:
- isStaff(action.payload.currentUserInfo.id) || isDev
- ? defaultDevEnabledReports
- : defaultEnabledReports,
- },
- reportStoreOperations: [{ type: 'remove_all_reports' }],
- };
+ if (!usingCommServicesAccessToken) {
+ return {
+ reportStore: {
+ queuedReports: [],
+ enabledReports:
+ isStaff(action.payload.currentUserInfo.id) || isDev
+ ? defaultDevEnabledReports
+ : defaultEnabledReports,
+ },
+ reportStoreOperations: [{ type: 'remove_all_reports' }],
+ };
+ }
} else if (
(action.type === sendReportActionTypes.success ||
action.type === sendReportsActionTypes.success) &&
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 3:51 PM (20 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2431335
Default Alt Text
D10619.id35572.diff (2 KB)
Attached To
Mode
D10619: [lib] Refactor report store reducer
Attached
Detach File
Event Timeline
Log In to Comment