@method_decorator(logged_in_or_basicauth(AUTH_REALM))
    @method_decorator(group_required(API_GROUP_NAME))  # FIXME: Should be more granular permissions
    def get(self, request, code, suggested_format=None):
        revision, hashcode, extra = self._get_info(request)
        only_metadata = True
        indexing_data = extra.get('indexing_data', None)
        # Security measure for variable
        if indexing_data:
            indexing_data = True
            only_metadata = False
        processor = DocumentProcessor()
        options = {
            'revision': revision,
            'hashcode': hashcode,
            'only_metadata': only_metadata,
            'extension': suggested_format,
            'indexing_data': indexing_data,
            'user': request.user,
        }
        document = processor.read(code, options)
        if document.marked_deleted:
            log.error('FileInfoHandler.read request to marked deleted document: %s' % code)
            return Response(status=status.HTTP_404_NOT_FOUND)
        if processor.errors:
            log.error('FileInfoHandler.read errors: %s' % processor.errors)
            if settings.DEBUG:
                raise Exception('FileInfoHandler.read manager.errors')
            else:
                return Response(status=status.HTTP_400_BAD_REQUEST)
        info = DMSOBjectRevisionsData(document).jsons
        log.info(
            'FileInfoHandler.read request fulfilled for %s, ext %s, rev %s, hash %s'
            % (code, suggested_format, revision, hashcode)
        )
        return Response(info, status=status.HTTP_200_OK)
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/apps/api/views.py/FileInfoHandler.get/original