def create(check, scope=None): check.valid_email() check.perm('delegation.create') user.vote(check) check.other('no_instance_allow_delegate', not c.instance.allow_delegate) if scope is not None: check.other('scope_frozen', scope.is_frozen())
def vote(check, p): check.valid_email() check.other('poll_has_ended', p.has_ended()) check.other('select_poll_not_mutable', (p.action == p.SELECT and p.selection and not p.selection.proposal.is_mutable())) user.vote(check)
def vote(check, p): check.other('poll_has_ended', p.has_ended()) check.other('select_poll_not_mutable', (p.action == p.SELECT and p.selection and not p.selection.proposal.is_mutable())) show(check, p) user.vote(check)
def vote(check, p): check.valid_email() check.other('poll_has_ended', p.has_ended()) check.other('scope_frozen', p.scope.is_frozen()) check.other('instance_frozen', p.scope.instance.frozen) check.other('select_poll_not_mutable', (p.action == p.SELECT and p.selection and not p.selection.proposal.is_mutable())) user.vote(check)
def vote(check, p): check.readonly() check.valid_email() check.other('poll_has_ended', p.has_ended()) check.other('scope_frozen', p.scope.is_frozen()) check.other('instance_frozen', p.scope.instance.frozen) check.other('select_poll_not_mutable', (p.action == p.SELECT and p.selection and not p.selection.proposal.is_mutable())) user.vote(check)
def create(check): check.perm('delegation.create') user.vote(check) check.other('no_instance_allow_delegate', not c.instance.allow_delegate)
def vote(p): if p.action == p.SELECT and not p.selection.proposal.is_mutable(): return False return show(p) and user.vote() and not p.has_ended()
def create(): return (has('delegation.create') and user.vote() and c.instance.allow_delegate)