[Patchew-devel] [PATCH] git: show admin link to staff users only

Paolo Bonzini pbonzini at redhat.com
Thu Mar 8 06:41:26 UTC 2018


While superusers automatically get all permissions, they do not have access
to the admin---that is reserved to "staff" users.  Fix that.

Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
---
 www/templates/base.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/templates/base.html b/www/templates/base.html
index 225474f..89dabcf 100644
--- a/www/templates/base.html
+++ b/www/templates/base.html
@@ -74,7 +74,7 @@ crossorigin="anonymous"/>
                     Hi {{ user.username }} <span class="caret"></span>
                 </button>
                 <ul class="dropdown-menu">
-                    {% if request.user.is_superuser %}
+                    {% if request.user.is_staff %}
                     <li><a href="/admin" target="blank">Admin</a></li>
                     {% endif %}
                     <li role="separator" class="divider"></li>
-- 
2.14.3




More information about the Patchew-devel mailing list