@permission_required("core.manage_shop")
def add_voucher_group(request, template_name="manage/voucher/add_voucher_group.html"):
    if request.method == "POST":
        form = VoucherGroupAddForm(data=request.POST)
        if form.is_valid():
            voucher_group = form.save(commit=False)
            voucher_group.creator = request.user
            voucher_group.save()
            url = reverse("lfs_manage_voucher_group", kwargs={"id": voucher_group.id})
            return HttpResponseRedirect(url)
    else:
        form = VoucherGroupAddForm()

    return render_to_response(template_name, RequestContext(request, {
        "form": form,
        "voucher_groups": VoucherGroup.objects.all(),
        "came_from": (request.POST if request.method == 'POST' else request.GET).get("came_from",
                                                                                     reverse("lfs_manage_vouchers")),
    }))
This permission should be checked by is_authorized.
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/voucher/views.py/add_voucher_group--crossover with--dataset/ETHPy150Open mozilla/moztrap/moztrap/model/mtapi.py/MTAuthorization.permission