mirror of
https://github.com/bitwarden/browser.git
synced 2024-08-29 23:49:50 +02:00
[Reset Password] BUG Org Keys backfill force sync (#1055)
Merging on Vince's behalf
This commit is contained in:
parent
81dfcca06c
commit
ae091bd738
|
@ -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'));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user