@method_decorator(logged_in_or_basicauth(AUTH_REALM))
    def get(self, request):

        if not request.user.is_authenticated():
            log.error('ParallelKeysHandler.read attempted with unauthenticated user.')
            return Response(status=status.HTTP_401_UNAUTHORIZED)

        mdts_ids = None
        docrule_id = request.GET.get('docrule', None)
        key_name = request.GET.get('key', None)
        autocomplete_req = request.GET.get('req', None)

        if not docrule_id:
            mdts_ids = request.GET.get('mdt_ids', None)
            if not mdts_ids:
                return Response([], status=status.HTTP_400_BAD_REQUEST)

        if (docrule_id or mdts_ids) and key_name and autocomplete_req:
            manager = MetaDataTemplateManager()
            if mdts_ids:
                doc_mdts = manager.get_mdts_by_name(mdts_ids)
            else:
                doc_mdts = manager.get_mdts_for_docrule(docrule_id)
            resp = process_pkeys_request(docrule_id, key_name, autocomplete_req, doc_mdts)
            return Response(resp)
        else:
            return Response(status=status.HTTP_404_NOT_FOUND)
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/apps/api/views.py/ParallelKeysHandler.get/original