      It ensures that the user is authenticated, and has the appropriate
      `add`/`change`/`delete` permissions on the model.
  
      This permission can only be applied against view classes that
      provide a `.model` or `.queryset` attribute.
      """
  
      # Map methods into required permission codes.
      # Override this if you need to also provide 'view' permissions,
      # or if you want to provide custom permission codes.
 
</s> remove         user = request.user
 </s> add  </s> remove         # Note that `.model` attribute on views is deprecated, although we
        # enforce the deprecation on the view `get_serializer_class()` and
        # `get_queryset()` methods, rather than here.
        model_cls = getattr(view, 'model', None)
 </s> add  </s> remove         if model_cls is None and queryset is not None:
            model_cls = queryset.model

 </s> add  </s> remove         model_cls = getattr(view, 'model', None)
        queryset = getattr(view, 'queryset', None)

        if model_cls is None and queryset is not None:
            model_cls = queryset.model
 </s> add         model_cls = view.queryset.model
        user = request.user
    provide a `.queryset` attribute.
      It ensures that the user is authenticated, and has the appropriate
      `add`/`change`/`delete` permissions on the model.
  
      This permission can only be applied against view classes that
    provide a `.queryset` attribute.
      """
  
      # Map methods into required permission codes.
      # Override this if you need to also provide 'view' permissions,
      # or if you want to provide custom permission codes.
keep keep keep keep replace keep keep keep keep keep
 Removed deprecated '.model' attribute check 
rest_framework/permissions.py