Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3184668
D4848.id15713.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4848.id15713.diff
View Options
diff --git a/lib/reducers/enabled-apps-reducer.js b/lib/reducers/enabled-apps-reducer.js
--- a/lib/reducers/enabled-apps-reducer.js
+++ b/lib/reducers/enabled-apps-reducer.js
@@ -1,7 +1,16 @@
// @flow
+import {
+ deleteAccountActionTypes,
+ logOutActionTypes,
+} from '../actions/user-actions.js';
import type { EnabledApps } from '../types/enabled-apps';
+import {
+ defaultEnabledApps,
+ defaultWebEnabledApps,
+} from '../types/enabled-apps';
import type { BaseAction } from '../types/redux-types';
+import { setNewSessionActionType } from '../utils/action-utils.js';
export const enableAppActionType = 'ENABLE_APP';
export const disableAppActionType = 'DISABLE_APP';
@@ -17,6 +26,13 @@
action.payload === 'calendar'
) {
return { ...state, calendar: false };
+ } else if (
+ action.type === logOutActionTypes.success ||
+ action.type === deleteAccountActionTypes.success ||
+ (action.type === setNewSessionActionType &&
+ action.payload.sessionChange.cookieInvalidated)
+ ) {
+ return process.env.BROWSER ? defaultWebEnabledApps : defaultEnabledApps;
}
return state;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 11:27 AM (17 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2451878
Default Alt Text
D4848.id15713.diff (1 KB)
Attached To
Mode
D4848: [lib] Clear enabled apps on logout
Attached
Detach File
Event Timeline
Log In to Comment