diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index c0d98a519..ad52a3b0a 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -107,7 +107,7 @@ def account @user_ontologies = @user.customOntology @user_ontologies ||= [] - @admin_ontologies = LinkedData::Client::Models::Ontology.where do |o| + @admin_ontologies = LinkedData::Client::Models::Ontology.where(include_views: true) do |o| o.administeredBy.include? @user.id end @admin_ontologies.sort! { |a, b| a.name.downcase <=> b.name.downcase } diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index a65b0eee3..afffe9539 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -21,7 +21,7 @@ def show @user_ontologies = @user.customOntology # Copied from home controller, account action - @admin_ontologies = LinkedData::Client::Models::Ontology.where do |o| + @admin_ontologies = LinkedData::Client::Models::Ontology.where(include_views: true) do |o| o.administeredBy.include? @user.id end @admin_ontologies.sort! { |a, b| a.name.downcase <=> b.name.downcase } diff --git a/config/application.rb b/config/application.rb index 8a1fe795a..e59dd58e2 100644 --- a/config/application.rb +++ b/config/application.rb @@ -10,6 +10,10 @@ module BioportalWebUi class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.0 + config.active_record.yaml_column_permitted_classes = [ + ActionController::Parameters, + HashWithIndifferentAccess + ] # permitted locales available for the application config.i18n.available_locales = [:en, :fr, :it, :de]