Django Rest Framework using "DjangoModelPermissions" allow readonly

25 views
Skip to first unread message

Denis Morejón

unread,
May 20, 2022, 2:41:50 PM5/20/22
to Django users

Hi:

I am creating a DRF project. I wanna use traditional DjangoModelPermissions. I put this on settings.py and It works fine:

REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermissions'
],

But all authenticated users can access reading all data. Even if they had no reading permission.

How can I prevent reading permissions?

Reply all
Reply to author
Forward
0 new messages