mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 03:35:25 +08:00
Add read permission checks for protocols toolbar [SCI-8521]
This commit is contained in:
parent
1b1ecbfbaf
commit
701834d7b9
1 changed files with 4 additions and 0 deletions
|
@ -33,6 +33,8 @@ module Toolbars
|
|||
def versions_action
|
||||
return unless @single
|
||||
|
||||
return unless can_read_protocol_in_repository?(@protocols.first)
|
||||
|
||||
{
|
||||
name: 'versions',
|
||||
label: I18n.t('protocols.index.toolbar.versions'),
|
||||
|
@ -82,6 +84,8 @@ module Toolbars
|
|||
def export_action
|
||||
return unless @single
|
||||
|
||||
return unless can_read_protocol_in_repository?(@protocols.first)
|
||||
|
||||
{
|
||||
name: 'export',
|
||||
label: I18n.t('protocols.index.toolbar.export'),
|
||||
|
|
Loading…
Reference in a new issue