From 96a904b2fce9e1a3540512b040f9f9aa1e9e0e43 Mon Sep 17 00:00:00 2001 From: Dan Poirier Date: Mon, 30 Dec 2013 15:06:57 -0500 Subject: [PATCH] Bug 938680 - Don't show "Remove X" button for yourself When a curator is viewing a group, the group members are shown withe a "Remove X" button that lets the curator remove the user from the group. Curators should not be able to remove themselves from the groups they curate, though. So don't show a "Remove X" button on a user's own member card when the user is a curator viewing a group they curate. Fix bug 938680 --- mozillians/templates/phonebook/includes/search_result.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozillians/templates/phonebook/includes/search_result.html b/mozillians/templates/phonebook/includes/search_result.html index 8ffc03247..59214633b 100644 --- a/mozillians/templates/phonebook/includes/search_result.html +++ b/mozillians/templates/phonebook/includes/search_result.html @@ -1,5 +1,5 @@
- {% if group and (is_curator or request.user.is_superuser) %} + {% if group and (is_curator or request.user.is_superuser) and (request.user != profile.user) %}
{{ csrf() }}