Example #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())
Example #2
0
File: poll.py Project: 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)
Example #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)
Example #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)
Example #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)
Example #6
0
def create(check):
    check.perm('delegation.create')
    user.vote(check)
    check.other('no_instance_allow_delegate', not c.instance.allow_delegate)
Example #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()
Example #8
0
def create():
    return (has('delegation.create') and user.vote() and
            c.instance.allow_delegate)