Add read permission checks for protocols toolbar [SCI-8521]

This commit is contained in:
Martin Artnik 2023-05-29 11:23:14 +02:00
parent 1b1ecbfbaf
commit 701834d7b9

View file

@ -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'),