2 Commits

Author SHA1 Message Date
Michael Albert
931fafc21d Allow to set user_type 'limited'
Change-Id: Ic3942a2150b9dfe57c106eb595b49b774fe8a30c
2020-10-20 18:56:04 +02:00
Michael Albert
c604b47adc Allow to set a usertype
Change-Id: Ibfaa383b95dc5acc3b4dcd61f3f506f7c81f7dea
2020-10-20 13:57:23 +02:00
3 changed files with 37 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ import {
SearchInput,
ReferenceField,
ReferenceManyField,
SelectField,
SelectInput,
BulkDeleteButton,
DeleteButton,
@@ -149,6 +150,14 @@ export const UserList = props => {
<TextField source="displayname" />
<BooleanField source="is_guest" sortable={false} />
<BooleanField source="admin" sortable={false} />
<SelectField
source="user_type"
choices={[
{ id: null, name: "resources.users.type.default" },
{ id: "free", name: "resources.users.type.free" },
{ id: "limited", name: "resources.users.type.limited" },
]}
/>
<BooleanField source="deactivated" sortable={false} />
</Datagrid>
</List>
@@ -261,6 +270,14 @@ export const UserCreate = props => (
<TextInput source="displayname" />
<PasswordInput source="password" autoComplete="new-password" />
<BooleanInput source="admin" />
<SelectInput
source="user_type"
choices={[
{ id: null, name: "resources.users.type.default" },
{ id: "free", name: "resources.users.type.free" },
{ id: "limited", name: "resources.users.type.limited" },
]}
/>
<ArrayInput source="threepids">
<SimpleFormIterator>
<SelectInput
@@ -307,6 +324,15 @@ export const UserEdit = props => {
<TextInput source="id" disabled />
<TextInput source="displayname" />
<PasswordInput source="password" autoComplete="new-password" />
<SelectInput
source="user_type"
choices={[
{ id: null, name: "resources.users.type.default" },
{ id: "free", name: "resources.users.type.free" },
{ id: "limited", name: "resources.users.type.limited" },
]}
emptyText="resources.users.type.default"
/>
<BooleanInput source="admin" />
<BooleanInput
source="deactivated"

View File

@@ -64,12 +64,18 @@ export default {
address: "Adresse",
creation_ts_ms: "Zeitpunkt der Erstellung",
consent_version: "Zugestimmte Geschäftsbedingungen",
user_type: "Kontotyp",
// Devices:
device_id: "Geräte-ID",
display_name: "Gerätename",
last_seen_ts: "Zeitstempel",
last_seen_ip: "IP-Adresse",
},
type: {
default: "Standard",
free: "Basic",
limited: "Eingeschränkt",
},
helper: {
deactivate: "Deaktivierte Nutzer können nicht wieder aktiviert werden.",
erase: "DSGVO konformes Löschen der Benutzerdaten",

View File

@@ -70,6 +70,11 @@ export default {
last_seen_ts: "Timestamp",
last_seen_ip: "IP address",
},
type: {
default: "Standard",
free: "Basic",
limited: "Limited",
},
helper: {
deactivate: "Deactivated users cannot be reactivated",
erase: "Mark the user as GDPR-erased",