Add locked status to users (#413)

This commit is contained in:
Dirk Klimpel 2024-05-07 13:14:15 +02:00 committed by GitHub
parent fac09cb9bb
commit b5ca951b32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 8 additions and 1 deletions

View file

@ -13,7 +13,7 @@ This project is built using [react-admin](https://marmelab.com/react-admin/).
### Supported Synapse ### Supported Synapse
It needs at least [Synapse](https://github.com/element-hq/synapse) v1.71.0 for all functions to work as expected! It needs at least [Synapse](https://github.com/element-hq/synapse) v1.93.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://element-hq.github.io/synapse/latest/admin_api/version_api.html). See also [Synapse version API](https://element-hq.github.io/synapse/latest/admin_api/version_api.html).

View file

@ -119,6 +119,7 @@ export const UserList = (props: ListProps) => (
<BooleanField source="is_guest" /> <BooleanField source="is_guest" />
<BooleanField source="admin" /> <BooleanField source="admin" />
<BooleanField source="deactivated" /> <BooleanField source="deactivated" />
<BooleanField source="locked" />
<BooleanField source="erased" sortable={false} /> <BooleanField source="erased" sortable={false} />
<DateField source="creation_ts" label="resources.users.fields.creation_ts_ms" showTime options={DATE_FORMAT} /> <DateField source="creation_ts" label="resources.users.fields.creation_ts_ms" showTime options={DATE_FORMAT} />
</Datagrid> </Datagrid>
@ -200,6 +201,7 @@ export const UserEdit = (props: EditProps) => {
<PasswordInput source="password" autoComplete="new-password" helperText="resources.users.helper.password" /> <PasswordInput source="password" autoComplete="new-password" helperText="resources.users.helper.password" />
<SelectInput source="user_type" choices={choices_type} translateChoice={false} resettable /> <SelectInput source="user_type" choices={choices_type} translateChoice={false} resettable />
<BooleanInput source="admin" /> <BooleanInput source="admin" />
<BooleanInput source="locked" />
<BooleanInput source="deactivated" helperText="resources.users.helper.deactivate" /> <BooleanInput source="deactivated" helperText="resources.users.helper.deactivate" />
<BooleanInput source="erased" disabled /> <BooleanInput source="erased" disabled />
<DateField source="creation_ts_ms" showTime options={DATE_FORMAT} /> <DateField source="creation_ts_ms" showTime options={DATE_FORMAT} />

View file

@ -104,6 +104,7 @@ const de: SynapseTranslationMessages = {
name: "Name", name: "Name",
is_guest: "Gast", is_guest: "Gast",
admin: "Server Administrator", admin: "Server Administrator",
locked: "Gesperrt",
deactivated: "Deaktiviert", deactivated: "Deaktiviert",
erased: "Gelöscht", erased: "Gelöscht",
guests: "Zeige Gäste", guests: "Zeige Gäste",

View file

@ -103,6 +103,7 @@ const en: SynapseTranslationMessages = {
name: "Name", name: "Name",
is_guest: "Guest", is_guest: "Guest",
admin: "Server Administrator", admin: "Server Administrator",
locked: "Locked",
deactivated: "Deactivated", deactivated: "Deactivated",
erased: "Erased", erased: "Erased",
guests: "Show guests", guests: "Show guests",

View file

@ -104,6 +104,7 @@ const fr: SynapseTranslationMessages = {
name: "Nom", name: "Nom",
is_guest: "Visiteur", is_guest: "Visiteur",
admin: "Administrateur du serveur", admin: "Administrateur du serveur",
locked: "Verrouillé",
deactivated: "Désactivé", deactivated: "Désactivé",
guests: "Afficher les visiteurs", guests: "Afficher les visiteurs",
show_deactivated: "Afficher les utilisateurs désactivés", show_deactivated: "Afficher les utilisateurs désactivés",

1
src/i18n/index.d.ts vendored
View file

@ -99,6 +99,7 @@ interface SynapseTranslationMessages extends TranslationMessages {
name: string; name: string;
is_guest: string; is_guest: string;
admin: string; admin: string;
locked?: string; // TODO: fa, zh
deactivated: string; deactivated: string;
erased?: string; // TODO: fa, fr, it, zh erased?: string; // TODO: fa, fr, it, zh
guests: string; guests: string;

View file

@ -101,6 +101,7 @@ const it: SynapseTranslationMessages = {
name: "Nome", name: "Nome",
is_guest: "Ospite", is_guest: "Ospite",
admin: "Amministratore", admin: "Amministratore",
locked: "Bloccato",
deactivated: "Disattivato", deactivated: "Disattivato",
guests: "Mostra gli ospiti", guests: "Mostra gli ospiti",
show_deactivated: "Mostra gli utenti disattivati", show_deactivated: "Mostra gli utenti disattivati",