This commit is contained in:
Nik 2016-09-29 10:38:36 +00:00 committed by GitHub
commit 063873fac4

View File

@ -88,9 +88,7 @@ class SchemaGenerator(object):
if request is not None:
view.request = clone_request(request, method)
try:
view.check_permissions(view.request)
except exceptions.APIException:
if not self.check_view_permission(view):
continue
else:
view.request = None
@ -165,6 +163,13 @@ class SchemaGenerator(object):
return True
def check_view_permission(self, view):
try:
view.check_permissions(view.request)
except exceptions.APIException:
return False
return True
def get_allowed_methods(self, callback):
"""
Return a list of the valid HTTP methods for this endpoint.