Added gender field for users.
This commit is contained in:
parent
57202e74ca
commit
168561bc55
@ -36,6 +36,7 @@ Motions:
|
||||
User:
|
||||
- Added new admin group which grants all permissions. Users of existing group
|
||||
'Admin' or 'Staff' are move to the new group during migration [#3859].
|
||||
- Added gender field [#4124].
|
||||
|
||||
|
||||
Version 2.3 (2018-09-20)
|
||||
|
@ -33,7 +33,8 @@ class UserAccessPermissions(BaseAccessPermissions):
|
||||
# * full data i. e. all fields (including session_auth_hash),
|
||||
# * all data i. e. all fields but not session_auth_hash,
|
||||
# * many data i. e. all fields but not the default password and session_auth_hash,
|
||||
# * little data i. e. all fields but not the default password, session_auth_hash, comments and active status,
|
||||
# * little data i. e. all fields but not the default password, session_auth_hash,
|
||||
# comments, gender, email, last_email_send and active status,
|
||||
# * no data.
|
||||
|
||||
# Prepare field set for users with "all" data, "many" data and with "little" data.
|
||||
|
16
openslides/users/migrations/0008_user_gender.py
Normal file
16
openslides/users/migrations/0008_user_gender.py
Normal file
@ -0,0 +1,16 @@
|
||||
# Generated by Django 2.1.5 on 2019-01-18 16:55
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [("users", "0007_superadmin")]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="user",
|
||||
name="gender",
|
||||
field=models.CharField(blank=True, max_length=255),
|
||||
)
|
||||
]
|
@ -134,6 +134,8 @@ class User(RESTModelMixin, PermissionsMixin, AbstractBaseUser):
|
||||
|
||||
last_name = models.CharField(max_length=255, blank=True)
|
||||
|
||||
gender = models.CharField(max_length=255, blank=True)
|
||||
|
||||
email = models.EmailField(blank=True)
|
||||
|
||||
last_email_send = models.DateTimeField(blank=True, null=True)
|
||||
|
@ -29,6 +29,7 @@ USERCANSEESERIALIZER_FIELDS = (
|
||||
|
||||
|
||||
USERCANSEEEXTRASERIALIZER_FIELDS = USERCANSEESERIALIZER_FIELDS + (
|
||||
"gender",
|
||||
"email",
|
||||
"last_email_send",
|
||||
"comment",
|
||||
|
Loading…
Reference in New Issue
Block a user