Skip to content

Commit

Permalink
Add locked status to users (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimpel authored May 7, 2024
1 parent fac09cb commit b5ca951
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This project is built using [react-admin](https://marmelab.com/react-admin/).

### 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`.
See also [Synapse version API](https://element-hq.github.io/synapse/latest/admin_api/version_api.html).
Expand Down
2 changes: 2 additions & 0 deletions src/components/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export const UserList = (props: ListProps) => (
<BooleanField source="is_guest" />
<BooleanField source="admin" />
<BooleanField source="deactivated" />
<BooleanField source="locked" />
<BooleanField source="erased" sortable={false} />
<DateField source="creation_ts" label="resources.users.fields.creation_ts_ms" showTime options={DATE_FORMAT} />
</Datagrid>
Expand Down Expand Up @@ -200,6 +201,7 @@ export const UserEdit = (props: EditProps) => {
<PasswordInput source="password" autoComplete="new-password" helperText="resources.users.helper.password" />
<SelectInput source="user_type" choices={choices_type} translateChoice={false} resettable />
<BooleanInput source="admin" />
<BooleanInput source="locked" />
<BooleanInput source="deactivated" helperText="resources.users.helper.deactivate" />
<BooleanInput source="erased" disabled />
<DateField source="creation_ts_ms" showTime options={DATE_FORMAT} />
Expand Down
1 change: 1 addition & 0 deletions src/i18n/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const de: SynapseTranslationMessages = {
name: "Name",
is_guest: "Gast",
admin: "Server Administrator",
locked: "Gesperrt",
deactivated: "Deaktiviert",
erased: "Gelöscht",
guests: "Zeige Gäste",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ const en: SynapseTranslationMessages = {
name: "Name",
is_guest: "Guest",
admin: "Server Administrator",
locked: "Locked",
deactivated: "Deactivated",
erased: "Erased",
guests: "Show guests",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const fr: SynapseTranslationMessages = {
name: "Nom",
is_guest: "Visiteur",
admin: "Administrateur du serveur",
locked: "Verrouillé",
deactivated: "Désactivé",
guests: "Afficher les visiteurs",
show_deactivated: "Afficher les utilisateurs désactivés",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ interface SynapseTranslationMessages extends TranslationMessages {
name: string;
is_guest: string;
admin: string;
locked?: string; // TODO: fa, zh
deactivated: string;
erased?: string; // TODO: fa, fr, it, zh
guests: string;
Expand Down
1 change: 1 addition & 0 deletions src/i18n/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const it: SynapseTranslationMessages = {
name: "Nome",
is_guest: "Ospite",
admin: "Amministratore",
locked: "Bloccato",
deactivated: "Disattivato",
guests: "Mostra gli ospiti",
show_deactivated: "Mostra gli utenti disattivati",
Expand Down

0 comments on commit b5ca951

Please sign in to comment.