

def get_models(self, principals):
    principals = set(principals)
    models = self._db['models'].items()
    return [{
        'id': id,
        'title': m['definition'].get('title', id),
        'description': m['definition'].get('description', ''),
    } for (id, m) in models if (principals.intersection(m['permissions']['read_definition']) != set())]

dataset/ETHPy150Open spiral-project/daybed/daybed/backends/memory/__init__.py MemoryBackend.get_models/original