mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 11:45:18 +08:00
Merge pull request #5505 from artoscinote/ma_SCI_8521
Add read permission checks for protocols toolbar [SCI-8521]
This commit is contained in:
commit
a562cd8c5b
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