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/CoreHome/angularjs/common | |
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/CoreHome/angularjs/common')
-rw-r--r-- | plugins/CoreHome/angularjs/common/services/piwik-api.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins/CoreHome/angularjs/common/services/piwik-api.js b/plugins/CoreHome/angularjs/common/services/piwik-api.js index 7a9f729963..04160d5ee1 100644 --- a/plugins/CoreHome/angularjs/common/services/piwik-api.js +++ b/plugins/CoreHome/angularjs/common/services/piwik-api.js @@ -47,10 +47,6 @@ var hasBlockedContent = false; return getParams && getParams['module'] === 'API' && getParams['method']; } - function isWidgetizedRequest() { - return (broadcast.getValueFromUrl('module') == 'Widgetize'); - } - function reset () { getParams = {}; postParams = {}; @@ -188,7 +184,7 @@ var hasBlockedContent = false; * @private */ function getPostParams (params) { - if (isRequestToApiMethod() || isWidgetizedRequest()) { + if (isRequestToApiMethod() || piwik.shouldPropagateTokenAuth) { params.token_auth = piwik.token_auth; } |