Commit 33d8c14d authored by Sli's avatar Sli
Browse files

can_vote in Election

parent 2c767840
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment