docs: def _check_permission(self, name, obj=None):
          """
          If customer is not authorized he should not get information that object is exists.
          Therefore 403 is returned if object was not found or is redirected to the login page.
          If custmer is authorized and object was not found is returned 404.
          If object was found and user is not authorized is returned 403 or redirect to login page.
          If object was found and user is authorized is returned 403 or 200 according of result of _has_permission method.
          """
          def redirect_or_exception(ex):
              if not self.request.user or not self.request.user.is_authenticated:
                  if self.auto_login_redirect:
                      redirect_to_login(self.request.get_full_path())
                  else:
                      raise HTTPUnauthorizedResponseException
              else:
                  raise ex
  
          try:
              if not self._has_permission(name, obj):
                  redirect_or_exception(HTTPForbiddenResponseException)
          except Http404 as ex:
              redirect_or_exception(ex)