Enable modify user `external_ids` (#179)
* Enable modify user `external_ids` * add input validation
This commit is contained in:
parent
0ff4b30d71
commit
79ef38ee6b
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
This project is built using [react-admin](https://marmelab.com/react-admin/).
|
This project is built using [react-admin](https://marmelab.com/react-admin/).
|
||||||
|
|
||||||
It needs at least Synapse v1.38.0 for all functions to work as expected!
|
It needs at least Synapse v1.41.0 for all functions to work as expected!
|
||||||
|
|
||||||
You get your server version with the request `/_synapse/admin/v1/server_version`.
|
You get your server version with the request `/_synapse/admin/v1/server_version`.
|
||||||
See also [Synapse version API](https://matrix-org.github.io/synapse/develop/admin_api/version_api.html).
|
See also [Synapse version API](https://matrix-org.github.io/synapse/develop/admin_api/version_api.html).
|
||||||
|
|
|
@ -37,6 +37,7 @@ import {
|
||||||
DeleteButton,
|
DeleteButton,
|
||||||
SaveButton,
|
SaveButton,
|
||||||
regex,
|
regex,
|
||||||
|
required,
|
||||||
useTranslate,
|
useTranslate,
|
||||||
Pagination,
|
Pagination,
|
||||||
CreateButton,
|
CreateButton,
|
||||||
|
@ -262,6 +263,16 @@ export const UserCreate = props => (
|
||||||
<TextInput source="address" />
|
<TextInput source="address" />
|
||||||
</SimpleFormIterator>
|
</SimpleFormIterator>
|
||||||
</ArrayInput>
|
</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>
|
</SimpleForm>
|
||||||
</Create>
|
</Create>
|
||||||
);
|
);
|
||||||
|
@ -339,16 +350,16 @@ export const UserEdit = props => {
|
||||||
icon={<AssignmentIndIcon />}
|
icon={<AssignmentIndIcon />}
|
||||||
path="sso"
|
path="sso"
|
||||||
>
|
>
|
||||||
<ArrayField source="external_ids" label={false}>
|
<ArrayInput source="external_ids" label={false}>
|
||||||
<Datagrid style={{ width: "100%" }}>
|
<SimpleFormIterator>
|
||||||
<TextField source="auth_provider" sortable={false} />
|
<TextInput source="auth_provider" validate={required()} />
|
||||||
<TextField
|
<TextInput
|
||||||
source="external_id"
|
source="external_id"
|
||||||
label="resources.users.fields.id"
|
label="resources.users.fields.id"
|
||||||
sortable={false}
|
validate={required()}
|
||||||
/>
|
/>
|
||||||
</Datagrid>
|
</SimpleFormIterator>
|
||||||
</ArrayField>
|
</ArrayInput>
|
||||||
</FormTab>
|
</FormTab>
|
||||||
|
|
||||||
<FormTab
|
<FormTab
|
||||||
|
|
Loading…
Reference in New Issue