From 2daa79ee1572d786296447f453a7124e289332c5 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 4 Feb 2021 03:32:16 +0100 Subject: [PATCH] [Plugin] user: Added permissions to model --- flaschengeist/models/user.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flaschengeist/models/user.py b/flaschengeist/models/user.py index 0d9d506..fb0f050 100644 --- a/flaschengeist/models/user.py +++ b/flaschengeist/models/user.py @@ -1,5 +1,5 @@ from flask import url_for -from typing import Optional +from typing import Optional, Type from datetime import date, datetime from sqlalchemy.orm.collections import attribute_mapped_collection @@ -56,6 +56,7 @@ class User(db.Model, ModelSerializeMixin): mail: str = db.Column(db.String(60), nullable=False) birthday: Optional[date] = db.Column(db.Date) roles: [str] = [] + permissions: Optional[type([str])] = None avatar_url: Optional[str] = "" roles_: [Role] = db.relationship("Role", secondary=association_table, cascade="save-update, merge")