mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-31 06:39:31 +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 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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user