mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +00:00
Fix club rights
This commit is contained in:
1 parent
d90c0f86f4
commit
fe8f5bb2e3
4 files changed
+6
-7
No files matched your search
+1
-1
@@ -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")
|
||||
|
||||
|
||||
Reference in new issue
Block a user