Fix club rights

This commit is contained in:
Skia
2016-03-15 18:26:03 +01:00
parent d90c0f86f4
commit fe8f5bb2e3
4 changed files with 6 additions and 7 deletions

View File

@ -42,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']:
if (ms is not None and ms.role >= self.cleaned_data['role']) or self._user.is_superuser:
return ret
raise ValidationError("You do not have the permission to do that")