Add shared inventories to smart annotation

This commit is contained in:
aignatov-bio 2020-09-21 14:36:34 +02:00
parent 9fda2dd97e
commit f8a28f378e
2 changed files with 4 additions and 1 deletions

View file

@ -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)

View file

@ -14,6 +14,9 @@
<div class=sci-btn-group>
<% repositories.each do |repository| %>
<button class="btn btn-light repository-object" data-object-id="<%= repository.id %>">
<% if repository.shared_with?(current_team) %>
<i class="fas fa-user-friends"></i>
<% end %>
<%= repository.name %>
</button>
<% end %>