1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-21 16:18:28 +01:00

[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> ></app-group-badge>
</td> </td>
<td bitCell [ngClass]="RowHeightClass" *ngIf="showPermissionsColumn"> <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 }} {{ permissionText }}
</p> </p>
</td> </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 { GroupView } from "../../../admin-console/organizations/core";
import { CollectionAdminView } from "../../core/views/collection-admin.view"; import { CollectionAdminView } from "../../core/views/collection-admin.view";
import { Unassigned } from "../../individual-vault/vault-filter/shared/models/routed-vault-filter.model";
import { import {
convertToPermission, convertToPermission,
@ -52,8 +53,8 @@ export class VaultCollectionRowComponent {
} }
get permissionText() { get permissionText() {
if (!(this.collection as CollectionAdminView).assigned) { if (this.collection.id != Unassigned && !(this.collection as CollectionAdminView).assigned) {
return "-"; return this.i18nService.t("noAccess");
} else { } else {
const permissionList = getPermissionList(this.organization?.flexibleCollections); const permissionList = getPermissionList(this.organization?.flexibleCollections);
return this.i18nService.t( 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() { protected edit() {
this.onEvent.next({ type: "editCollection", item: this.collection }); this.onEvent.next({ type: "editCollection", item: this.collection });
} }

View File

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