Feat: User Relationships and Session Members.
This commit is contained in:
@@ -55,7 +55,7 @@ class User(SQLAlchemy_ABC, Base):
|
||||
updated_last_by_user_id, change_set_id
|
||||
"""
|
||||
_m = f'{cls.__qualname__}.from_db_user'
|
||||
Helper_App.console_log(f'user record: {query_row}')
|
||||
# Helper_App.console_log(f'user record: {query_row}')
|
||||
user = cls()
|
||||
user.user_id = query_row[0]
|
||||
user.user_auth0_id = query_row[1]
|
||||
@@ -72,7 +72,7 @@ class User(SQLAlchemy_ABC, Base):
|
||||
_m = f'{cls.__qualname__}.from_json'
|
||||
user = cls()
|
||||
if json is None: return user
|
||||
Helper_App.console_log(f'{_m}/n{json}')
|
||||
# Helper_App.console_log(f'{_m}/n{json}')
|
||||
user.user_id = json[cls.ATTR_USER_ID]
|
||||
user.user_auth0_id = json[cls.ATTR_USER_AUTH0_ID]
|
||||
user.firstname = json[cls.FLAG_FIRSTNAME]
|
||||
@@ -85,12 +85,12 @@ class User(SQLAlchemy_ABC, Base):
|
||||
@classmethod
|
||||
def from_json_auth0(cls, json):
|
||||
_m = f'{cls.__qualname__}.from_json_auth0'
|
||||
Helper_App.console_log(_m)
|
||||
Helper_App.console_log(f'JSON: {json}')
|
||||
# Helper_App.console_log(_m)
|
||||
# Helper_App.console_log(f'JSON: {json}')
|
||||
user = cls()
|
||||
if json is None: return user
|
||||
user_info = json['userinfo']
|
||||
Helper_App.console_log(f'user_info: {user_info}')
|
||||
# Helper_App.console_log(f'user_info: {user_info}')
|
||||
user.user_id = None
|
||||
user.user_auth0_id = user_info['sub']
|
||||
user.firstname = None
|
||||
|
||||
Reference in New Issue
Block a user