mirror of
https://github.com/ae-utbm/sith.git
synced 2026-04-22 11:13:14 +00:00
ask for user confirmation if its role was moved out of presidency
This commit is contained in:
+1
-1
@@ -240,7 +240,7 @@ class Club(models.Model):
|
||||
|
||||
def can_roles_be_edited_by(self, user: User) -> bool:
|
||||
"""Return True if the given user can edit the roles of this club"""
|
||||
return (
|
||||
return user.is_authenticated and (
|
||||
user.has_perm("club.change_clubrole")
|
||||
or self.members.ongoing().filter(user=user, role__is_presidency=True).exists()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user