Exemplo n.º 1
0
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())
Exemplo n.º 2
0
Arquivo: poll.py Projeto: whausen/part
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)
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
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)
Exemplo n.º 5
0
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)
Exemplo n.º 6
0
def create(check):
    check.perm('delegation.create')
    user.vote(check)
    check.other('no_instance_allow_delegate', not c.instance.allow_delegate)
Exemplo n.º 7
0
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()
Exemplo n.º 8
0
def create():
    return (has('delegation.create') and user.vote() and
            c.instance.allow_delegate)