mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-13 22:26:01 +00:00
can_vote in Election
This commit is contained in:
1 parent
2c76784007
commit
33d8c14da5
1 file changed
+6
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user