permissions.DjangoModelPermissionsOrAnonReadOnly doesn't actually enable anonymous read-only access in 3.15
#9298
Unanswered
lpomfrey
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As the title states, it seems from DRF 3.15 the
permissions.DjangoModelPermissionsOrAnonReadOnlydoesn't actually allow anonymous read only access as it inherits the check for the view permission on the model frompermissions.DjangoModelPermissionsclass.It would seem to replicate the older behaviour
DjangoModelPermissionsOrAnonReadOnlyshould set'GET'and'HEAD'in theperms_mapto[](along with settingauthenticated_users_only = False).I'm not sure if this is by design and the recommended solution is to compose a set of permissions like
permissions.DjangoModelPermissions | ReadOnly(providing a customReadOnlyclass), but the documentation still suggests it should work as it did in 3.14 and before.Beta Was this translation helpful? Give feedback.
All reactions