Esempio n. 1
0
def backdoor_detail(request, id_):
    """
    Generate the Backdoor details page.

    :param request: Django request.
    :type request: :class:`django.http.HttpRequest`
    :param id_: The Backdoor ObjectId to get details for.
    :type id_: str
    :returns: :class:`django.http.HttpResponse`
    """

    template = "backdoor_detail.html"
    request.user._setup()
    user = request.user
    if user.has_access_to(BackdoorACL.READ):
        (new_template, args) = get_backdoor_details(id_, user)
        if new_template:
            template = new_template

        args['BackdoorACL'] = BackdoorACL

        return render(request, template, args)
    else:
        return render(request, "error.html", {
            'error':
            'User does not have permission to view backdoor listing.'
        })
Esempio n. 2
0
def backdoor_detail(request, id_):
    """
    Generate the Backdoor details page.

    :param request: Django request.
    :type request: :class:`django.http.HttpRequest`
    :param id_: The Backdoor ObjectId to get details for.
    :type id_: str
    :returns: :class:`django.http.HttpResponse`
    """

    template = "backdoor_detail.html"
    user = request.user.username
    (new_template, args) = get_backdoor_details(id_, user)
    if new_template:
        template = new_template
    return render_to_response(template, args, RequestContext(request))
Esempio n. 3
0
def backdoor_detail(request, id_):
    """
    Generate the Backdoor details page.

    :param request: Django request.
    :type request: :class:`django.http.HttpRequest`
    :param id_: The Backdoor ObjectId to get details for.
    :type id_: str
    :returns: :class:`django.http.HttpResponse`
    """

    template = "backdoor_detail.html"
    user = request.user.username
    (new_template, args) = get_backdoor_details(id_, user)
    if new_template:
        template = new_template
    return render_to_response(template,
                              args,
                              RequestContext(request))