mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 15:05:26 +08:00
Merge pull request #1019 from okriuchykhin/ok_SCI_2134
Remove extra permission checks from WOPI buttons [SCI-2134][SCI-2133]
This commit is contained in:
commit
c0cfa6e7fe
1 changed files with 2 additions and 4 deletions
|
@ -28,8 +28,7 @@ module WopiHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def wopi_asset_view_button(asset)
|
def wopi_asset_view_button(asset)
|
||||||
if can_read_experiment?(result.my_module.experiment) &&
|
if asset.can_perform_action('view')
|
||||||
asset.can_perform_action('view')
|
|
||||||
link_to view_asset_url(id: asset),
|
link_to view_asset_url(id: asset),
|
||||||
class: 'btn btn-default btn-sm',
|
class: 'btn btn-default btn-sm',
|
||||||
target: '_blank',
|
target: '_blank',
|
||||||
|
@ -41,8 +40,7 @@ module WopiHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def wopi_asset_edit_button(asset)
|
def wopi_asset_edit_button(asset)
|
||||||
if can_manage_module?(result.my_module) &&
|
if asset.can_perform_action('edit')
|
||||||
asset.can_perform_action('edit')
|
|
||||||
link_to edit_asset_url(id: asset),
|
link_to edit_asset_url(id: asset),
|
||||||
class: 'btn btn-default btn-sm',
|
class: 'btn btn-default btn-sm',
|
||||||
target: '_blank',
|
target: '_blank',
|
||||||
|
|
Loading…
Reference in a new issue