title: How to pass Django request object in user_passes_test decorator callable function
body: <p>I am using Django user_passes_test decorator to check the User Permission.</p>
  
  <pre><code>@user_passes_test(lambda u: has_add_permission(u, "project"))
  def create_project(request):
  ......
  </code></pre>
  
  <p>I am calling a callback function has_add_permission which takes two arguments User and a String. I would like to pass the request object along with it is that possible? Also, can anyone please tell me how are we able to access the User object inside the decorator directly. </p>