Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrading to 1.4, Live Plugin embeded as a widget causes user to be redirected to Piwik login screen #2416

Closed
jonpasquier opened this issue May 9, 2011 · 5 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@jonpasquier
Copy link

I have embeded the Live Plugin as a widget (iframe) into an external website.
Since I have updated to the 1.4 version of Piwik, whenever a user enter on the page where the widget is embeded, he is redirected to the Piwik login screen with en error message "you cannot access this resource, a 'view' permission on site XX is required".

It seems that the problem comes from the controller of the Live plugin which makes calls to Piwik_API and Piwik_Live_API without having authenticated the user.

Here is a patch that ensures that the authentication token is used to authenticate user before starting to use the API.
Keywords: live widget

@jonpasquier
Copy link
Author

Attachment:
live_plugin_token_auth_for_api_calls.patch

@mattab
Copy link
Member

mattab commented May 10, 2011

Does it still work when the token auth is not passed, ie. in the normal dashboard?

@jonpasquier
Copy link
Author

Yes, it does work.
If you are logged in Piwik and go to the page with the embedded widget, it works as well.

It seems that the problem comes from some functions in the Piwik_Live_API that check whether the user has view access to the site before doing anything.

@mattab
Copy link
Member

mattab commented May 10, 2011

OK Thanks for the patch, we'll try and commit it for the next release

@mattab
Copy link
Member

mattab commented May 29, 2011

(In [4827]) Fixes #2416 - Kuddos jpasquier for the patch

@jonpasquier jonpasquier added this to the 1.5 - Piwik 1.5 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants