mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-07-22 11:44:53 +02:00
prevent deleting main admin
This commit is contained in:
parent
1ee3a621f5
commit
69791457b8
1 changed files with 3 additions and 1 deletions
|
@ -121,7 +121,9 @@ def user_delete():
|
|||
u = db.get_user(uid)
|
||||
except:
|
||||
u=False
|
||||
|
||||
if str(u.id) == "37cc36e0-afec-4545-9219-94655805868b" or str(u.username)=='system':
|
||||
resp={"status":"failed","err":"Cannot delete admin user"}
|
||||
return buildResponse(resp, 200)
|
||||
if not u:
|
||||
msg = "User not found: {}".format(uid)
|
||||
resp={"status":"failed","err":msg}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue