Merge pull request #1802 from mlorb/ml-sci-3470

Hide create office file button to user without permission [SCI-3470]
This commit is contained in:
mlorb 2019-05-30 14:27:19 +02:00 committed by GitHub
commit 111c062981
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@
<hr>
</div>
<div class="col-xs-12 attachments-actions">
<div class="title">
<h4>
<%= t('protocols.steps.files', count: assets.count) %>
@ -11,7 +11,8 @@
</div>
<div>
<div class="attachemnts-header pull-right">
<% if !(preview) %>
<% if !(preview) && (can_manage_protocol_in_module?(@protocol) ||
can_manage_protocol_in_repository?(@protocol)) %>
<%= render partial: '/assets/wopi/create_wopi_file_button.html.erb',
locals: { element_id: step.id, element_type: 'Step' } %>
<% end %>