mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 11:57:16 +08:00
Enable Manage access for archived protocols [SCI-8453] (#5411)
This commit is contained in:
parent
9d98f81875
commit
43f571c154
3 changed files with 6 additions and 7 deletions
|
@ -182,7 +182,7 @@ module AccessPermissions
|
|||
end
|
||||
|
||||
def check_read_permissions
|
||||
render_403 unless can_read_protocol_in_repository?(@protocol)
|
||||
render_403 unless can_read_protocol_in_repository?(@protocol) || can_manage_team?(@protocol.team)
|
||||
end
|
||||
|
||||
def log_activity(type_of, message_items = {})
|
||||
|
|
|
@ -72,7 +72,6 @@ end
|
|||
Canaid::Permissions.register_for(Protocol) do
|
||||
%i(manage_protocol_in_repository
|
||||
manage_protocol_draft_in_repository
|
||||
manage_protocol_users
|
||||
clone_protocol_in_repository
|
||||
publish_protocol_in_repository
|
||||
delete_protocol_draft_in_repository
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
<template id="protocolActionToolbar">
|
||||
<button id="restoreProtocol" class="btn btn-light multiple-object-action hidden only-archive" data-url="<%= restore_protocols_path %>" data-for="restorable">
|
||||
<i class="fas fa-undo"></i>
|
||||
<span class="button-text"><%= t("protocols.index.action_toolbar.restore") %></span>
|
||||
</button>
|
||||
<button id="protocolVersions" class="btn btn-light single-object-action hidden only-active" data-for="readable">
|
||||
<%= image_tag 'icon/versions.svg' %>
|
||||
<span class="button-text"><%= t("protocols.index.action_toolbar.versions") %></span>
|
||||
</button>
|
||||
<button id="manageProtocolAccess" class="btn btn-light single-object-action hidden only-active">
|
||||
<button id="manageProtocolAccess" class="btn btn-light single-object-action hidden">
|
||||
<i class="fas fa-door-open"></i>
|
||||
<span class="button-text"><%= t("protocols.index.action_toolbar.access") %></span>
|
||||
</button>
|
||||
|
@ -19,10 +23,6 @@
|
|||
<i class="fas fa-archive"></i>
|
||||
<span class="button-text"><%= t("protocols.index.action_toolbar.archive") %></span>
|
||||
</button>
|
||||
<button id="restoreProtocol" class="btn btn-light multiple-object-action hidden only-archive" data-url="<%= restore_protocols_path %>" data-for="restorable">
|
||||
<i class="fas fa-undo"></i>
|
||||
<span class="button-text"><%= t("protocols.index.action_toolbar.restore") %></span>
|
||||
</button>
|
||||
<div class="emptyPlaceholder hidden">
|
||||
<%= t("protocols.index.action_toolbar.empty_placeholder") %>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue