mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
fix user/pool deletion
This commit is contained in:
parent
be432989b5
commit
513e4bc1c3
2 changed files with 2 additions and 2 deletions
|
@ -488,8 +488,7 @@ def set_limits(user):
|
||||||
def delete_user(user):
|
def delete_user(user):
|
||||||
if 'rtp' in session['userinfo']['groups']:
|
if 'rtp' in session['userinfo']['groups']:
|
||||||
proxmox = connect_proxmox()
|
proxmox = connect_proxmox()
|
||||||
delete_user_pool(proxmox, user)
|
User(user).delete()
|
||||||
cache.delete('vms')
|
|
||||||
return '', 200
|
return '', 200
|
||||||
else:
|
else:
|
||||||
return '', 403
|
return '', 403
|
||||||
|
|
|
@ -102,6 +102,7 @@ class User(object):
|
||||||
return 'exceeds_disk_limit'
|
return 'exceeds_disk_limit'
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
|
proxmox = connect_proxmox()
|
||||||
proxmox.pools(self.name).delete()
|
proxmox.pools(self.name).delete()
|
||||||
users = proxmox.access.users.get()
|
users = proxmox.access.users.get()
|
||||||
if any(user['userid'] == "{}@csh.rit.edu".format(self.name)
|
if any(user['userid'] == "{}@csh.rit.edu".format(self.name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue