KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am using Django user_passes_test decorator to check the User Permission. @user_passes_test(lambda u: has_add_permission(u, "project")) def create_project(request): ...... 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.
Tags (comma-separated)
Save Edits
Cancel