From 5880c2ec8eff8bb1b475f24098806d99c61df050 Mon Sep 17 00:00:00 2001 From: Jan Gaura Date: Fri, 22 Sep 2023 13:03:51 +0200 Subject: [PATCH] Remove + icon for non-staff users (#348) --- api/views.py | 1 + frontend/src/ClassList.svelte | 2 ++ 2 files changed, 3 insertions(+) diff --git a/api/views.py b/api/views.py index e4ef4257..ed42aaad 100644 --- a/api/views.py +++ b/api/views.py @@ -195,6 +195,7 @@ def info(request): 'name': request.user.get_full_name(), 'teacher': is_teacher(request.user), 'is_superuser': request.user.is_superuser, + 'is_staff': request.user.is_staff, } semester = current_semester() diff --git a/frontend/src/ClassList.svelte b/frontend/src/ClassList.svelte index aa058b75..bbdd7c5a 100644 --- a/frontend/src/ClassList.svelte +++ b/frontend/src/ClassList.svelte @@ -88,9 +88,11 @@ + {#if $user.is_staff} + {/if}