mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 15:51:19 +00:00
can_vote in Election
This commit is contained in:
parent
2c76784007
commit
33d8c14da5
@ -48,6 +48,12 @@ class Election(models.Model):
|
||||
return True
|
||||
return False
|
||||
|
||||
def can_vote(self, user):
|
||||
for group in self.vote_groups.all():
|
||||
if user.is_in_group(group):
|
||||
return True
|
||||
return False
|
||||
|
||||
# Permissions
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user