@method_decorator(logged_in_or_basicauth(AUTH_REALM))
    @method_decorator(group_required(API_GROUP_NAME))  # FIXME: Should be more granular permissions
    def delete(self, request, code, suggested_format=None):
        # FIXME: should return 404 if file not found, 400 if no docrule exists.
        revision, hashcode, extra = self._get_info(request)
        processor = DocumentProcessor()
        options = {
            'revision': revision,
            'extension': suggested_format,
            'user': request.user,
        }
        log.debug('FileHandler.delete attempt with %s' % options)
        processor.delete(code, options)
        if len(processor.errors) > 0:
            log.error('Manager Errors encountered %s' % processor.errors)
            return Response(status=status.HTTP_400_BAD_REQUEST)
        log.info(
            'FileHandler.delete request fulfilled for code: %s, format: %s, rev: %s, hash: %s.'
            % (code, suggested_format, revision, hashcode)
        )
        return Response(status=status.HTTP_204_NO_CONTENT)
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/apps/api/views.py/FileHandler.delete/original