[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:
parent
4ae208fabc
commit
a141d06c00
|
@ -56,14 +56,16 @@ export class VaultCollectionRowComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
get permissionText() {
|
get permissionText() {
|
||||||
if (this.collection.id != Unassigned && !(this.collection as CollectionAdminView).assigned) {
|
if (this.collection.id == Unassigned && this.organization?.canEditUnassignedCiphers()) {
|
||||||
return this.i18nService.t("noAccess");
|
return this.i18nService.t("canEdit");
|
||||||
} else {
|
}
|
||||||
|
if ((this.collection as CollectionAdminView).assigned) {
|
||||||
const permissionList = getPermissionList(this.organization?.flexibleCollections);
|
const permissionList = getPermissionList(this.organization?.flexibleCollections);
|
||||||
return this.i18nService.t(
|
return this.i18nService.t(
|
||||||
permissionList.find((p) => p.perm === convertToPermission(this.collection))?.labelId,
|
permissionList.find((p) => p.perm === convertToPermission(this.collection))?.labelId,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
return this.i18nService.t("noAccess");
|
||||||
}
|
}
|
||||||
|
|
||||||
get permissionTooltip() {
|
get permissionTooltip() {
|
||||||
|
|
Loading…
Reference in New Issue