cloudsuite: revert route showLOleaflet
With the current layout changes, showLOleaflet is no longer need it.
This commit is contained in:
parent
525b1ab4d0
commit
48cba261ec
@ -48,7 +48,6 @@ class Application extends App {
|
|||||||
$c->query('Request'),
|
$c->query('Request'),
|
||||||
$c->query('CoreConfig'),
|
$c->query('CoreConfig'),
|
||||||
$c->query('L10N'),
|
$c->query('L10N'),
|
||||||
$c->query('URLGenerator'),
|
|
||||||
$c->query('UserId')
|
$c->query('UserId')
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -85,8 +84,5 @@ class Application extends App {
|
|||||||
$uid = is_null($user) ? '' : $user->getUID();
|
$uid = is_null($user) ? '' : $user->getUID();
|
||||||
return $uid;
|
return $uid;
|
||||||
});
|
});
|
||||||
$container->registerService('URLGenerator', function ($c) {
|
|
||||||
return $c->query('ServerContainer')->getUrlGenerator();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,6 @@ $application->registerRoutes($this, [
|
|||||||
['name' => 'document#rename', 'url' => 'ajax/documents/rename/{fileId}', 'verb' => 'POST'],
|
['name' => 'document#rename', 'url' => 'ajax/documents/rename/{fileId}', 'verb' => 'POST'],
|
||||||
['name' => 'document#listAll', 'url' => 'ajax/documents/list', 'verb' => 'GET'],
|
['name' => 'document#listAll', 'url' => 'ajax/documents/list', 'verb' => 'GET'],
|
||||||
['name' => 'document#download', 'url' => 'ajax/download.php', 'verb' => 'GET'],
|
['name' => 'document#download', 'url' => 'ajax/download.php', 'verb' => 'GET'],
|
||||||
['name' => 'document#showLOleaflet', 'url' => '/loleaflet', 'verb' => 'GET'],
|
|
||||||
//documents - for CloudSuite access
|
//documents - for CloudSuite access
|
||||||
['name' => 'document#localLoad', 'url' => 'ajax/documents/load/{esId}', 'verb' => 'POST'],
|
['name' => 'document#localLoad', 'url' => 'ajax/documents/load/{esId}', 'verb' => 'POST'],
|
||||||
//settings
|
//settings
|
||||||
|
@ -27,24 +27,21 @@ use \OCA\Documents\DownloadResponse;
|
|||||||
use \OCA\Documents\File;
|
use \OCA\Documents\File;
|
||||||
use OCA\Documents\Genesis;
|
use OCA\Documents\Genesis;
|
||||||
use \OC\Files\View;
|
use \OC\Files\View;
|
||||||
use OCP\IURLGenerator;
|
|
||||||
|
|
||||||
class DocumentController extends Controller{
|
class DocumentController extends Controller{
|
||||||
|
|
||||||
private $uid;
|
private $uid;
|
||||||
private $l10n;
|
private $l10n;
|
||||||
private $settings;
|
private $settings;
|
||||||
private $urlGenerator;
|
|
||||||
|
|
||||||
const ODT_TEMPLATE_PATH = '/assets/new.odt';
|
const ODT_TEMPLATE_PATH = '/assets/new.odt';
|
||||||
const CLOUDSUITE_TMP_PATH = '/documents-tmp/';
|
const CLOUDSUITE_TMP_PATH = '/documents-tmp/';
|
||||||
|
|
||||||
public function __construct($appName, IRequest $request, IConfig $settings, IL10N $l10n, IURLGenerator $urlGenerator, $uid){
|
public function __construct($appName, IRequest $request, IConfig $settings, IL10N $l10n, $uid){
|
||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
$this->uid = $uid;
|
$this->uid = $uid;
|
||||||
$this->l10n = $l10n;
|
$this->l10n = $l10n;
|
||||||
$this->settings = $settings;
|
$this->settings = $settings;
|
||||||
$this->urlGenerator = $urlGenerator;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -248,29 +245,4 @@ class DocumentController extends Controller{
|
|||||||
'status' => 'success', 'documents' => $documents,'sessions' => $sessions,'members' => $members
|
'status' => 'success', 'documents' => $documents,'sessions' => $sessions,'members' => $members
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @PublicPage
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* @return TemplateResponse
|
|
||||||
*/
|
|
||||||
public function showLOleaflet() {
|
|
||||||
$params = [
|
|
||||||
'urlGenerator' => $this->urlGenerator
|
|
||||||
];
|
|
||||||
$response = new TemplateResponse($this->appName, '3rdparty/cloudsuite/assets/cloudsuite', $params, 'blank');
|
|
||||||
|
|
||||||
$policy = new ContentSecurityPolicy();
|
|
||||||
$policy->addAllowedChildSrcDomain('\'self\' http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js http://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js \'unsafe-eval\'');
|
|
||||||
$policy->addAllowedScriptDomain('\'self\' http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js http://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js \'unsafe-eval\'');
|
|
||||||
$policy->addAllowedFrameDomain('\'self\' http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js http://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js \'unsafe-eval\'');
|
|
||||||
$policy->addAllowedConnectDomain('ws://' . $_SERVER['SERVER_NAME'] . ':9980');
|
|
||||||
$policy->addAllowedImageDomain('*');
|
|
||||||
$policy->allowInlineScript(true);
|
|
||||||
$policy->addAllowedFontDomain('data:');
|
|
||||||
$response->setContentSecurityPolicy($policy);
|
|
||||||
|
|
||||||
return $response;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user