Skip to content

Commit af6a89e

Browse files
Add Group Attribute Name field to IdP view (#2520)
* Add Group Attribute Name field to IdP view * Use text-balance to even out ragged field descriptions * add 'required' so we hide the 'optional' text * Update help copy; undo text-balance * add group attribute name to the mock IdP and test it --------- Co-authored-by: David Crespo <[email protected]>
1 parent 4e96756 commit af6a89e

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

app/forms/idp/create.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export function CreateIdpSideModalForm() {
133133
<TextField
134134
name="groupAttributeName"
135135
label="Group attribute name"
136-
description="Name of SAML attribute where we can find a comma-separated list of names of groups the user belongs to"
136+
description="Name of the SAML attribute in the IdP response listing the user’s groups"
137137
control={form.control}
138138
/>
139139
{/* TODO: Email field, probably */}

app/forms/idp/edit.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ export function EditIdpSideModalForm() {
104104
control={form.control}
105105
disabled
106106
/>
107-
{/* TODO: add group attribute name when it is added to the API
108-
<TextField
109-
name="groupAttributeName"
110-
label="Group attribute name"
111-
description="Name of SAML attribute where we can find a comma-separated list of names of groups the user belongs to"
112-
control={form.control}
113-
disabled
114-
/> */}
107+
<TextField
108+
name="groupAttributeName"
109+
label="Group attribute name"
110+
description="Name of the SAML attribute in the IdP response listing the user’s groups"
111+
required
112+
control={form.control}
113+
disabled
114+
/>
115115
{/* TODO: Email field, probably */}
116116
<TextField
117117
name="technicalContactEmail"

mock-api/silo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export const samlIdp: Json<SamlIdentityProvider> = {
8585
slo_url: '',
8686
sp_client_id: '',
8787
technical_contact_email: '',
88+
group_attribute_name: 'groups',
8889
}
8990

9091
// This works differently from Nexus, but the result is the same. In Nexus,

test/e2e/silos.e2e.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ test('Identity providers', async ({ page }) => {
186186
'text="Single Logout (SLO) URL"',
187187
])
188188

189+
await expect(page.getByRole('textbox', { name: 'Group attribute name' })).toHaveValue(
190+
'groups'
191+
)
192+
189193
await page.getByRole('button', { name: 'Cancel' }).click()
190194
await expectNotVisible(page, ['role=dialog[name="Identity provider"]'])
191195
})

0 commit comments

Comments
 (0)