mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Some permissions fixs and security for atomic vote
This commit is contained in:
@ -128,7 +128,7 @@ class Candidature(models.Model):
|
||||
election_list = models.ForeignKey(ElectionList, related_name='candidatures', verbose_name=_('election list'))
|
||||
|
||||
def can_be_edited_by(self, user):
|
||||
return (user == self.user)
|
||||
return (user == self.user) or user.can_edit(self.role.election)
|
||||
|
||||
def __str__(self):
|
||||
return "%s : %s" % (self.role.title, self.user.username)
|
||||
|
Reference in New Issue
Block a user