mirror of
https://github.com/bitwarden/browser
synced 2025-12-26 05:03:33 +00:00
[SG-329] Disabled Org display (#3050)
* chore: added strings for disabled org messages * chore: added icon display * chore: added prevent filter check * chore: code changes for desktop * chore: browser
This commit is contained in:
@@ -1967,5 +1967,11 @@
|
||||
},
|
||||
"ssoKeyConnectorError": {
|
||||
"message": "Key Connector error: make sure Key Connector is available and working correctly."
|
||||
},
|
||||
"organizationIsDisabled": {
|
||||
"message": "Organization is disabled."
|
||||
},
|
||||
"disabledOrganizationFilterError" : {
|
||||
"message" : "Items in disabled Organizations cannot be accessed. Contact your Organization owner for assistance."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,12 @@
|
||||
aria-hidden="true"
|
||||
></i>
|
||||
<span> {{ organization.name | ellipsis: 21:true }}</span>
|
||||
<i
|
||||
*ngIf="!organization.enabled"
|
||||
class="bwi bwi-fw bwi-exclamation-triangle text-danger"
|
||||
aria-label="{{ 'organizationIsDisabled' | i18n }}"
|
||||
appA11yTitle="{{ 'organizationIsDisabled' | i18n }}"
|
||||
></i>
|
||||
</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
@@ -17,6 +17,7 @@ import { merge } from "rxjs";
|
||||
import { VaultFilter } from "@bitwarden/angular/modules/vault-filter/models/vault-filter.model";
|
||||
import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service";
|
||||
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
|
||||
import { Organization } from "@bitwarden/common/models/domain/organization";
|
||||
|
||||
import { VaultFilterService } from "../../services/vaultFilter.service";
|
||||
@@ -82,7 +83,8 @@ export class VaultSelectComponent implements OnInit {
|
||||
private ngZone: NgZone,
|
||||
private broadcasterService: BroadcasterService,
|
||||
private overlay: Overlay,
|
||||
private viewContainerRef: ViewContainerRef
|
||||
private viewContainerRef: ViewContainerRef,
|
||||
private platformUtilsService: PlatformUtilsService
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
@@ -171,10 +173,18 @@ export class VaultSelectComponent implements OnInit {
|
||||
}
|
||||
|
||||
selectOrganization(organization: Organization) {
|
||||
this.vaultFilterDisplay = organization.name;
|
||||
this.vaultFilterService.setVaultFilter(organization.id);
|
||||
this.onVaultSelectionChanged.emit();
|
||||
this.close();
|
||||
if (!organization.enabled) {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
null,
|
||||
this.i18nService.t("disabledOrganizationFilterError")
|
||||
);
|
||||
} else {
|
||||
this.vaultFilterDisplay = organization.name;
|
||||
this.vaultFilterService.setVaultFilter(organization.id);
|
||||
this.onVaultSelectionChanged.emit();
|
||||
this.close();
|
||||
}
|
||||
}
|
||||
selectAllVaults() {
|
||||
this.vaultFilterDisplay = this.i18nService.t(this.vaultFilterService.allVaults);
|
||||
|
||||
Reference in New Issue
Block a user