diff --git a/app/helpers/permission_helper.rb b/app/helpers/permission_helper.rb index d2b264af5..ed092bbb6 100644 --- a/app/helpers/permission_helper.rb +++ b/app/helpers/permission_helper.rb @@ -1058,12 +1058,8 @@ module PermissionHelper team.repositories.count < Constants::REPOSITORIES_LIMIT end - def can_view_repositories(team) - is_normal_user_or_admin_of_team(team) - end - def can_view_repository(repository) - is_normal_user_or_admin_of_team(repository.team) + is_member_of_team(repository.team) end def can_edit_and_destroy_repository(repository) diff --git a/app/views/shared/_secondary_navigation.html.erb b/app/views/shared/_secondary_navigation.html.erb index d1de50a94..75350d047 100644 --- a/app/views/shared/_secondary_navigation.html.erb +++ b/app/views/shared/_secondary_navigation.html.erb @@ -188,7 +188,7 @@ <% end %> - <% if can_view_repositories(@my_module.experiment.project.team) && + <% if can_view_team_repositories(@my_module.experiment.project.team) && @my_module.experiment.project.team.repositories.exists? %>