mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
@@ -83,11 +83,11 @@ export type Permission = {
|
||||
|
||||
export const getPermissionList = (): Permission[] => {
|
||||
const permissions = [
|
||||
{ perm: CollectionPermission.View, labelId: "canView" },
|
||||
{ perm: CollectionPermission.ViewExceptPass, labelId: "canViewExceptPass" },
|
||||
{ perm: CollectionPermission.Edit, labelId: "canEdit" },
|
||||
{ perm: CollectionPermission.EditExceptPass, labelId: "canEditExceptPass" },
|
||||
{ perm: CollectionPermission.Manage, labelId: "canManage" },
|
||||
{ perm: CollectionPermission.View, labelId: "viewItems" },
|
||||
{ perm: CollectionPermission.ViewExceptPass, labelId: "viewItemsHidePass" },
|
||||
{ perm: CollectionPermission.Edit, labelId: "editItems" },
|
||||
{ perm: CollectionPermission.EditExceptPass, labelId: "editItemsHidePass" },
|
||||
{ perm: CollectionPermission.Manage, labelId: "manageCollection" },
|
||||
];
|
||||
|
||||
return permissions;
|
||||
|
||||
@@ -52,11 +52,11 @@ export class VaultCipherRowComponent implements OnInit {
|
||||
protected CipherType = CipherType;
|
||||
private permissionList = getPermissionList();
|
||||
private permissionPriority = [
|
||||
"canManage",
|
||||
"canEdit",
|
||||
"canEditExceptPass",
|
||||
"canView",
|
||||
"canViewExceptPass",
|
||||
"manageCollection",
|
||||
"editItems",
|
||||
"editItemsHidePass",
|
||||
"viewItems",
|
||||
"viewItemsHidePass",
|
||||
];
|
||||
protected organization?: Organization;
|
||||
|
||||
@@ -118,7 +118,7 @@ export class VaultCipherRowComponent implements OnInit {
|
||||
|
||||
protected get permissionText() {
|
||||
if (!this.cipher.organizationId || this.cipher.collectionIds.length === 0) {
|
||||
return this.i18nService.t("canManage");
|
||||
return this.i18nService.t("manageCollection");
|
||||
}
|
||||
|
||||
const filteredCollections = this.collections.filter((collection) => {
|
||||
|
||||
@@ -74,7 +74,7 @@ export class VaultCollectionRowComponent {
|
||||
|
||||
get permissionText() {
|
||||
if (this.collection.id == Unassigned && this.organization?.canEditUnassignedCiphers) {
|
||||
return this.i18nService.t("canEdit");
|
||||
return this.i18nService.t("editItems");
|
||||
}
|
||||
if ((this.collection as CollectionAdminView).assigned) {
|
||||
const permissionList = getPermissionList();
|
||||
|
||||
@@ -2191,8 +2191,20 @@
|
||||
"manage": {
|
||||
"message": "Manage"
|
||||
},
|
||||
"canManage": {
|
||||
"message": "Can manage"
|
||||
"manageCollection": {
|
||||
"message": "Manage collection"
|
||||
},
|
||||
"viewItems": {
|
||||
"message": "View items"
|
||||
},
|
||||
"viewItemsHidePass": {
|
||||
"message": "View items, hidden passwords"
|
||||
},
|
||||
"editItems": {
|
||||
"message": "Edit items"
|
||||
},
|
||||
"editItemsHidePass": {
|
||||
"message": "Edit items, hidden passwords"
|
||||
},
|
||||
"disable": {
|
||||
"message": "Turn off"
|
||||
@@ -7687,18 +7699,6 @@
|
||||
"noCollection": {
|
||||
"message": "No collection"
|
||||
},
|
||||
"canView": {
|
||||
"message": "Can view"
|
||||
},
|
||||
"canViewExceptPass": {
|
||||
"message": "Can view, except passwords"
|
||||
},
|
||||
"canEdit": {
|
||||
"message": "Can edit"
|
||||
},
|
||||
"canEditExceptPass": {
|
||||
"message": "Can edit, except passwords"
|
||||
},
|
||||
"noCollectionsAdded": {
|
||||
"message": "No collections added"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user