diff --git a/election/models.py b/election/models.py index 717d5598..9e3cdf15 100644 --- a/election/models.py +++ b/election/models.py @@ -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