1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +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 GitHub
parent 4bfcc9d076
commit 80116c7e54

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,
),
);
}