RBAC with DRF

191 views
Skip to first unread message

Foobar

unread,
Nov 29, 2018, 9:56:54 AM11/29/18
to Django REST framework
Any suggestions on what I should use to integrate RBAC with DRF? I have taken a look at django-rest-framework-roles and django-guardian but neither look too promising. Your feedback would be much appreciated. Thanks in advance.

in...@jelmert.nl

unread,
Dec 4, 2018, 6:39:41 AM12/4/18
to Django REST framework
The django framework itself provides groups that can have users and permissions. This gives you the building blocks to implement RBAC. 

Use rest_framework.permissions.DjangoModelPermissions in permission_classes and django.contrib.auth.backends.ModelBackend as authentication backend and you are good to go. 

Op donderdag 29 november 2018 15:56:54 UTC+1 schreef Foobar:
Reply all
Reply to author
Forward
0 new messages