From 8306e7bf6e2464ef67e3496cfc172ff72e39e270 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Wed, 28 Nov 2012 13:59:14 +0100 Subject: [PATCH] Don't allow to remove the registered group --- .../participant/templates/participant/base_participant.html | 2 +- openslides/participant/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openslides/participant/templates/participant/base_participant.html b/openslides/participant/templates/participant/base_participant.html index a0f318179..751c02a3a 100644 --- a/openslides/participant/templates/participant/base_participant.html +++ b/openslides/participant/templates/participant/base_participant.html @@ -66,7 +66,7 @@ {# delete group #} - {% if group.name != 'Anonymous' %} + {% if group.name|lower != 'anonymous' and group.name|lower != 'registered' %}
  • {% trans 'Delete group' %}
  • diff --git a/openslides/participant/views.py b/openslides/participant/views.py index c0fa8d6c5..34cb032a0 100644 --- a/openslides/participant/views.py +++ b/openslides/participant/views.py @@ -441,7 +441,7 @@ class GroupDeleteView(DeleteView): url = 'user_group_overview' def pre_redirect(self, request, *args, **kwargs): - if self.get_object().name.lower() == 'anonymous': + if self.get_object().name.lower() in ['anonymous', 'registered']: messages.error(request, _("You can not delete this Group.")) else: super(GroupDeleteView, self).pre_redirect(request, *args, **kwargs)