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

Check for super user access when cleaning visitor details. #12687

Closed
wants to merge 1 commit into from

Conversation

letharion
Copy link
Contributor

The comment for cleanVisitorDetails() says that the function checks for Super User or admin access, this adds the Super User check.

The comment for cleanVisitorDetails() says that the function checks for Super User or admin access, this adds the Super User check.
@sgiehl
Copy link
Member

sgiehl commented Mar 30, 2018

Not sure if the comment might be incorrect in this case. Removing those values for all users might have other results than expected. Without the visitorId / userid features like the visitorprofile might not work...

@letharion
Copy link
Contributor Author

letharion commented Mar 30, 2018

In my case, I was doing something like this:

Piwik::doAsSuperUser(function () {
  return \Piwik\API\Request::processRequest('Live.getLastVisitsDetails'

and these values were removed, which surprised me since I used doAsSuperUser.

@mattab
Copy link
Member

mattab commented Apr 23, 2018

Hi @letharion
Thanks for the PR. In this case as per @sgiehl comment, we couldn't make the change. Maybe instead we should fix the functions doAsSuperUser/ isUserIsAnonymous so they work as expected together?

@letharion
Copy link
Contributor Author

@mattab Thank you for your comment. I've made another attempt here: #12766 Is this the sort of check you meant?

@letharion
Copy link
Contributor Author

I could update the comment instead then, in case it's incorrect, if that's desirable?

@sgiehl You said Removing those values for all users but that appears to be a misunderstanding. I'm not removing the values for anyone, I'm making sure they remain when the user has super access.

@mattab
Copy link
Member

mattab commented Apr 23, 2018

@letharion Yes I meant this 👍 #12766

@mattab mattab closed this Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants