mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +00:00
[AC-2500] Collection row menus - adjust feature flagging (#9116)
This commit is contained in:
@@ -83,9 +83,7 @@
|
|||||||
{{ "access" | i18n }}
|
{{ "access" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container
|
<ng-container *ngIf="!canEditCollection && canViewCollectionInfo">
|
||||||
*ngIf="flexibleCollectionsV1Enabled && !canEditCollection && canViewCollectionInfo"
|
|
||||||
>
|
|
||||||
<button type="button" bitMenuItem (click)="edit(true)">
|
<button type="button" bitMenuItem (click)="edit(true)">
|
||||||
<i class="bwi bwi-fw bwi-pencil-square" aria-hidden="true"></i>
|
<i class="bwi bwi-fw bwi-pencil-square" aria-hidden="true"></i>
|
||||||
{{ "viewInfo" | i18n }}
|
{{ "viewInfo" | i18n }}
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export class VaultItemsComponent {
|
|||||||
|
|
||||||
protected canViewCollectionInfo(collection: CollectionView) {
|
protected canViewCollectionInfo(collection: CollectionView) {
|
||||||
const organization = this.allOrganizations.find((o) => o.id === collection.organizationId);
|
const organization = this.allOrganizations.find((o) => o.id === collection.organizationId);
|
||||||
return collection.canViewCollectionInfo(organization);
|
return collection.canViewCollectionInfo(organization, this.flexibleCollectionsV1Enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected toggleAll() {
|
protected toggleAll() {
|
||||||
|
|||||||
@@ -88,7 +88,14 @@ export class CollectionAdminView extends CollectionView {
|
|||||||
/**
|
/**
|
||||||
* Returns true if the user can view collection info and access in a read-only state from the Admin Console
|
* Returns true if the user can view collection info and access in a read-only state from the Admin Console
|
||||||
*/
|
*/
|
||||||
override canViewCollectionInfo(org: Organization | undefined): boolean {
|
override canViewCollectionInfo(
|
||||||
|
org: Organization | undefined,
|
||||||
|
flexibleCollectionsV1Enabled: boolean,
|
||||||
|
): boolean {
|
||||||
|
if (!flexibleCollectionsV1Enabled) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isUnassignedCollection) {
|
if (this.isUnassignedCollection) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,11 @@
|
|||||||
</bit-breadcrumbs>
|
</bit-breadcrumbs>
|
||||||
|
|
||||||
<ng-container slot="title-suffix">
|
<ng-container slot="title-suffix">
|
||||||
<ng-container *ngIf="collection != null && (canEditCollection || canDeleteCollection)">
|
<ng-container
|
||||||
|
*ngIf="
|
||||||
|
collection != null && (canEditCollection || canDeleteCollection || canViewCollectionInfo)
|
||||||
|
"
|
||||||
|
>
|
||||||
<button
|
<button
|
||||||
bitIconButton="bwi-angle-down"
|
bitIconButton="bwi-angle-down"
|
||||||
[bitMenuTriggerFor]="editCollectionMenu"
|
[bitMenuTriggerFor]="editCollectionMenu"
|
||||||
@@ -55,9 +59,7 @@
|
|||||||
{{ "access" | i18n }}
|
{{ "access" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container
|
<ng-container *ngIf="!canEditCollection && canViewCollectionInfo">
|
||||||
*ngIf="flexibleCollectionsV1Enabled && !canEditCollection && canViewCollectionInfo"
|
|
||||||
>
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
bitMenuItem
|
bitMenuItem
|
||||||
|
|||||||
@@ -211,7 +211,10 @@ export class VaultHeaderComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get canViewCollectionInfo(): boolean {
|
get canViewCollectionInfo(): boolean {
|
||||||
return this.collection.node.canViewCollectionInfo(this.organization);
|
return this.collection.node.canViewCollectionInfo(
|
||||||
|
this.organization,
|
||||||
|
this.flexibleCollectionsV1Enabled,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
get canCreateCollection(): boolean {
|
get canCreateCollection(): boolean {
|
||||||
|
|||||||
@@ -92,7 +92,10 @@ export class CollectionView implements View, ITreeNodeObject {
|
|||||||
/**
|
/**
|
||||||
* Returns true if the user can view collection info and access in a read-only state from the individual vault
|
* Returns true if the user can view collection info and access in a read-only state from the individual vault
|
||||||
*/
|
*/
|
||||||
canViewCollectionInfo(org: Organization | undefined): boolean {
|
canViewCollectionInfo(
|
||||||
|
org: Organization | undefined,
|
||||||
|
flexibleCollectionsV1Enabled: boolean,
|
||||||
|
): boolean {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user