aboutsummaryrefslogtreecommitdiff
path: root/src/web/models/user.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/models/user.py')
-rw-r--r--src/web/models/user.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/web/models/user.py b/src/web/models/user.py
index 4174cb0f..8ad9440b 100644
--- a/src/web/models/user.py
+++ b/src/web/models/user.py
@@ -57,6 +57,14 @@ class User(db.Model, UserMixin, RightMixin):
is_api = db.Column(db.Boolean(), default=False)
@staticmethod
+ def _fields_base_write():
+ return {'login', 'password', 'email'}
+
+ @staticmethod
+ def _fields_base_read():
+ return {'date_created', 'last_connection'}
+
+ @staticmethod
def make_valid_nickname(nickname):
return re.sub('[^a-zA-Z0-9_\.]', '', nickname)
bgstack15