dry-rest-permissions icon indicating copy to clipboard operation
dry-rest-permissions copied to clipboard

Admin integration

Open joaoponceleao opened this issue 8 years ago • 2 comments

Hi, This is a question/feature request. I really like the concept behind this package. However, I'm not sure how one could use it in django's admin. Even though DRF is now working on an admin, I don't think it competes with django's own yet, so I like to give certain users access to django's admin page.

The question is, how to implement the permissions rules in the admin itself? i.e. admins of a certain object should have r/w permissions for that object in the admin but not for any other. Is this possible? I don't mind using another package for this, as long as the rules are coming from dry-rest-permissions. Is there a possibility to extend dry-rest-perms to support the admin or take advantage of another package that is already well integrated with the admin (i.e. django-guardian's admin integration receiving its rules from dry-rest)?

joaoponceleao avatar Jun 20 '16 08:06 joaoponceleao

Currently there is no hook in for the django admin pages. This has been requested once before, but I haven't gotten to it yet.

dbkaplan avatar Jun 20 '16 12:06 dbkaplan

Cool. Its obviously a low priority. I had seen the request on twitter before, but thought this was a better place to put it.

joaoponceleao avatar Jun 20 '16 18:06 joaoponceleao