Skip to content

feat: create idp sync page skeleton #14543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Sep 6, 2024
Merged
Prev Previous commit
Next Next commit
fix: updates for PR review comments
  • Loading branch information
jaaydenh committed Sep 5, 2024
commit 3d1fcdb445db70f8655083a542a529e063733972
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@ export const IdpSyncPageView: FC<IdpSyncPageViewProps> = ({ oidcConfig }) => {
<h4>Sync Field</h4>
<p css={styles.secondary}>
{groups_field || (
<Stack
style={{ color: theme.palette.text.secondary }}
direction="row"
spacing={1}
alignItems="center"
<div
css={{
display: "flex",
alignItems: "center",
gap: "8px",
height: 0,
}}
>
<StatusIndicator color="error" />
<p>disabled</p>
</Stack>
</div>
)}
</p>
<h4>Regex Filter</h4>
Expand All @@ -77,15 +79,17 @@ export const IdpSyncPageView: FC<IdpSyncPageViewProps> = ({ oidcConfig }) => {
<h4>Sync Field</h4>
<p css={styles.secondary}>
{user_role_field || (
<Stack
style={{ color: theme.palette.text.secondary }}
direction="row"
spacing={1}
alignItems="center"
<div
css={{
display: "flex",
alignItems: "center",
gap: "8px",
height: 0,
}}
>
<StatusIndicator color="error" />
<p>disabled</p>
</Stack>
</div>
)}
</p>
</Stack>
Expand All @@ -96,45 +100,40 @@ export const IdpSyncPageView: FC<IdpSyncPageViewProps> = ({ oidcConfig }) => {
type="Role"
isEmpty={Boolean(
!oidcConfig?.user_role_mapping ||
(oidcConfig?.user_role_mapping &&
Object.entries(oidcConfig?.user_role_mapping).length ===
0) ||
false,
Object.entries(oidcConfig?.user_role_mapping).length === 0,
)}
>
<>
{oidcConfig?.user_role_mapping &&
Object.entries(oidcConfig.user_role_mapping).map(
([idpRole, roles]) => (
Object.entries(oidcConfig.user_role_mapping)
.sort()
.map(([idpRole, roles]) => (
<RoleRow
key={idpRole}
idpRole={idpRole}
coderRoles={roles}
/>
),
)}
))}
</>
</IdpMappingTable>
<IdpMappingTable
type="Group"
isEmpty={Boolean(
!oidcConfig?.group_mapping ||
(oidcConfig?.group_mapping &&
Object.entries(oidcConfig?.group_mapping).length === 0) ||
false,
Object.entries(oidcConfig?.group_mapping).length === 0,
)}
>
<>
{oidcConfig?.user_role_mapping &&
Object.entries(oidcConfig.group_mapping).map(
([idpGroup, group]) => (
Object.entries(oidcConfig.group_mapping)
.sort()
.map(([idpGroup, group]) => (
<GroupRow
key={idpGroup}
idpGroup={idpGroup}
coderGroup={group}
/>
),
)}
))}
</>
</IdpMappingTable>
</Stack>
Expand Down