diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2019-03-10 19:07:39 +0300 |
---|---|---|
committer | Stefan Giehl <stefan@matomo.org> | 2019-03-10 19:07:39 +0300 |
commit | 7148c64698f09040e13149cfe5de27cebba07923 (patch) | |
tree | 6f3414ebade2be390c68658fef240158434aaa97 /plugins/Morpheus | |
parent | c9bc3e3e949d7bb8ccf8ff6e6271cfd823e5656b (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/Morpheus')
-rw-r--r-- | plugins/Morpheus/javascripts/ajaxHelper.js | 2 | ||||
-rw-r--r-- | plugins/Morpheus/templates/_jsGlobalVariables.twig | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/plugins/Morpheus/javascripts/ajaxHelper.js b/plugins/Morpheus/javascripts/ajaxHelper.js index 743ac28dee..05c66097d8 100644 --- a/plugins/Morpheus/javascripts/ajaxHelper.js +++ b/plugins/Morpheus/javascripts/ajaxHelper.js @@ -489,7 +489,7 @@ function ajaxHelper() { }; this._getDefaultPostParams = function () { - if (this.withToken || this._isRequestToApiMethod() || this._isWidgetizedRequest()) { + if (this.withToken || this._isRequestToApiMethod() || piwik.shouldPropagateTokenAuth) { return { token_auth: piwik.token_auth }; diff --git a/plugins/Morpheus/templates/_jsGlobalVariables.twig b/plugins/Morpheus/templates/_jsGlobalVariables.twig index 95e4742f60..a02116d62f 100644 --- a/plugins/Morpheus/templates/_jsGlobalVariables.twig +++ b/plugins/Morpheus/templates/_jsGlobalVariables.twig @@ -49,5 +49,6 @@ {% if clientSideConfig is defined %} piwik.config = {{ clientSideConfig|json_encode|raw }}; {% endif %} + piwik.shouldPropagateTokenAuth = {{ shouldPropagateTokenAuth|json_encode|raw }}; {{ postEvent("Template.jsGlobalVariables") }} </script> |