Merge pull request #5505 from artoscinote/ma_SCI_8521

Add read permission checks for protocols toolbar [SCI-8521]
This commit is contained in:
artoscinote 2023-05-29 11:25:59 +02:00 committed by GitHub
commit a562cd8c5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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