mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-21 11:35:34 +01:00
[AC-2500] Collection row menus - adjust feature flagging (#9116)
This commit is contained in:
parent
8e4073f1ca
commit
8c5841a76a
@ -83,9 +83,7 @@
|
||||
{{ "access" | i18n }}
|
||||
</button>
|
||||
</ng-container>
|
||||
<ng-container
|
||||
*ngIf="flexibleCollectionsV1Enabled && !canEditCollection && canViewCollectionInfo"
|
||||
>
|
||||
<ng-container *ngIf="!canEditCollection && canViewCollectionInfo">
|
||||
<button type="button" bitMenuItem (click)="edit(true)">
|
||||
<i class="bwi bwi-fw bwi-pencil-square" aria-hidden="true"></i>
|
||||
{{ "viewInfo" | i18n }}
|
||||
|
@ -168,7 +168,7 @@ export class VaultItemsComponent {
|
||||
|
||||
protected canViewCollectionInfo(collection: CollectionView) {
|
||||
const organization = this.allOrganizations.find((o) => o.id === collection.organizationId);
|
||||
return collection.canViewCollectionInfo(organization);
|
||||
return collection.canViewCollectionInfo(organization, this.flexibleCollectionsV1Enabled);
|
||||
}
|
||||
|
||||
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
|
||||
*/
|
||||
override canViewCollectionInfo(org: Organization | undefined): boolean {
|
||||
override canViewCollectionInfo(
|
||||
org: Organization | undefined,
|
||||
flexibleCollectionsV1Enabled: boolean,
|
||||
): boolean {
|
||||
if (!flexibleCollectionsV1Enabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.isUnassignedCollection) {
|
||||
return false;
|
||||
}
|
||||
|
@ -28,7 +28,11 @@
|
||||
</bit-breadcrumbs>
|
||||
|
||||
<ng-container slot="title-suffix">
|
||||
<ng-container *ngIf="collection != null && (canEditCollection || canDeleteCollection)">
|
||||
<ng-container
|
||||
*ngIf="
|
||||
collection != null && (canEditCollection || canDeleteCollection || canViewCollectionInfo)
|
||||
"
|
||||
>
|
||||
<button
|
||||
bitIconButton="bwi-angle-down"
|
||||
[bitMenuTriggerFor]="editCollectionMenu"
|
||||
@ -55,9 +59,7 @@
|
||||
{{ "access" | i18n }}
|
||||
</button>
|
||||
</ng-container>
|
||||
<ng-container
|
||||
*ngIf="flexibleCollectionsV1Enabled && !canEditCollection && canViewCollectionInfo"
|
||||
>
|
||||
<ng-container *ngIf="!canEditCollection && canViewCollectionInfo">
|
||||
<button
|
||||
type="button"
|
||||
bitMenuItem
|
||||
|
@ -211,7 +211,10 @@ export class VaultHeaderComponent implements OnInit {
|
||||
}
|
||||
|
||||
get canViewCollectionInfo(): boolean {
|
||||
return this.collection.node.canViewCollectionInfo(this.organization);
|
||||
return this.collection.node.canViewCollectionInfo(
|
||||
this.organization,
|
||||
this.flexibleCollectionsV1Enabled,
|
||||
);
|
||||
}
|
||||
|
||||
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
|
||||
*/
|
||||
canViewCollectionInfo(org: Organization | undefined): boolean {
|
||||
canViewCollectionInfo(
|
||||
org: Organization | undefined,
|
||||
flexibleCollectionsV1Enabled: boolean,
|
||||
): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user