From 701834d7b96e7ab59bfd3e55edad6343bf93f861 Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Mon, 29 May 2023 11:23:14 +0200 Subject: [PATCH] Add read permission checks for protocols toolbar [SCI-8521] --- app/services/toolbars/protocols_service.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/services/toolbars/protocols_service.rb b/app/services/toolbars/protocols_service.rb index f1d47b757..3bffcb7c8 100644 --- a/app/services/toolbars/protocols_service.rb +++ b/app/services/toolbars/protocols_service.rb @@ -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'),