From 09645da09177bd16033feb5f6e4db79432e8ac90 Mon Sep 17 00:00:00 2001 From: Imad Bourouche Date: Fri, 31 Jan 2025 10:38:49 +0100 Subject: [PATCH] get only public ontologies --- lib/ontologies_linked_data/models/mod/semantic_artefact.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ontologies_linked_data/models/mod/semantic_artefact.rb b/lib/ontologies_linked_data/models/mod/semantic_artefact.rb index 98919381..b8aeb65d 100644 --- a/lib/ontologies_linked_data/models/mod/semantic_artefact.rb +++ b/lib/ontologies_linked_data/models/mod/semantic_artefact.rb @@ -192,9 +192,9 @@ def bring(*attributes) def self.all_artefacts(options = {}) onts = if options[:also_include_views] - Ontology.where.to_a + Ontology.where(viewingRestriction: 'public').to_a else - Ontology.where.filter(Goo::Filter.new(:viewOf).unbound).include(:acronym).to_a + Ontology.where(viewingRestriction: 'public').filter(Goo::Filter.new(:viewOf).unbound).include(:acronym).to_a end onts.map do |o|