          """
          Runs anything that needs to occur prior to calling the method handlers.
          """
          self.format = self.get_format_suffix(**kwargs)
          self.check_permissions(request)
          self.check_throttles(request)
          self.renderer, self.accepted_media_type = self.perform_content_negotiation(request)
  
      def finalize_response(self, request, response, *args, **kwargs):
          """
 
</s> remove         self.check_permissions(self.request, obj)
 </s> add         if not self.has_permission(self.request, obj):
            self.permission_denied(self.request) </s> remove         if not hasattr(self.view, 'get_serializer'):  # No serializer, no form.
            return
 </s> add         if not method in view.allowed_methods:
            return  # Not a valid method

        if not api_settings.FORM_METHOD_OVERRIDE:
            return  # Cannot use form overloading

        temp = request._method
        request._method = method.upper()
        if not view.has_permission(request):
            request._method = temp
            return  # Don't have permission
        request._method = temp

        if method == 'DELETE' or method == 'OPTIONS':
            return True  # Don't actually need to return a form

        if not getattr(view, 'get_serializer', None):
            return self.get_generic_content_form(view)
 </s> remove     def _get_generic_content_form(self, view):
 </s> add     def get_generic_content_form(self, view): </s> remove     def _get_form_instance(self, view, method):
 </s> add     def get_form(self, view, method, request): </s> remove     def check_permissions(self, request, obj=None):
 </s> add     def has_permission(self, request, obj=None):
        if not self.has_permission(request):
            self.permission_denied(request)
          """
          Runs anything that needs to occur prior to calling the method handlers.
          """
          self.format = self.get_format_suffix(**kwargs)
        if not self.has_permission(request):
            self.permission_denied(request)
          self.check_throttles(request)
          self.renderer, self.accepted_media_type = self.perform_content_negotiation(request)
  
      def finalize_response(self, request, response, *args, **kwargs):
          """
keep keep keep keep replace keep keep keep keep keep
 Only display forms when user has permissions.  #159 
rest_framework/views.py