コード例 #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())
コード例 #2
0
ファイル: poll.py プロジェクト: 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)
コード例 #3
0
ファイル: poll.py プロジェクト: phihag/adhocracy
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)
コード例 #4
0
ファイル: poll.py プロジェクト: alex-obi/adhocracy
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)
コード例 #5
0
ファイル: poll.py プロジェクト: dwt/adhocracy
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)
コード例 #6
0
ファイル: delegation.py プロジェクト: phihag/adhocracy
def create(check):
    check.perm('delegation.create')
    user.vote(check)
    check.other('no_instance_allow_delegate', not c.instance.allow_delegate)
コード例 #7
0
ファイル: poll.py プロジェクト: AnonOnWarpath/adhocracy
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()
コード例 #8
0
def create():
    return (has('delegation.create') and user.vote() and
            c.instance.allow_delegate)