[System] Usermodel geändert
* firstname und lastname nun 50 Zeichen lang * email 60 zeichen lang
This commit is contained in:
parent
130774e665
commit
0f64c718f5
|
@ -23,7 +23,7 @@ def login_user(username, password):
|
||||||
def update_user(user):
|
def update_user(user):
|
||||||
current_app.config["FG_AUTH_BACKEND"].update_user(user)
|
current_app.config["FG_AUTH_BACKEND"].update_user(user)
|
||||||
if not user.display_name:
|
if not user.display_name:
|
||||||
user.display_name = "{} {}".format(user.firstname, user.lastname)
|
user.display_name = "{} {}.".format(user.firstname, user.lastname[0])
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -47,9 +47,9 @@ class User(db.Model, ModelSerializeMixin):
|
||||||
__tablename__ = "user"
|
__tablename__ = "user"
|
||||||
userid: str = db.Column(db.String(30), nullable=False)
|
userid: str = db.Column(db.String(30), nullable=False)
|
||||||
display_name: str = db.Column(db.String(30))
|
display_name: str = db.Column(db.String(30))
|
||||||
firstname: str = db.Column(db.String(30))
|
firstname: str = db.Column(db.String(50))
|
||||||
lastname: str = db.Column(db.String(30))
|
lastname: str = db.Column(db.String(50))
|
||||||
mail: str = db.Column(db.String(30))
|
mail: str = db.Column(db.String(60))
|
||||||
roles: [str] = []
|
roles: [str] = []
|
||||||
|
|
||||||
roles_: [Role] = db.relationship("Role", secondary=association_table, cascade="save-update, merge")
|
roles_: [Role] = db.relationship("Role", secondary=association_table, cascade="save-update, merge")
|
||||||
|
|
Loading…
Reference in New Issue