Example #1
0
def validate_asset_accreditation_level(request, **kwargs):
    if hasattr(request.validated['asset'], 'transfer_accreditation'):
        predicate = 'transfer_accreditation'
    else:
        predicate = 'create_accreditation'
    validate_accreditation_level(request, request.validated['asset'],
                                 predicate)
def validate_contract_accreditation_level(request):
    validate_accreditation_level(request, request.validated['contract'], 'create_accreditation')
Example #3
0
def validate_lot_accreditation_level(request, **kwargs):  # pylint: disable=unused-argument
    if hasattr(request.validated['lot'], 'transfer_accreditation'):
        predicate = 'transfer_accreditation'
    else:
        predicate = 'create_accreditation'
    validate_accreditation_level(request, request.validated['lot'], predicate)
def validate_bid_accreditation_level(request):
    validate_accreditation_level(request, request.validated['auction'], 'edit_accreditation')