mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-07 13:54:45 +03:00
Merge 35025adef8
into 3038494705
This commit is contained in:
commit
a3e5a2b5e5
|
@ -189,7 +189,7 @@ class DjangoModelPermissions(BasePermission):
|
|||
# Override this if you need to also provide 'view' permissions,
|
||||
# or if you want to provide custom permission codes.
|
||||
perms_map = {
|
||||
'GET': [],
|
||||
'GET': ['%(app_label)s.view_%(model_name)s'],
|
||||
'OPTIONS': [],
|
||||
'HEAD': [],
|
||||
'POST': ['%(app_label)s.add_%(model_name)s'],
|
||||
|
@ -266,7 +266,7 @@ class DjangoObjectPermissions(DjangoModelPermissions):
|
|||
provide a `.queryset` attribute.
|
||||
"""
|
||||
perms_map = {
|
||||
'GET': [],
|
||||
'GET': ['%(app_label)s.view_%(model_name)s'],
|
||||
'OPTIONS': [],
|
||||
'HEAD': [],
|
||||
'POST': ['%(app_label)s.add_%(model_name)s'],
|
||||
|
|
Loading…
Reference in New Issue
Block a user