Reverted: Administrator can be deleted by other manager. (partly reverted 533c65562d after discus it with oskar because import also possible as non-admin)

This commit is contained in:
Emanuel Schuetze 2012-11-21 23:26:54 +01:00
parent e5262ea983
commit cbd04327bb
2 changed files with 3 additions and 3 deletions

View File

@ -93,10 +93,12 @@
<a href="{% url user_edit user.id %}">
<img src="{% static 'images/icons/edit.png' %}" title="{% trans 'Edit participant' %}">
</a>
{% if user != request_user and not user.is_superuser %}
{% if user != request_user %}
<a href="{% url user_delete user.id %}">
<img src="{% static 'images/icons/delete.png' %}" title="{% trans 'Delete participant' %}">
</a>
{% endif %}
{% if user != request_user and not user.is_superuser %}
<a class="status_link deactivate" href="{% url user_status_deactivate user.id %}" title="{% trans 'Change status to inactive' %}"{% if not user.is_active %} style="display:none"{% endif %}>
<span></span>
</a>

View File

@ -208,8 +208,6 @@ class UserDeleteView(DeleteView):
def pre_redirect(self, request, *args, **kwargs):
if self.get_object() == self.request.user:
messages.error(request, _("You can not delete yourself."))
elif self.get_object().is_superuser:
messages.error(request, _("You can not delete the administrator."))
else:
super(DeleteView, self).pre_redirect(request, *args, **kwargs)