mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-09 21:36:44 +08:00
Match protocol template print permissions to show [SCI-8803] (#5726)
This commit is contained in:
parent
34c7a3219c
commit
8fb14645bf
1 changed files with 1 additions and 3 deletions
|
@ -15,6 +15,7 @@ class ProtocolsController < ApplicationController
|
||||||
before_action :check_clone_permissions, only: [:clone]
|
before_action :check_clone_permissions, only: [:clone]
|
||||||
before_action :check_view_permissions, only: %i(
|
before_action :check_view_permissions, only: %i(
|
||||||
show
|
show
|
||||||
|
print
|
||||||
versions_modal
|
versions_modal
|
||||||
protocol_status_bar
|
protocol_status_bar
|
||||||
linked_children
|
linked_children
|
||||||
|
@ -100,9 +101,6 @@ class ProtocolsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def print
|
def print
|
||||||
@protocol = Protocol.find(params[:id])
|
|
||||||
render_403 && return unless @protocol.my_module.blank? || can_read_protocol_in_module?(@protocol)
|
|
||||||
|
|
||||||
render layout: 'protocols/print'
|
render layout: 'protocols/print'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue