1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-06 19:53:59 +00:00

Use organizations$ observable instead of class member (#15377)

This commit is contained in:
Thomas Rittson
2025-07-01 02:18:56 +10:00
committed by Vincent Salucci
parent 0772e5c316
commit a3a1d937da

View File

@@ -248,10 +248,13 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
const separateCustomRolePermissionsEnabled$ = this.configService.getFeatureFlag$(
FeatureFlag.SeparateCustomRolePermissions,
);
this.showUserManagementControls$ = separateCustomRolePermissionsEnabled$.pipe(
this.showUserManagementControls$ = combineLatest([
separateCustomRolePermissionsEnabled$,
organization$,
]).pipe(
map(
(separateCustomRolePermissionsEnabled) =>
!separateCustomRolePermissionsEnabled || this.organization.canManageUsers,
([separateCustomRolePermissionsEnabled, organization]) =>
!separateCustomRolePermissionsEnabled || organization.canManageUsers,
),
);
}