@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, id_rule):
        operator = PluginsOperator()
        try:
            mapping = operator.get_plugin_mapping_by_docrule_id(id_rule)
        except DmsException:
            log.error('RulesDetailHandler.read DmsException: Rule not found. 404')
            if settings.DEBUG:
                raise
            else:
                return Response(status=status.HTTP_400_BAD_REQUEST)
        # Removing mapping key that is not json serializable.
        resp_data = dict(
            active=mapping.active,
            doccode_id=mapping.doccode_id,
            id=mapping.id,
            doccode=mapping.doccode.title,
            before_retrieval_plugins=[plugin.name for plugin in mapping.before_retrieval_plugins.all()],
            storage_plugins=[plugin.name for plugin in mapping.storage_plugins.all()],
            database_storage_plugins=[plugin.name for plugin in mapping.database_storage_plugins.all()],
            before_removal_plugins=[plugin.name for plugin in mapping.before_removal_plugins.all()],
            before_storage_plugins=[plugin.name for plugin in mapping.before_storage_plugins.all()],
        )
        log.info('RulesDetailHandler.read request fulfilled for rule %s' % id_rule)
        return Response(json.dumps(resp_data), status=status.HTTP_200_OK)
Search upward from the starting path (or the current directory)
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/apps/api/views.py/RulesDetailHandler.get--crossover with--dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/util/file_util.py/find_up