Feat: 1. User-level access added to Dogs, Command Categories, Locations, Button Shapes, Images, Distraction Types, Distraction Intensity Levels, Bribes, Response Quality Metrics, Obedience Levels. \n 2. New user (Founding Partner) creation setup in database and front-end but front-end not tested.
This commit is contained in:
@@ -131,6 +131,40 @@ class DataStore_User(DataStore_Base):
|
||||
cls.db_cursor_clear(cursor)
|
||||
return errors
|
||||
|
||||
@classmethod
|
||||
def save_new_founding_partner(cls, user):
|
||||
_m = f'{cls}.save_new_founding_partner'
|
||||
av.val_str(comment, 'comment', _m)
|
||||
|
||||
guid = Helper_DB_MySQL.create_guid_str()
|
||||
user = cls.get_user_session()
|
||||
|
||||
Helper_App.console_log(f'saving users: {users}')
|
||||
|
||||
argument_dict_list = {
|
||||
'a_comment': comment,
|
||||
'a_guid': guid,
|
||||
'a_id_user_auth0': user.id_user_auth0,
|
||||
'a_email_user': user.email
|
||||
'a_debug': 0
|
||||
}
|
||||
result = cls.db_procedure_execute('p_dog_save_new_founding_partner', argument_dict_list)
|
||||
|
||||
Helper_App.console_log('Users saved')
|
||||
|
||||
# Errors
|
||||
cursor = result.cursor
|
||||
cursor.nextset()
|
||||
result_set_e = cursor.fetchall()
|
||||
errors = []
|
||||
if len(result_set_e) > 0:
|
||||
errors = [SQL_Error.from_db_record(row) for row in result_set_e]
|
||||
for error in errors:
|
||||
Helper_App.console_log(f"Error [{error.code}]: {error.msg}")
|
||||
|
||||
cls.db_cursor_clear(cursor)
|
||||
return errors
|
||||
|
||||
|
||||
@classmethod
|
||||
def get_many_role(cls, role_filters):
|
||||
|
||||
Reference in New Issue
Block a user