diff --git a/core/templates/base.html b/core/templates/base.html index d5b6c1c..f92b245 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -404,7 +404,11 @@ {# === WORK LOG PAYROLL MODAL — click handler + safe DOM builder === #} {# Builds the modal body from JSON via createElement + textContent. #} -{% if user.is_authenticated and user.is_staff or user.is_superuser %} +{# staff-or-superuser matches the server-side is_admin() helper. The old #} +{# "is_authenticated and is_staff or is_superuser" parsed as "(auth AND #} +{# staff) OR superuser" — template `and` binds tighter than `or`. Both #} +{# flags are False on AnonymousUser, so this simpler form is exact. #} +{% if user.is_staff or user.is_superuser %}