Fix club rights

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

No files matched your search

+1 -1
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")