From 362fec85e066bc7d5ab5d48a0c18f88b96197f74 Mon Sep 17 00:00:00 2001 From: sriyasainath Date: Fri, 9 Jun 2017 23:39:20 +0530 Subject: Add check to allow the admin to access the temp offline boards but prohibit users --- experiment/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/experiment/views.py b/experiment/views.py index 3ea5a8d..9b493f3 100644 --- a/experiment/views.py +++ b/experiment/views.py @@ -22,7 +22,9 @@ def initiation(req): user1 = Account.objects.select_related().filter(id=user.id) user1 = user1[0] user_board = user1.board - if user_board.online: + + #allows admin to access the temporary offline devices but prohibits the users to do so + if user_board.online and (not user_board.temp_offline or user1.is_admin): slots = Slot.slots_now() slot_ids = [s.id for s in slots] now = datetime.datetime.now() -- cgit