1
0
Fork 0
mirror of https://github.com/etkecc/synapse-admin.git synced 2025-05-05 18:42:54 +03:00

Enable modify user external_ids ()

* Enable modify user `external_ids`

* add input validation
This commit is contained in:
Dirk Klimpel 2021-11-15 20:40:05 +01:00 committed by GitHub
parent 0ff4b30d71
commit 79ef38ee6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 8 deletions
src/components

View file

@ -37,6 +37,7 @@ import {
DeleteButton,
SaveButton,
regex,
required,
useTranslate,
Pagination,
CreateButton,
@ -262,6 +263,16 @@ export const UserCreate = props => (
<TextInput source="address" />
</SimpleFormIterator>
</ArrayInput>
<ArrayInput source="external_ids" label="synapseadmin.users.tabs.sso">
<SimpleFormIterator>
<TextInput source="auth_provider" validate={required()} />
<TextInput
source="external_id"
label="resources.users.fields.id"
validate={required()}
/>
</SimpleFormIterator>
</ArrayInput>
</SimpleForm>
</Create>
);
@ -339,16 +350,16 @@ export const UserEdit = props => {
icon={<AssignmentIndIcon />}
path="sso"
>
<ArrayField source="external_ids" label={false}>
<Datagrid style={{ width: "100%" }}>
<TextField source="auth_provider" sortable={false} />
<TextField
<ArrayInput source="external_ids" label={false}>
<SimpleFormIterator>
<TextInput source="auth_provider" validate={required()} />
<TextInput
source="external_id"
label="resources.users.fields.id"
sortable={false}
validate={required()}
/>
</Datagrid>
</ArrayField>
</SimpleFormIterator>
</ArrayInput>
</FormTab>
<FormTab