MCPcopy Index your code
hub / github.com/encode/django-rest-framework / check_permissions

Method check_permissions

rest_framework/views.py:332–343  ·  view source on GitHub ↗

Check if the request should be permitted. Raises an appropriate exception if the request is not permitted.

(self, request)

Source from the content-addressed store, hash-verified

330 request.user
331
332 def check_permissions(self, request):
333 """
334 Check if the request should be permitted.
335 Raises an appropriate exception if the request is not permitted.
336 """
337 for permission in self.get_permissions():
338 if not permission.has_permission(request, self):
339 self.permission_denied(
340 request,
341 message=getattr(permission, 'message', None),
342 code=getattr(permission, 'code', None)
343 )
344
345 def check_object_permissions(self, request, obj):
346 """

Callers 4

initialMethod · 0.95
show_form_for_methodMethod · 0.45
determine_actionsMethod · 0.45
has_view_permissionsMethod · 0.45

Calls 3

get_permissionsMethod · 0.95
permission_deniedMethod · 0.95
has_permissionMethod · 0.45

Tested by

no test coverage detected