mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 02:24:26 +00:00
Fixes double check on board member in club view
This commit is contained in:
parent
17b098ca2a
commit
1c6df0909b
@ -142,8 +142,8 @@ class ClubMembersView(ClubTabsMixin, CanViewMixin, UpdateView):
|
|||||||
ms = self.object.get_membership_for(request.user)
|
ms = self.object.get_membership_for(request.user)
|
||||||
if (form.cleaned_data['role'] <= SITH_MAXIMUM_FREE_ROLE or
|
if (form.cleaned_data['role'] <= SITH_MAXIMUM_FREE_ROLE or
|
||||||
(ms is not None and ms.role >= form.cleaned_data['role']) or
|
(ms is not None and ms.role >= form.cleaned_data['role']) or
|
||||||
request.user.is_in_group(SITH_MAIN_BOARD_GROUP) or
|
request.user.is_board_member or
|
||||||
request.user.is_root or request.user.is_board_member):
|
request.user.is_root):
|
||||||
return self.form_valid(form)
|
return self.form_valid(form)
|
||||||
else:
|
else:
|
||||||
return self.form_invalid(form)
|
return self.form_invalid(form)
|
||||||
|
Loading…
Reference in New Issue
Block a user