alesdotio / django-admin-shortcuts

Add simple and pretty shortcuts to the django admin homepage.
Other
205 stars 53 forks source link

Feature: Using built-in admin permissions #42

Closed pe712 closed 1 year ago

pe712 commented 1 year ago

The package is not using built-in permissions of django admin as described here. Instead, the has_perm field point to a function passing the request.

This PR allow :

It is backward-compatible with a warning if the user passes a test_func in the field has_perm.

Also if the test_func does not exist, it does not allow to see the shortcut.

alesdotio commented 1 year ago

Nice! Could you also update the README with example usage?

alesdotio commented 1 year ago

Thank you, this is now in 2.1.1! 💪