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

def check_permissions(self, request):

    for permission in self.get_permissions():
        if (not permission.has_permission(request, self)):
            self.permission_denied(request, message=getattr(permission, u'message', None))
