[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:
SmithThe4th 2024-03-05 09:38:38 -05:00 committed by GitHub
parent 9d4129e8c9
commit e6a569b153
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -8,6 +8,7 @@ import {
canAccessBillingTab,
canAccessGroupsTab,
canAccessMembersTab,
canAccessOrgAdmin,
canAccessReportingTab,
canAccessSettingsTab,
canAccessVaultTab,
@ -43,7 +44,7 @@ import { AdminConsoleLogo } from "../../icons/admin-console-logo";
export class OrganizationLayoutComponent implements OnInit, OnDestroy {
protected readonly logo = AdminConsoleLogo;
protected orgFilter = (org: Organization) => org.isAdmin;
protected orgFilter = (org: Organization) => canAccessOrgAdmin(org);
organization$: Observable<Organization>;
showPaymentAndHistory$: Observable<boolean>;

View File

@ -58,9 +58,9 @@ export class ProductSwitcherContentComponent {
// If the active route org doesn't have access to AC, find the first org that does.
const acOrg =
routeOrg != null && canAccessOrgAdmin(routeOrg) && routeOrg.enabled
routeOrg != null && canAccessOrgAdmin(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.
const providers = await this.providerService.getAll();