From 18f856af24ace7a4bb91fe243430f412d55d1eca Mon Sep 17 00:00:00 2001 From: Skia Date: Tue, 22 Mar 2016 12:00:57 +0100 Subject: [PATCH] Small right fix --- club/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/club/views.py b/club/views.py index 25d936b9..1a5c1da8 100644 --- a/club/views.py +++ b/club/views.py @@ -8,6 +8,7 @@ from django.core.exceptions import ValidationError from core.views import CanViewMixin, CanEditMixin, CanEditPropMixin from club.models import Club, Membership +from sith.settings import AE_GROUPS class ClubListView(CanViewMixin, ListView): """ @@ -41,7 +42,7 @@ class ClubMemberForm(forms.ModelForm): """ ret = super(ClubMemberForm, self).clean() ms = self.instance.club.get_membership_for(self._user) - if (ms is not None and ms.role >= self.cleaned_data['role']) or self._user.is_superuser: + if (ms is not None and ms.role >= self.cleaned_data['role']) or self._user.is_in_group(AE_GROUPS['board']['name']) or self._user.is_superuser: return ret raise ValidationError("You do not have the permission to do that")