mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-16 19:23:27 +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 True
|
||||||
return False
|
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
|
# Permissions
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user