Reputation: 2827
I would like to block some urls for users they don't have staff status.
Now I do it checking in my code in each def
if not request.user.is_staff:
...
But I have so many methods and all of them are under a /app/ path, so I thought perhaps exists a way to block for non staff users the access to those methods.
Thanks.
Upvotes: 1
Views: 1147