summaryrefslogtreecommitdiffstats
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 c619642..d4b4189 100644
--- a/src/dashboard/tasks.py
+++ b/src/dashboard/tasks.py
@@ -67,7 +67,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)