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:
Tom Christie 2013-02-10 16:43:52 +00:00
parent 4c8bd40465
commit 69dcf13da9

View File

@ -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