Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,7 @@ describe('workspace SettingsSidebar organization rollout', () => {
expect(links).toHaveLength(1)
expect(links[0]).toHaveAttribute('href', '/o/host-org/settings/members')
expect(links[0]).toHaveTextContent('Organization')
if (role === 'admin')
expect(workspaceLink('connected-accounts')).toHaveTextContent('Credential Groups')
else expect(workspaceLink('connected-accounts')).toBeNull()
for (const section of ['organization', 'billing', 'usage', 'sso']) {
for (const section of ['organization', 'billing', 'usage', 'sso', 'connected-accounts']) {
expect(workspaceLink(section)).toBeNull()
}
expectWorkspaceLinks()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,20 @@ export function SettingsSidebar({

const navigationItems = useMemo(() => {
return allNavigationItems.filter((item) => {
if (item.id === 'connected-accounts') {
return Boolean(
hostContext.hostOrganizationId &&
isOrgAdminOrOwner &&
hostContext.features?.credentialGroups
)
}
if (
hostContext.hostOrganizationId &&
ORGANIZATION_PLANE_UNIFIED_SECTIONS.has(item.id) &&
(organizationSettingsId || !hostContext.viewer.isHostOrganizationMember)
) {
return false
}
if (item.id === 'connected-accounts') {
return Boolean(
hostContext.hostOrganizationId &&
isOrgAdminOrOwner &&
hostContext.features?.credentialGroups
)
}
if (item.id === 'organization') {
return Boolean(
hostContext.hostOrganizationId && hostContext.viewer.isHostOrganizationMember
Expand Down
Loading