Changes the host for the download and redirect paths

This commit is contained in:
Nejc Bernot 2017-07-05 10:23:10 +02:00
parent 91fe7fe4ad
commit 803934e07d
2 changed files with 4 additions and 4 deletions

View file

@ -70,11 +70,11 @@ class WopiController < ActionController::Base
UserCanNotWriteRelative: true,
CloseUrl: @close_url,
DownloadUrl: url_for(controller: 'assets', action: 'download',
id: @asset.id),
id: @asset.id, host: ENV['WOPI_BREADCRUMBS_HOST']),
HostEditUrl: url_for(controller: 'assets', action: 'edit',
id: @asset.id),
id: @asset.id, host: ENV['WOPI_BREADCRUMBS_HOST']),
HostViewUrl: url_for(controller: 'assets', action: 'view',
id: @asset.id),
id: @asset.id, host: ENV['WOPI_BREADCRUMBS_HOST']),
BreadcrumbBrandName: @breadcrumb_brand_name,
BreadcrumbBrandUrl: @breadcrumb_brand_url,
BreadcrumbFolderName: @breadcrumb_folder_name,

View file

@ -380,7 +380,7 @@ class Asset < ActiveRecord::Base
action = get_action(file_ext, action)
if !action.nil?
action_url = action.urlsrc
if (ENV['WOPI_BUSINESS_USERS'])
if (ENV['WOPI_BUSINESS_USERS'] && ENV['WOPI_BUSINESS_USERS']=='true' )
action_url = action_url.gsub(/<IsLicensedUser=BUSINESS_USER&>/,
'IsLicensedUser=1&')
action_url = action_url.gsub(/<IsLicensedUser=BUSINESS_USER>/,