[AC-2209] Update the dash in the admin console collections table permission column to no access (#8609)

* [AC-2209] Update permission text to display "No access" when collection is not assigned

* [AC-2209] Add permission tooltip for unassigned collections
This commit is contained in:
Rui Tomé 2024-04-18 14:17:34 +01:00 committed by GitHub
parent 1e0ad09757
commit 2c8855692c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 3 deletions

View File

@ -48,7 +48,7 @@
></app-group-badge>
</td>
<td bitCell [ngClass]="RowHeightClass" *ngIf="showPermissionsColumn">
<p class="tw-mb-0 tw-text-muted">
<p class="tw-mb-0 tw-text-muted" [title]="permissionTooltip">
{{ permissionText }}
</p>
</td>

View File

@ -6,6 +6,7 @@ import { CollectionView } from "@bitwarden/common/vault/models/view/collection.v
import { GroupView } from "../../../admin-console/organizations/core";
import { CollectionAdminView } from "../../core/views/collection-admin.view";
import { Unassigned } from "../../individual-vault/vault-filter/shared/models/routed-vault-filter.model";
import {
convertToPermission,
@ -52,8 +53,8 @@ export class VaultCollectionRowComponent {
}
get permissionText() {
if (!(this.collection as CollectionAdminView).assigned) {
return "-";
if (this.collection.id != Unassigned && !(this.collection as CollectionAdminView).assigned) {
return this.i18nService.t("noAccess");
} else {
const permissionList = getPermissionList(this.organization?.flexibleCollections);
return this.i18nService.t(
@ -62,6 +63,13 @@ export class VaultCollectionRowComponent {
}
}
get permissionTooltip() {
if (this.collection.id == Unassigned) {
return this.i18nService.t("collectionAdminConsoleManaged");
}
return "";
}
protected edit() {
this.onEvent.next({ type: "editCollection", item: this.collection });
}

View File

@ -7979,5 +7979,11 @@
},
"createdNewClient": {
"message": "Successfully created new client"
},
"noAccess": {
"message": "No access"
},
"collectionAdminConsoleManaged": {
"message": "This collection is only accessible from the admin console"
}
}