[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 { PolicyService } from 'jslib-common/abstractions/policy.service';
|
||||||
import { SearchService } from 'jslib-common/abstractions/search.service';
|
import { SearchService } from 'jslib-common/abstractions/search.service';
|
||||||
import { StorageService } from 'jslib-common/abstractions/storage.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 { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
|
|
||||||
import { OrganizationKeysRequest } from 'jslib-common/models/request/organizationKeysRequest';
|
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 cryptoService: CryptoService, private userService: UserService, private router: Router,
|
||||||
private storageService: StorageService, private searchService: SearchService,
|
private storageService: StorageService, private searchService: SearchService,
|
||||||
private validationService: ValidationService, private policyService: PolicyService,
|
private validationService: ValidationService, private policyService: PolicyService,
|
||||||
private searchPipe: SearchPipe) { }
|
private searchPipe: SearchPipe, private syncService: SyncService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.route.parent.parent.params.subscribe(async params => {
|
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);
|
const response = await this.apiService.postOrganizationKeys(this.organizationId, request);
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
this.orgHasKeys = response.publicKey != null && response.privateKey != null;
|
this.orgHasKeys = response.publicKey != null && response.privateKey != null;
|
||||||
|
await this.syncService.fullSync(true); // Replace oganizations with new data
|
||||||
} else {
|
} else {
|
||||||
throw new Error(this.i18nService.t('resetPasswordOrgKeysError'));
|
throw new Error(this.i18nService.t('resetPasswordOrgKeysError'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue