Feat: Founding Partner login with autocreation of User, User Role Link, Company, User Company Link as necessary and autologin with new user - for approved Founding Partners only, otherwise redirected to login page.
This commit is contained in:
@@ -78,7 +78,7 @@ class Command_Category(SQLAlchemy_ABC, Base):
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json):
|
||||
_m = 'Command_Category.from_json'
|
||||
_m = f'{cls.__qualname__}.from_json'
|
||||
command_category = cls()
|
||||
if json is None: return command_category
|
||||
# Helper_App.console_log(f'{_m}\njson: {json}')
|
||||
|
||||
@@ -118,9 +118,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}')
|
||||
user = cls()
|
||||
if json is None: return user
|
||||
user_info = json['userinfo']
|
||||
Helper_App.console_log(f'user_info: {user_info}')
|
||||
user.id_user = None
|
||||
user.id_user_auth0 = user_info['sub']
|
||||
user.firstname = None
|
||||
|
||||
Reference in New Issue
Block a user