aboutsummaryrefslogtreecommitdiffstats
path: root/src/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/dashboard')
-rw-r--r--src/dashboard/tasks.py6
1 files changed, 5 insertions, 1 deletions
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)