mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-14 05:36:50 +03:00
parent
86f7967a7a
commit
152035aee7
|
@ -188,4 +188,7 @@ class DjangoObjectPermissionsFilter(BaseFilterBackend):
|
|||
'model_name': get_model_name(model_cls)
|
||||
}
|
||||
permission = self.perm_format % kwargs
|
||||
return guardian.shortcuts.get_objects_for_user(user, permission, queryset)
|
||||
if guardian.VERSION >= (1, 3):
|
||||
# Maintain behavior compatibility with versions prior to 1.3
|
||||
extra = {'accept_global_perms': False}
|
||||
return guardian.shortcuts.get_objects_for_user(user, permission, queryset, **extra)
|
||||
|
|
Loading…
Reference in New Issue
Block a user