From d755d42a769c8f980ef522acd389c72e1b987b74 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Thu, 19 Oct 2017 20:22:34 +0530 Subject: [PATCH] Handle both admin and non-admin user names in update user template When an admin user goes to the UpdateUser view of a different user, the template gets only one username which is of the user being updated. This causes the admin user's name being overwritten in the header section thus making it appear that the user is modifying themselves and not the admin. This can cause confusion to the admin user. Explicitly getting the name of the user that made the request ensures that we always get the correct username. Signed-off-by: Joseph Nuthalapati Reviewed-by: James Valleroy --- plinth/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/templates/base.html b/plinth/templates/base.html index 8a60e46f2..1d4357af1 100644 --- a/plinth/templates/base.html +++ b/plinth/templates/base.html @@ -131,7 +131,7 @@ class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> - {{ user.username }} + {{ request.user.username }}