update jslib and construct policy service
This commit is contained in:
parent
292d713423
commit
f7f70408c9
2
jslib
2
jslib
|
@ -1 +1 @@
|
||||||
Subproject commit dce1453732553d991ac910e3a93038f7331c8ab9
|
Subproject commit 3d2e2cb1741be8b7b2916574f62f7ba2193c7123
|
|
@ -40,6 +40,7 @@ import { LockService } from 'jslib/abstractions/lock.service';
|
||||||
import { NotificationsService } from 'jslib/abstractions/notifications.service';
|
import { NotificationsService } from 'jslib/abstractions/notifications.service';
|
||||||
import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service';
|
import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service';
|
||||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||||
|
import { PolicyService } from 'jslib/abstractions/policy.service';
|
||||||
import { SearchService } from 'jslib/abstractions/search.service';
|
import { SearchService } from 'jslib/abstractions/search.service';
|
||||||
import { SettingsService } from 'jslib/abstractions/settings.service';
|
import { SettingsService } from 'jslib/abstractions/settings.service';
|
||||||
import { StateService } from 'jslib/abstractions/state.service';
|
import { StateService } from 'jslib/abstractions/state.service';
|
||||||
|
@ -84,7 +85,8 @@ export class AppComponent implements OnDestroy, OnInit {
|
||||||
private cryptoService: CryptoService, private collectionService: CollectionService,
|
private cryptoService: CryptoService, private collectionService: CollectionService,
|
||||||
private sanitizer: DomSanitizer, private searchService: SearchService,
|
private sanitizer: DomSanitizer, private searchService: SearchService,
|
||||||
private notificationsService: NotificationsService, private routerService: RouterService,
|
private notificationsService: NotificationsService, private routerService: RouterService,
|
||||||
private stateService: StateService, private eventService: EventService) { }
|
private stateService: StateService, private eventService: EventService,
|
||||||
|
private policyService: PolicyService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.ngZone.runOutsideAngular(() => {
|
this.ngZone.runOutsideAngular(() => {
|
||||||
|
@ -187,6 +189,7 @@ export class AppComponent implements OnDestroy, OnInit {
|
||||||
this.cipherService.clear(userId),
|
this.cipherService.clear(userId),
|
||||||
this.folderService.clear(userId),
|
this.folderService.clear(userId),
|
||||||
this.collectionService.clear(userId),
|
this.collectionService.clear(userId),
|
||||||
|
this.policyService.clear(userId),
|
||||||
this.passwordGenerationService.clear(),
|
this.passwordGenerationService.clear(),
|
||||||
this.stateService.purge(),
|
this.stateService.purge(),
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -41,6 +41,7 @@ import { ImportService } from 'jslib/services/import.service';
|
||||||
import { LockService } from 'jslib/services/lock.service';
|
import { LockService } from 'jslib/services/lock.service';
|
||||||
import { NotificationsService } from 'jslib/services/notifications.service';
|
import { NotificationsService } from 'jslib/services/notifications.service';
|
||||||
import { PasswordGenerationService } from 'jslib/services/passwordGeneration.service';
|
import { PasswordGenerationService } from 'jslib/services/passwordGeneration.service';
|
||||||
|
import { PolicyService } from 'jslib/services/policy.service';
|
||||||
import { SearchService } from 'jslib/services/search.service';
|
import { SearchService } from 'jslib/services/search.service';
|
||||||
import { SettingsService } from 'jslib/services/settings.service';
|
import { SettingsService } from 'jslib/services/settings.service';
|
||||||
import { StateService } from 'jslib/services/state.service';
|
import { StateService } from 'jslib/services/state.service';
|
||||||
|
@ -72,6 +73,7 @@ import {
|
||||||
PasswordGenerationService as PasswordGenerationServiceAbstraction,
|
PasswordGenerationService as PasswordGenerationServiceAbstraction,
|
||||||
} from 'jslib/abstractions/passwordGeneration.service';
|
} from 'jslib/abstractions/passwordGeneration.service';
|
||||||
import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from 'jslib/abstractions/platformUtils.service';
|
import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from 'jslib/abstractions/platformUtils.service';
|
||||||
|
import { PolicyService as PolicyServiceAbstraction } from 'jslib/abstractions/policy.service';
|
||||||
import { SearchService as SearchServiceAbstraction } from 'jslib/abstractions/search.service';
|
import { SearchService as SearchServiceAbstraction } from 'jslib/abstractions/search.service';
|
||||||
import { SettingsService as SettingsServiceAbstraction } from 'jslib/abstractions/settings.service';
|
import { SettingsService as SettingsServiceAbstraction } from 'jslib/abstractions/settings.service';
|
||||||
import { StateService as StateServiceAbstraction } from 'jslib/abstractions/state.service';
|
import { StateService as StateServiceAbstraction } from 'jslib/abstractions/state.service';
|
||||||
|
@ -105,10 +107,11 @@ const folderService = new FolderService(cryptoService, userService, apiService,
|
||||||
i18nService, cipherService);
|
i18nService, cipherService);
|
||||||
const collectionService = new CollectionService(cryptoService, userService, storageService, i18nService);
|
const collectionService = new CollectionService(cryptoService, userService, storageService, i18nService);
|
||||||
searchService = new SearchService(cipherService, platformUtilsService);
|
searchService = new SearchService(cipherService, platformUtilsService);
|
||||||
|
const policyService = new PolicyService(userService, storageService);
|
||||||
const lockService = new LockService(cipherService, folderService, collectionService,
|
const lockService = new LockService(cipherService, folderService, collectionService,
|
||||||
cryptoService, platformUtilsService, storageService, messagingService, searchService, userService, null);
|
cryptoService, platformUtilsService, storageService, messagingService, searchService, userService, null);
|
||||||
const syncService = new SyncService(userService, apiService, settingsService,
|
const syncService = new SyncService(userService, apiService, settingsService,
|
||||||
folderService, cipherService, cryptoService, collectionService, storageService, messagingService,
|
folderService, cipherService, cryptoService, collectionService, storageService, messagingService, policyService,
|
||||||
async (expired: boolean) => messagingService.send('logout', { expired: expired }));
|
async (expired: boolean) => messagingService.send('logout', { expired: expired }));
|
||||||
const passwordGenerationService = new PasswordGenerationService(cryptoService, storageService);
|
const passwordGenerationService = new PasswordGenerationService(cryptoService, storageService);
|
||||||
const totpService = new TotpService(storageService, cryptoFunctionService);
|
const totpService = new TotpService(storageService, cryptoFunctionService);
|
||||||
|
@ -211,6 +214,7 @@ export function initFactory(): Function {
|
||||||
{ provide: NotificationsServiceAbstraction, useValue: notificationsService },
|
{ provide: NotificationsServiceAbstraction, useValue: notificationsService },
|
||||||
{ provide: CryptoFunctionServiceAbstraction, useValue: cryptoFunctionService },
|
{ provide: CryptoFunctionServiceAbstraction, useValue: cryptoFunctionService },
|
||||||
{ provide: EventLoggingServiceAbstraction, useValue: eventLoggingService },
|
{ provide: EventLoggingServiceAbstraction, useValue: eventLoggingService },
|
||||||
|
{ provide: PolicyServiceAbstraction, useValue: policyService },
|
||||||
{
|
{
|
||||||
provide: APP_INITIALIZER,
|
provide: APP_INITIALIZER,
|
||||||
useFactory: initFactory,
|
useFactory: initFactory,
|
||||||
|
|
Loading…
Reference in New Issue