From ac2a1c812f65674344cb6266d6dbe8f264b6f009 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Thu, 19 Oct 2017 14:12:33 -0400 Subject: Fix up permissions throughout the system. --- app/dispatch/templates/dispatch/companies/list.html | 2 ++ app/dispatch/templates/dispatch/drivers/list.html | 2 ++ app/dispatch/templates/dispatch/nav.html | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'app/dispatch/templates') diff --git a/app/dispatch/templates/dispatch/companies/list.html b/app/dispatch/templates/dispatch/companies/list.html index 2654587..e0a128f 100644 --- a/app/dispatch/templates/dispatch/companies/list.html +++ b/app/dispatch/templates/dispatch/companies/list.html @@ -28,7 +28,9 @@ {{ company.phone_number }} {{ company.email_address }} + {% if user.is_superuser %} Edit + {% endif %} View diff --git a/app/dispatch/templates/dispatch/drivers/list.html b/app/dispatch/templates/dispatch/drivers/list.html index ccfb50d..4153fe9 100644 --- a/app/dispatch/templates/dispatch/drivers/list.html +++ b/app/dispatch/templates/dispatch/drivers/list.html @@ -23,7 +23,9 @@ {{ driver.last_name }} {{ driver.email }} + {% if user.is_superuser %} Edit + {% endif %} View diff --git a/app/dispatch/templates/dispatch/nav.html b/app/dispatch/templates/dispatch/nav.html index 5ba40d9..d40224c 100644 --- a/app/dispatch/templates/dispatch/nav.html +++ b/app/dispatch/templates/dispatch/nav.html @@ -1,8 +1,10 @@ -{% if user.is_authenticated %} +{% if request.user.is_authenticated %}
  • Loads
  • - {% if user.is_superuser %} + {% if request.user.is_superuser %}
  • Drivers
  • Companies
  • + {% else %} +
  • My Account
  • {% endif %}
  • Logout
  • {% else %} -- cgit v1.2.3