From 4f6e3f5069bb682751a5db770e910777fa477b0d Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Tue, 23 Oct 2018 16:11:36 -0400 Subject: 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 --- src/dashboard/tasks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/dashboard') diff --git a/src/dashboard/tasks.py b/src/dashboard/tasks.py index 48008b6..0f7af1c 100644 --- a/src/dashboard/tasks.py +++ b/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) -- cgit 1.2.3-korg