summaryrefslogtreecommitdiffstats
path: root/dashboard/src/dashboard
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2018-10-23 16:11:36 -0400
committerParker Berberian <pberberian@iol.unh.edu>2018-10-24 13:49:35 -0400
commitc1ae226b542f2bd76c692d791c9fe70479617866 (patch)
tree74ee9778784cd1b2ad9c3f60328ffa24b41b73f2 /dashboard/src/dashboard
parentd6e337fa62c32155941333fe8fedc28e4f663700 (diff)
Fixes for access creation and removal
Fixes include: - creating ssh access jobs for users with ssh keys - ensuring vpn access is revoked after booking ends Creates ssh access jobs with the user's ssh keys, if they exist Change-Id: Ia2e9f0c5a2f90b45732a5767a62b87a5a5492b94 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'dashboard/src/dashboard')
-rw-r--r--dashboard/src/dashboard/tasks.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/dashboard/src/dashboard/tasks.py b/dashboard/src/dashboard/tasks.py
index 48008b6..0f7af1c 100644
--- a/dashboard/src/dashboard/tasks.py
+++ b/dashboard/src/dashboard/tasks.py
@@ -73,7 +73,11 @@ def booking_poll():
def cleanup_access(qs):
for relation in qs:
- pass # TODO
+ if "vpn" in relation.config.access_type.lower():
+ relation.config.set_revoke(True)
+ relation.config.save()
+ relation.status = JobStatus.NEW
+ relation.save()
cleanup_set = Booking.objects.filter(end__lte=timezone.now()).filter(job__complete=False)