rq / django-rq

A simple app that provides django integration for RQ (Redis Queue)
MIT License
1.79k stars 281 forks source link

Specify function to be used instead of staff_member_required #257

Open turicas opened 6 years ago

turicas commented 6 years ago

I have a use case where I'd like only superusers to access the Django-RQ inside Django Admin, but this customization is not possible with the current code. It'd be awesome if we can specify a function to determine if a specific user can or cannot access the RQ admin (the function can easily be implemented using Django Admin's user_passes_test, as staff_member_required does).

selwin commented 6 years ago

This is a reasonable idea. Could you please open a PR, complete with docs for this?