set up main structure of the UI
This commit is contained in:
7
UI/utils.py
Normal file
7
UI/utils.py
Normal 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])
|
Reference in New Issue
Block a user