mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Bugfix for DjangoModelPermissions. Fixes #437
Turns out that Django's default permissions backend always returns False when checking object-level permissions, even if the user does have valid global permissions.
This commit is contained in:
parent
4c8bd40465
commit
69dcf13da9
|
@ -109,6 +109,6 @@ class DjangoModelPermissions(BasePermission):
|
|||
|
||||
if (request.user and
|
||||
request.user.is_authenticated() and
|
||||
request.user.has_perms(perms, obj)):
|
||||
request.user.has_perms(perms)):
|
||||
return True
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue
Block a user