Merge pull request #2858 from aignatov-bio/ai-sci-5035-fix-smart-annotation-for-shared-inventories

Add shared inventories to smart annotation [SCI-5035]
This commit is contained in:
aignatov-bio 2020-09-22 10:20:20 +02:00 committed by GitHub
commit b540f90514
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 %>