mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Fix repository view permissions for team guests [SCI-1345]
This commit is contained in:
parent
f3f1a68070
commit
2d693a3fb7
2 changed files with 2 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -188,7 +188,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<% 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? %>
|
||||
<li id="repositories-nav-tab" class="<%= "active" if module_repository_page? %>">
|
||||
<a href="#" id="repositoriesDropdownMenuLink" title="<%=t "nav2.modules.repositories" %>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
|
Loading…
Reference in a new issue