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:
authorStefan Giehl <stefan@piwik.org>2018-04-02 03:55:07 +0300
committerBenaka <diosmosis@users.noreply.github.com>2018-04-02 03:55:07 +0300
commitec2bb305723fbb43d302947c4833071a68ad4f93 (patch)
tree27763bbf384470e15f4cd35a70e5423943753500 /plugins/Overlay
parentf7cee04fb43ed21593745f543ea2efcab9bc04a9 (diff)
Check if user is already authenticated before reloading auth (#12688)
Diffstat (limited to 'plugins/Overlay')
-rw-r--r--plugins/Overlay/API.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/Overlay/API.php b/plugins/Overlay/API.php
index 750697a17f..22f11eba95 100644
--- a/plugins/Overlay/API.php
+++ b/plugins/Overlay/API.php
@@ -104,6 +104,10 @@ class API extends \Piwik\Plugin\API
/** Do cookie authentication. This way, the token can remain secret. */
private function authenticate($idSite)
{
+ if (Piwik::isUserHasViewAccess($idSite)) {
+ return; // user is already authenticated (e.g. API call with token_auth)
+ }
+
/**
* Triggered immediately before the user is authenticated.
*