Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3372298
D10648.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D10648.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,7 @@
// @flow
import {
- deleteKeyserverAccountActionTypes,
+ deleteAccountActionTypes,
logOutActionTypes,
} from '../actions/user-actions.js';
import { setNewSessionActionType } from '../keyserver-conn/keyserver-conn-types.js';
@@ -11,6 +11,7 @@
defaultWebEnabledApps,
} from '../types/enabled-apps.js';
import type { BaseAction } from '../types/redux-types.js';
+import { usingCommServicesAccessToken } from '../utils/services-utils.js';
export const enableAppActionType = 'ENABLE_APP';
export const disableAppActionType = 'DISABLE_APP';
@@ -28,9 +29,13 @@
return { ...state, calendar: false };
} else if (
action.type === logOutActionTypes.success ||
- action.type === deleteKeyserverAccountActionTypes.success ||
- (action.type === setNewSessionActionType &&
- action.payload.sessionChange.cookieInvalidated)
+ action.type === deleteAccountActionTypes.success
+ ) {
+ return process.env.BROWSER ? defaultWebEnabledApps : defaultEnabledApps;
+ } else if (
+ action.type === setNewSessionActionType &&
+ action.payload.sessionChange.cookieInvalidated &&
+ !usingCommServicesAccessToken
) {
return process.env.BROWSER ? defaultWebEnabledApps : defaultEnabledApps;
}
diff --git a/lib/reducers/services-access-token-reducer.js b/lib/reducers/services-access-token-reducer.js
--- a/lib/reducers/services-access-token-reducer.js
+++ b/lib/reducers/services-access-token-reducer.js
@@ -2,7 +2,7 @@
import {
logOutActionTypes,
- deleteKeyserverAccountActionTypes,
+ deleteAccountActionTypes,
setAccessTokenActionType,
} from '../actions/user-actions.js';
import { setNewSessionActionType } from '../keyserver-conn/keyserver-conn-types.js';
@@ -23,7 +23,7 @@
} else if (
action.type === logOutActionTypes.started ||
action.type === logOutActionTypes.success ||
- action.type === deleteKeyserverAccountActionTypes.success
+ action.type === deleteAccountActionTypes.success
) {
return null;
}
diff --git a/lib/reducers/theme-reducer.js b/lib/reducers/theme-reducer.js
--- a/lib/reducers/theme-reducer.js
+++ b/lib/reducers/theme-reducer.js
@@ -4,7 +4,7 @@
import { updateThemeInfoActionType } from '../actions/theme-actions.js';
import {
logOutActionTypes,
- deleteKeyserverAccountActionTypes,
+ deleteAccountActionTypes,
logInActionTypes,
tempIdentityLoginActionTypes,
keyserverRegisterActionTypes,
@@ -36,7 +36,7 @@
} else if (
action.type === logOutActionTypes.started ||
action.type === logOutActionTypes.success ||
- action.type === deleteKeyserverAccountActionTypes.success
+ action.type === deleteAccountActionTypes.success
) {
return defaultGlobalThemeInfo;
} else if (action.type === updateThemeInfoActionType) {
diff --git a/lib/reducers/user-reducer.js b/lib/reducers/user-reducer.js
--- a/lib/reducers/user-reducer.js
+++ b/lib/reducers/user-reducer.js
@@ -13,7 +13,6 @@
deleteAccountActionTypes,
keyserverAuthActionTypes,
logOutActionTypes,
- deleteKeyserverAccountActionTypes,
logInActionTypes,
keyserverRegisterActionTypes,
setUserSettingsActionTypes,
@@ -59,7 +58,7 @@
action.type === siweAuthActionTypes.success ||
action.type === keyserverRegisterActionTypes.success ||
action.type === logOutActionTypes.success ||
- action.type === deleteKeyserverAccountActionTypes.success
+ action.type === deleteAccountActionTypes.success
) {
if (!_isEqual(action.payload.currentUserInfo)(state)) {
return action.payload.currentUserInfo;
diff --git a/native/redux/redux-setup.js b/native/redux/redux-setup.js
--- a/native/redux/redux-setup.js
+++ b/native/redux/redux-setup.js
@@ -9,9 +9,10 @@
import { siweAuthActionTypes } from 'lib/actions/siwe-actions.js';
import {
logOutActionTypes,
- deleteKeyserverAccountActionTypes,
+ deleteAccountActionTypes,
logInActionTypes,
keyserverAuthActionTypes,
+ deleteKeyserverAccountActionTypes,
} from 'lib/actions/user-actions.js';
import { setNewSessionActionType } from 'lib/keyserver-conn/keyserver-conn-types.js';
import type { ThreadStoreOperation } from 'lib/ops/thread-store-ops.js';
@@ -123,6 +124,13 @@
ashoatKeyserverID,
)) ||
(action.type === deleteKeyserverAccountActionTypes.success &&
+ invalidSessionDowngrade(
+ state,
+ action.payload.currentUserInfo,
+ action.payload.preRequestUserState,
+ ashoatKeyserverID,
+ )) ||
+ (action.type === deleteAccountActionTypes.success &&
invalidSessionDowngrade(
state,
action.payload.currentUserInfo,
@@ -194,7 +202,7 @@
} else if (
action.type === logOutActionTypes.started ||
action.type === logOutActionTypes.success ||
- action.type === deleteKeyserverAccountActionTypes.success
+ action.type === deleteAccountActionTypes.success
) {
state = {
...state,
diff --git a/web/redux/crypto-store-reducer.js b/web/redux/crypto-store-reducer.js
--- a/web/redux/crypto-store-reducer.js
+++ b/web/redux/crypto-store-reducer.js
@@ -2,10 +2,11 @@
import {
logOutActionTypes,
- deleteKeyserverAccountActionTypes,
+ deleteAccountActionTypes,
} from 'lib/actions/user-actions.js';
import { setNewSessionActionType } from 'lib/keyserver-conn/keyserver-conn-types.js';
import type { CryptoStore } from 'lib/types/crypto-types.js';
+import { usingCommServicesAccessToken } from 'lib/utils/services-utils.js';
import type { Action } from './redux-setup.js';
@@ -16,9 +17,13 @@
return action.payload;
} else if (
action.type === logOutActionTypes.success ||
- action.type === deleteKeyserverAccountActionTypes.success ||
- (action.type === setNewSessionActionType &&
- action.payload.sessionChange.cookieInvalidated)
+ action.type === deleteAccountActionTypes.success
+ ) {
+ return null;
+ } else if (
+ action.type === setNewSessionActionType &&
+ action.payload.sessionChange.cookieInvalidated &&
+ !usingCommServicesAccessToken
) {
return null;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 6:08 AM (21 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2589063
Default Alt Text
D10648.diff (6 KB)
Attached To
Mode
D10648: [lib][web][native] Stop removing some state on keyserver logout
Attached
Detach File
Event Timeline
Log In to Comment