mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 20:09:25 +00:00
Fix club rights
This commit is contained in:
@ -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