          # to the root view when using DefaultRouter.
          if getattr(view, '_ignore_model_permissions', False):
              return True
  
          if not request.user or (
             not request.user.is_authenticated and self.authenticated_users_only):
              return False
  
          queryset = self._queryset(view)
          perms = self.get_required_permissions(request.method, queryset.model)
  
          return request.user.has_perms(perms)
  
 
</s>
          # to the root view when using DefaultRouter.
          if getattr(view, '_ignore_model_permissions', False):
              return True
  




          queryset = self._queryset(view)
          perms = self.get_required_permissions(request.method, queryset.model)
  
          return request.user.has_perms(perms)
  
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Fix #8771 - Checking for authentication even if `_ignore_model_permissions = True` (#8772)
rest_framework/permissions.py