[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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

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() {