Ajout de fonctions CRUD
This commit is contained in:
parent
73b8d4f159
commit
ffd0663f07
1 changed files with 5 additions and 0 deletions
|
@ -184,6 +184,8 @@ def list_permission():
|
|||
def edit_permission():
|
||||
permission_id = int(input('Permission ID: '))
|
||||
permission = Permission.get(id=permission_id)
|
||||
resource_id = permission.idResource
|
||||
role_id = permission.idRole
|
||||
# Editing name
|
||||
name = input(f'Permission name [{permission.name}]: ')
|
||||
if name == '':
|
||||
|
@ -283,6 +285,9 @@ def list_user_account():
|
|||
def edit_user_account():
|
||||
user_account_id = int(input('User Account ID: '))
|
||||
user_account = UserAccount.get(id=user_account_id)
|
||||
person_id = user_account.idPerson
|
||||
resource_id = user_account.idResource
|
||||
role_id = user_account.idRole
|
||||
# Editing username
|
||||
username = input(f'User Account username [{user_account.username}]: ')
|
||||
if username == '':
|
||||
|
|
Loading…
Reference in a new issue