Skip to content

Commit 39fa0b6

Browse files
committed
fix(settings): align credential groups with organization rollout
1 parent 0d9e256 commit 39fa0b6

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

‎apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-sidebar/settings-sidebar.test.tsx‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,7 @@ describe('workspace SettingsSidebar organization rollout', () => {
240240
expect(links).toHaveLength(1)
241241
expect(links[0]).toHaveAttribute('href', '/o/host-org/settings/members')
242242
expect(links[0]).toHaveTextContent('Organization')
243-
if (role === 'admin')
244-
expect(workspaceLink('connected-accounts')).toHaveTextContent('Credential Groups')
245-
else expect(workspaceLink('connected-accounts')).toBeNull()
246-
for (const section of ['organization', 'billing', 'usage', 'sso']) {
243+
for (const section of ['organization', 'billing', 'usage', 'sso', 'connected-accounts']) {
247244
expect(workspaceLink(section)).toBeNull()
248245
}
249246
expectWorkspaceLinks()

‎apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-sidebar/settings-sidebar.tsx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,20 +152,20 @@ export function SettingsSidebar({
152152

153153
const navigationItems = useMemo(() => {
154154
return allNavigationItems.filter((item) => {
155-
if (item.id === 'connected-accounts') {
156-
return Boolean(
157-
hostContext.hostOrganizationId &&
158-
isOrgAdminOrOwner &&
159-
hostContext.features?.credentialGroups
160-
)
161-
}
162155
if (
163156
hostContext.hostOrganizationId &&
164157
ORGANIZATION_PLANE_UNIFIED_SECTIONS.has(item.id) &&
165158
(organizationSettingsId || !hostContext.viewer.isHostOrganizationMember)
166159
) {
167160
return false
168161
}
162+
if (item.id === 'connected-accounts') {
163+
return Boolean(
164+
hostContext.hostOrganizationId &&
165+
isOrgAdminOrOwner &&
166+
hostContext.features?.credentialGroups
167+
)
168+
}
169169
if (item.id === 'organization') {
170170
return Boolean(
171171
hostContext.hostOrganizationId && hostContext.viewer.isHostOrganizationMember

0 commit comments

Comments
 (0)