Skip to content

Commit f1c5202

Browse files
committed
Clears organization settings when user signs out
(#4300, #4398)
1 parent f31b51a commit f1c5202

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plus/gk/organizationService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ export class OrganizationService implements Disposable {
131131
private async onSubscriptionChanged(e: SubscriptionChangeEvent): Promise<void> {
132132
if (e.current?.account?.id == null) {
133133
this.updateOrganizations(undefined);
134+
this._organizationSettings = undefined;
135+
await this.clearAllStoredOrganizationsSettings();
134136
}
135-
await this.clearAllStoredOrganizationsSettings();
136137
await this.updateOrganizationPermissions(e.current?.activeOrganization?.id);
137138
}
138139

@@ -274,7 +275,7 @@ export class OrganizationService implements Disposable {
274275
}
275276

276277
private async clearAllStoredOrganizationsSettings(): Promise<void> {
277-
return this.container.storage.deleteWithPrefix(`plus:organization:`);
278+
return this.container.storage.deleteWithPrefix(`plus:organization`);
278279
}
279280

280281
private async deleteStoredOrganizationSettings(id: string): Promise<void> {

0 commit comments

Comments
 (0)