mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-26 17:08:33 +01:00
[PM-6584] [PM-6632] [Defects] Vertical Vault Refresh Product Switcher (#8198)
* removed org enabled check from acOrg logic * fixed bug where organization doesn't show on admin console for users admin custom permissions
This commit is contained in:
parent
9d4129e8c9
commit
e6a569b153
@ -8,6 +8,7 @@ import {
|
|||||||
canAccessBillingTab,
|
canAccessBillingTab,
|
||||||
canAccessGroupsTab,
|
canAccessGroupsTab,
|
||||||
canAccessMembersTab,
|
canAccessMembersTab,
|
||||||
|
canAccessOrgAdmin,
|
||||||
canAccessReportingTab,
|
canAccessReportingTab,
|
||||||
canAccessSettingsTab,
|
canAccessSettingsTab,
|
||||||
canAccessVaultTab,
|
canAccessVaultTab,
|
||||||
@ -43,7 +44,7 @@ import { AdminConsoleLogo } from "../../icons/admin-console-logo";
|
|||||||
export class OrganizationLayoutComponent implements OnInit, OnDestroy {
|
export class OrganizationLayoutComponent implements OnInit, OnDestroy {
|
||||||
protected readonly logo = AdminConsoleLogo;
|
protected readonly logo = AdminConsoleLogo;
|
||||||
|
|
||||||
protected orgFilter = (org: Organization) => org.isAdmin;
|
protected orgFilter = (org: Organization) => canAccessOrgAdmin(org);
|
||||||
|
|
||||||
organization$: Observable<Organization>;
|
organization$: Observable<Organization>;
|
||||||
showPaymentAndHistory$: Observable<boolean>;
|
showPaymentAndHistory$: Observable<boolean>;
|
||||||
|
@ -58,9 +58,9 @@ export class ProductSwitcherContentComponent {
|
|||||||
|
|
||||||
// If the active route org doesn't have access to AC, find the first org that does.
|
// If the active route org doesn't have access to AC, find the first org that does.
|
||||||
const acOrg =
|
const acOrg =
|
||||||
routeOrg != null && canAccessOrgAdmin(routeOrg) && routeOrg.enabled
|
routeOrg != null && canAccessOrgAdmin(routeOrg)
|
||||||
? routeOrg
|
? routeOrg
|
||||||
: orgs.find((o) => canAccessOrgAdmin(o) && o.enabled);
|
: orgs.find((o) => canAccessOrgAdmin(o));
|
||||||
|
|
||||||
// TODO: This should be migrated to an Observable provided by the provider service and moved to the combineLatest above. See AC-2092.
|
// TODO: This should be migrated to an Observable provided by the provider service and moved to the combineLatest above. See AC-2092.
|
||||||
const providers = await this.providerService.getAll();
|
const providers = await this.providerService.getAll();
|
||||||
|
Loading…
Reference in New Issue
Block a user