Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2019-03-10 19:07:39 +0300
committerStefan Giehl <stefan@matomo.org>2019-03-10 19:07:39 +0300
commit7148c64698f09040e13149cfe5de27cebba07923 (patch)
tree6f3414ebade2be390c68658fef240158434aaa97 /plugins/Overlay/templates
parentc9bc3e3e949d7bb8ccf8ff6e6271cfd823e5656b (diff)
Propagate token auth in ajax requests for widgetized reports AND enable_framed_pages = 1. (#14133)
* Propagate token auth in ajax requests if something is widgetized OR if enable_framed_pages is set to 1. * Add UI tests for embedding entire app. * Forgot to add file. * Adds missing UI file
Diffstat (limited to 'plugins/Overlay/templates')
-rw-r--r--plugins/Overlay/templates/index.twig4
-rw-r--r--plugins/Overlay/templates/index_noframe.twig3
2 files changed, 7 insertions, 0 deletions
diff --git a/plugins/Overlay/templates/index.twig b/plugins/Overlay/templates/index.twig
index 60c64e0081..ff58a50803 100644
--- a/plugins/Overlay/templates/index.twig
+++ b/plugins/Overlay/templates/index.twig
@@ -68,6 +68,10 @@
Piwik_Overlay.siteUrls = {{ siteUrls|json_encode|raw }};
var iframeSrc = 'index.php?module=Overlay&action=startOverlaySession&idSite={{ idSite }}&period={{ period }}&date={{ rawDate }}&segment={{ segment }}';
+ if (piwik.shouldPropagateTokenAuth) {
+ iframeSrc += '&token_auth=' + piwik.token_auth;
+ }
+
Piwik_Overlay.init(iframeSrc, '{{ idSite }}', '{{ period }}', '{{ rawDate }}', '{{ segment }}');
window.Piwik_Overlay_Translations = {
diff --git a/plugins/Overlay/templates/index_noframe.twig b/plugins/Overlay/templates/index_noframe.twig
index f3c9e61579..78c18bf281 100644
--- a/plugins/Overlay/templates/index_noframe.twig
+++ b/plugins/Overlay/templates/index_noframe.twig
@@ -7,6 +7,9 @@
<script type="text/javascript">
var newLocation = 'index.php?module=Overlay&action=startOverlaySession&idSite={{ idSite }}&period={{ period }}&date={{ date }}&segment={{ segment }}';
+ if (piwik.shouldPropagateTokenAuth) {
+ newLocation += '&token_auth=' + piwik.token_auth;
+ }
var locationParts = window.location.href.split('#');
if (locationParts.length > 1) {