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