def indicator(request, indicator_id): """ Generate Indicator Details template. :param request: Django request object (Required) :type request: :class:`django.http.HttpRequest` :param indicator_id: The ObjectId of the indicator to get details for. :type indicator_id: str :returns: :class:`django.http.HttpResponse` """ user = request.user if user.has_access_to(IndicatorACL.READ): template = "indicator_detail.html" (new_template, args) = get_indicator_details(indicator_id, user) if new_template: template = new_template return render_to_response(template, args, RequestContext(request)) else: return render_to_response("error.html", {'error': 'User does not have permission to view Indicator details.'}, RequestContext(request))
def indicator(request, indicator_id): """ Generate Indicator Details template. :param request: Django request object (Required) :type request: :class:`django.http.HttpRequest` :param indicator_id: The ObjectId of the indicator to get details for. :type indicator_id: str :returns: :class:`django.http.HttpResponse` """ analyst = request.user.username template = "indicator_detail.html" (new_template, args) = get_indicator_details(indicator_id, analyst) if new_template: template = new_template return render_to_response(template, args, RequestContext(request))
def indicator(request, indicator_id): """ Generate Indicator Details template. :param request: Django request object (Required) :type request: :class:`django.http.HttpRequest` :param indicator_id: The ObjectId of the indicator to get details for. :type indicator_id: str :returns: :class:`django.http.HttpResponse` """ analyst = request.user.username template = "indicator_detail.html" (new_template, args) = get_indicator_details(indicator_id, analyst) if new_template: template = new_template return render_to_response(template, args, RequestContext(request))
def indicator(request, indicator_id): """ Generate Indicator Details template. :param request: Django request object (Required) :type request: :class:`django.http.HttpRequest` :param indicator_id: The ObjectId of the indicator to get details for. :type indicator_id: str :returns: :class:`django.http.HttpResponse` """ user = request.user if user.has_access_to(IndicatorACL.READ): template = "indicator_detail.html" (new_template, args) = get_indicator_details(indicator_id, user) if new_template: template = new_template return render_to_response(template, args, RequestContext(request)) else: return render_to_response("error.html", { 'error': 'User does not have permission to view Indicator details.' }, RequestContext(request))