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-06-07 20:13:58 +02:00
|
|
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
|
|
|
import { UserService } from 'jslib-common/abstractions/user.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
|
|
|
|
2019-02-18 22:10:32 +01:00
|
|
|
constructor(private route: ActivatedRoute, private userService: UserService,
|
|
|
|
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();
|
2018-07-18 23:10:26 +02:00
|
|
|
const organization = await this.userService.getOrganization(params.organizationId);
|
|
|
|
this.access2fa = organization.use2fa;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|