diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2018-10-23 16:11:36 -0400 |
---|---|---|
committer | Parker Berberian <pberberian@iol.unh.edu> | 2018-10-24 13:49:35 -0400 |
commit | c1ae226b542f2bd76c692d791c9fe70479617866 (patch) | |
tree | 74ee9778784cd1b2ad9c3f60328ffa24b41b73f2 /dashboard/src/dashboard | |
parent | d6e337fa62c32155941333fe8fedc28e4f663700 (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.py | 6 |
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) |