mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-12 09:20:45 +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
|
def versions_action
|
||||||
return unless @single
|
return unless @single
|
||||||
|
|
||||||
|
return unless can_read_protocol_in_repository?(@protocols.first)
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'versions',
|
name: 'versions',
|
||||||
label: I18n.t('protocols.index.toolbar.versions'),
|
label: I18n.t('protocols.index.toolbar.versions'),
|
||||||
|
|
@ -82,6 +84,8 @@ module Toolbars
|
||||||
def export_action
|
def export_action
|
||||||
return unless @single
|
return unless @single
|
||||||
|
|
||||||
|
return unless can_read_protocol_in_repository?(@protocols.first)
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'export',
|
name: 'export',
|
||||||
label: I18n.t('protocols.index.toolbar.export'),
|
label: I18n.t('protocols.index.toolbar.export'),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue