mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-01 09:24:59 +08:00
Merge pull request #1156 from okriuchykhin/ok_SCI_2342
Enable editing office online files in inventories [SCI-2342]
This commit is contained in:
commit
7b08529e39
2 changed files with 7 additions and 7 deletions
|
@ -64,7 +64,7 @@ class AssetsController < ApplicationController
|
|||
'preview-icon' => render_to_string(
|
||||
partial: 'shared/file_preview_icon.html.erb',
|
||||
locals: { asset: @asset }
|
||||
)
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -76,7 +76,7 @@ class AssetsController < ApplicationController
|
|||
elsif @assoc.class == Result
|
||||
can_manage_module?(@my_module)
|
||||
elsif @assoc.class == RepositoryCell
|
||||
# TBD
|
||||
can_manage_repository_rows?(@repository.team)
|
||||
end
|
||||
response_json['wopi-controls'] = render_to_string(
|
||||
partial: 'shared/file_wopi_controlls.html.erb',
|
||||
|
@ -141,8 +141,8 @@ class AssetsController < ApplicationController
|
|||
@protocol = @asset.step.protocol
|
||||
elsif @assoc.class == Result
|
||||
@my_module = @assoc.my_module
|
||||
else
|
||||
# TBD
|
||||
elsif @assoc.class == RepositoryCell
|
||||
@repository = @assoc.repository_column.repository
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -153,7 +153,7 @@ class AssetsController < ApplicationController
|
|||
elsif @assoc.class == Result
|
||||
render_403 and return unless can_read_experiment?(@my_module.experiment)
|
||||
elsif @assoc.class == RepositoryCell
|
||||
# TBD
|
||||
render_403 and return unless can_read_team?(@repository.team)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -164,7 +164,7 @@ class AssetsController < ApplicationController
|
|||
elsif @assoc.class == Result
|
||||
render_403 and return unless can_manage_module?(@my_module)
|
||||
elsif @assoc.class == RepositoryCell
|
||||
# TBD
|
||||
render_403 and return unless can_manage_repository_rows?(@repository.team)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ module WopiUtil
|
|||
end
|
||||
|
||||
activity.save
|
||||
else
|
||||
elsif @assoc.class == Result
|
||||
Activity.create(
|
||||
type_of: :start_edit_wopi_file,
|
||||
user: current_user,
|
||||
|
|
Loading…
Add table
Reference in a new issue