Skip to content

Commit

Permalink
Remove + icon for non-staff users (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
geordi authored and Kobzol committed Sep 22, 2023
1 parent efe454f commit 5880c2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/ClassList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@
<span class="iconify" data-icon="mdi:calendar-import"></span>
</a>

{#if $user.is_staff}
<a class="btn btn-sm p-1" href="/admin/common/class/add/" title="Add class">
<span class="iconify" data-icon="ant-design:plus-outlined"></span>
</a>
{/if}
</div>

<div class="classes" class:loading>
Expand Down

0 comments on commit 5880c2e

Please sign in to comment.