2018-07-16 18:42:49 +02:00
|
|
|
import { Component } from "@angular/core";
|
2018-07-18 23:10:26 +02:00
|
|
|
import { ActivatedRoute } from "@angular/router";
|
|
|
|
|
2021-12-14 17:10:26 +01:00
|
|
|
import { OrganizationService } from "jslib-common/abstractions/organization.service";
|
2021-06-07 20:13:58 +02:00
|
|
|
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
2018-07-16 18:42:49 +02:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: "app-org-settings",
|
|
|
|
templateUrl: "settings.component.html",
|
|
|
|
})
|
2018-07-18 23:10:26 +02:00
|
|
|
export class SettingsComponent {
|
|
|
|
access2fa = false;
|
2019-02-18 22:10:32 +01:00
|
|
|
selfHosted: boolean;
|
2018-07-18 23:10:26 +02:00
|
|
|
|
2021-12-14 17:10:26 +01:00
|
|
|
constructor(
|
|
|
|
private route: ActivatedRoute,
|
|
|
|
private organizationService: OrganizationService,
|
2019-02-18 22:10:32 +01:00
|
|
|
private platformUtilsService: PlatformUtilsService
|
|
|
|
) {}
|
2018-07-18 23:10:26 +02:00
|
|
|
|
|
|
|
ngOnInit() {
|
2021-02-03 18:41:33 +01:00
|
|
|
this.route.parent.params.subscribe(async (params) => {
|
2019-02-18 22:10:32 +01:00
|
|
|
this.selfHosted = await this.platformUtilsService.isSelfHost();
|
2021-12-14 17:10:26 +01:00
|
|
|
const organization = await this.organizationService.get(params.organizationId);
|
2018-07-18 23:10:26 +02:00
|
|
|
this.access2fa = organization.use2fa;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|