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