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

39 lines
1.4 KiB
TypeScript
Raw Normal View History

2018-12-14 20:22:30 +01:00
import {
Component,
ComponentFactoryResolver,
} from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { CipherService } from 'jslib/abstractions/cipher.service';
import { MessagingService } from 'jslib/abstractions/messaging.service';
import { UserService } from 'jslib/abstractions/user.service';
import {
InactiveTwoFactorReportComponent as BaseInactiveTwoFactorReportComponent,
} from '../../tools/inactive-two-factor-report.component';
import { CipherView } from 'jslib/models/view/cipherView';
@Component({
selector: 'app-inactive-two-factor-report',
templateUrl: '../../tools/inactive-two-factor-report.component.html',
})
export class InactiveTwoFactorReportComponent extends BaseInactiveTwoFactorReportComponent {
2018-12-14 20:42:04 +01:00
constructor(cipherService: CipherService, componentFactoryResolver: ComponentFactoryResolver,
2018-12-14 20:22:30 +01:00
messagingService: MessagingService, userService: UserService,
private route: ActivatedRoute) {
2018-12-14 20:42:04 +01:00
super(cipherService, componentFactoryResolver, messagingService, userService);
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);
}
}