set up main structure of the UI

This commit is contained in:
2024-06-19 15:17:06 +00:00
parent e0b41fab2c
commit 13079044e8
6 changed files with 160 additions and 2 deletions

7
UI/utils.py Normal file
View File

@ -0,0 +1,7 @@
def GetPrivilege(username, ExecCommand):
dat=ExecCommand(f'query_profile -c {username} -u {username}')
if dat=='-1':
return -1
# dat is something like: <username> <name> <mail> <privilege>
dat=dat.split(' ')
return int(dat[3])