bitwarden-estensione-browser/src/app/organizations/tools/inactive-two-factor-report....

40 lines
1.7 KiB
TypeScript
Raw Normal View History

import { Component } from '@angular/core';
2018-12-14 20:22:30 +01:00
import { ActivatedRoute } from '@angular/router';
import { CipherService } from 'jslib-common/abstractions/cipher.service';
import { LogService } from 'jslib-common/abstractions/log.service';
import { MessagingService } from 'jslib-common/abstractions/messaging.service';
import { PasswordRepromptService } from 'jslib-common/abstractions/passwordReprompt.service';
import { UserService } from 'jslib-common/abstractions/user.service';
2018-12-14 20:22:30 +01:00
import { ModalService } from 'jslib-angular/services/modal.service';
2018-12-14 20:22:30 +01:00
import {
InactiveTwoFactorReportComponent as BaseInactiveTwoFactorReportComponent,
} from '../../tools/inactive-two-factor-report.component';
import { CipherView } from 'jslib-common/models/view/cipherView';
2018-12-14 20:22:30 +01:00
@Component({
selector: 'app-inactive-two-factor-report',
templateUrl: '../../tools/inactive-two-factor-report.component.html',
})
export class InactiveTwoFactorReportComponent extends BaseInactiveTwoFactorReportComponent {
constructor(cipherService: CipherService, modalService: ModalService,
messagingService: MessagingService, userService: UserService,
private route: ActivatedRoute, logService: LogService, passwordRepromptService: PasswordRepromptService) {
super(cipherService, modalService, messagingService, userService, logService, passwordRepromptService);
2018-12-14 20:22:30 +01:00
}
async ngOnInit() {
this.route.parent.parent.params.subscribe(async params => {
2018-12-14 20:22:30 +01:00
this.organization = await this.userService.getOrganization(params.organizationId);
await super.ngOnInit();
});
}
getAllCiphers(): Promise<CipherView[]> {
return this.cipherService.getAllFromApiForOrganization(this.organization.id);
}
}