1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-30 08:10:34 +01:00

[Reset Password] BUG Org Keys backfill force sync (#1055)

Merging on Vince's behalf
This commit is contained in:
Vincent Salucci 2021-07-01 09:10:34 -05:00 committed by GitHub
parent 81dfcca06c
commit ae091bd738
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,7 @@ import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.se
import { PolicyService } from 'jslib-common/abstractions/policy.service';
import { SearchService } from 'jslib-common/abstractions/search.service';
import { StorageService } from 'jslib-common/abstractions/storage.service';
import { SyncService } from 'jslib-common/abstractions/sync.service';
import { UserService } from 'jslib-common/abstractions/user.service';
import { OrganizationKeysRequest } from 'jslib-common/models/request/organizationKeysRequest';
@ -98,7 +99,7 @@ export class PeopleComponent implements OnInit {
private cryptoService: CryptoService, private userService: UserService, private router: Router,
private storageService: StorageService, private searchService: SearchService,
private validationService: ValidationService, private policyService: PolicyService,
private searchPipe: SearchPipe) { }
private searchPipe: SearchPipe, private syncService: SyncService) { }
async ngOnInit() {
this.route.parent.parent.params.subscribe(async params => {
@ -122,6 +123,7 @@ export class PeopleComponent implements OnInit {
const response = await this.apiService.postOrganizationKeys(this.organizationId, request);
if (response != null) {
this.orgHasKeys = response.publicKey != null && response.privateKey != null;
await this.syncService.fullSync(true); // Replace oganizations with new data
} else {
throw new Error(this.i18nService.t('resetPasswordOrgKeysError'));
}