1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +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$( const separateCustomRolePermissionsEnabled$ = this.configService.getFeatureFlag$(
FeatureFlag.SeparateCustomRolePermissions, FeatureFlag.SeparateCustomRolePermissions,
); );
this.showUserManagementControls$ = separateCustomRolePermissionsEnabled$.pipe( this.showUserManagementControls$ = combineLatest([
separateCustomRolePermissionsEnabled$,
organization$,
]).pipe(
map( map(
(separateCustomRolePermissionsEnabled) => ([separateCustomRolePermissionsEnabled, organization]) =>
!separateCustomRolePermissionsEnabled || this.organization.canManageUsers, !separateCustomRolePermissionsEnabled || organization.canManageUsers,
), ),
); );
} }