1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 22:33:35 +00:00

[AC-2484] Fix bug where Custom Users with "Delete any collection" permission incorrectly see "Can Edit" permission for Unassigned Collection (#8858)

* [AC-2484] Fix bug where Custom Users with "Delete any collection" permission incorrectly see "Can Edit" permission for Unassigned Collection

* [AC-2484] Undo change on permission tooltip permission check

* [AC-2484] Fix permission text for unassigned collection
This commit is contained in:
Rui Tomé
2024-05-11 14:54:12 +01:00
committed by GitHub
parent 4ae208fabc
commit a141d06c00

View File

@@ -56,14 +56,16 @@ export class VaultCollectionRowComponent {
}
get permissionText() {
if (this.collection.id != Unassigned && !(this.collection as CollectionAdminView).assigned) {
return this.i18nService.t("noAccess");
} else {
if (this.collection.id == Unassigned && this.organization?.canEditUnassignedCiphers()) {
return this.i18nService.t("canEdit");
}
if ((this.collection as CollectionAdminView).assigned) {
const permissionList = getPermissionList(this.organization?.flexibleCollections);
return this.i18nService.t(
permissionList.find((p) => p.perm === convertToPermission(this.collection))?.labelId,
);
}
return this.i18nService.t("noAccess");
}
get permissionTooltip() {