parameters: (request)
docstring: Attribute an Actor Identifier. Should be an AJAX POST.
  
      :param request: Django request.
      :type request: :class:`django.http.HttpRequest`
      :returns: :class:`django.http.HttpResponseRedirect`
docstring_summary: Attribute an Actor Identifier. Should be an AJAX POST.
docstring_tokens: Attribute an Actor Identifier . Should be an AJAX POST .
function: def attribute_identifier(request):
      """
      Attribute an Actor Identifier. Should be an AJAX POST.
  
      :param request: Django request.
      :type request: :class:`django.http.HttpRequest`
      :returns: :class:`django.http.HttpResponseRedirect`
      """
  
      if request.method == "POST" and request.is_ajax():
          request.user._setup()
          user = request.user
  
          if user.has_access_to(ActorACL.ACTOR_IDENTIFIERS_ADD):
              id_ = request.POST.get('id', None)
              identifier_type = request.POST.get('identifier_type', None)
              identifier = request.POST.get('identifier', None)
              confidence = request.POST.get('confidence', 'low')
              if not identifier_type or not identifier:
                  return HttpResponse(json.dumps({'success': False,
                                                  'message': 'Not all info provided.'}),
                                      content_type="application/json")
              result = attribute_actor_identifier(id_,
                                                  identifier_type,
                                                  identifier,
                                                  confidence,
                                                  request.user)
          else:
              result = {'success': False,
                        'message': 'User does not have permission to attribute actor identifier.' }
          return HttpResponse(json.dumps(result),
                              content_type="application/json")
      else:
          error = "Expected AJAX POST"
          return render(request, "error.html", {"error" : error })
function_tokens: def attribute_identifier ( request ) : if request . method == "POST" and request . is_ajax ( ) : request . user . _setup ( ) user = request . user if user . has_access_to ( ActorACL . ACTOR_IDENTIFIERS_ADD ) : id_ = request . POST . get ( 'id' , None ) identifier_type = request . POST . get ( 'identifier_type' , None ) identifier = request . POST . get ( 'identifier' , None ) confidence = request . POST . get ( 'confidence' , 'low' ) if not identifier_type or not identifier : return HttpResponse ( json . dumps ( { 'success' : False , 'message' : 'Not all info provided.' } ) , content_type = "application/json" ) result = attribute_actor_identifier ( id_ , identifier_type , identifier , confidence , request . user ) else : result = { 'success' : False , 'message' : 'User does not have permission to attribute actor identifier.' } return HttpResponse ( json . dumps ( result ) , content_type = "application/json" ) else : error = "Expected AJAX POST" return render ( request , "error.html" , { "error" : error } )