From f8a28f378e0bcaf65db12d256f72b5a0e8d712cb Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 21 Sep 2020 14:36:34 +0200 Subject: [PATCH] Add shared inventories to smart annotation --- app/models/repository.rb | 2 +- app/views/shared/smart_annotation/_menu.html.erb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 50e4a0c95..f09d6c874 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -142,7 +142,7 @@ class Repository < RepositoryBase end def self.viewable_by_user(_user, teams) - where(team: teams) + accessible_by_teams(teams) end def self.name_like(query) diff --git a/app/views/shared/smart_annotation/_menu.html.erb b/app/views/shared/smart_annotation/_menu.html.erb index 3139bddd6..2540780ce 100644 --- a/app/views/shared/smart_annotation/_menu.html.erb +++ b/app/views/shared/smart_annotation/_menu.html.erb @@ -14,6 +14,9 @@
<% repositories.each do |repository| %> <% end %>