mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 19:53:43 +00:00
Disable personal imports if Personal Ownership policy applies (#1176)
* Disable imports if personal ownership policy set * Add missing await
This commit is contained in:
@@ -9,6 +9,7 @@ import { ToasterService } from 'angular2-toaster';
|
||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||
import { ImportService } from 'jslib-common/abstractions/import.service';
|
||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||
import { PolicyService } from 'jslib-common/abstractions/policy.service';
|
||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||
|
||||
import { ImportComponent as BaseImportComponent } from '../../tools/import.component';
|
||||
@@ -22,16 +23,17 @@ export class ImportComponent extends BaseImportComponent {
|
||||
|
||||
constructor(i18nService: I18nService, toasterService: ToasterService,
|
||||
importService: ImportService, router: Router, private route: ActivatedRoute,
|
||||
platformUtilsService: PlatformUtilsService,
|
||||
platformUtilsService: PlatformUtilsService, policyService: PolicyService,
|
||||
private userService: UserService) {
|
||||
super(i18nService, toasterService, importService, router, platformUtilsService);
|
||||
super(i18nService, toasterService, importService, router, platformUtilsService, policyService);
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
this.route.parent.parent.params.subscribe(async params => {
|
||||
this.organizationId = params.organizationId;
|
||||
this.successNavigate = ['organizations', this.organizationId, 'vault'];
|
||||
super.ngOnInit();
|
||||
await super.ngOnInit();
|
||||
this.importBlockedByPolicy = false;
|
||||
});
|
||||
const organization = await this.userService.getOrganization(this.organizationId);
|
||||
this.organizationName = organization.name;
|
||||
|
||||
Reference in New Issue
Block a user