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

Cannot select "All Websites" on Manage Access page #2025

Closed
anonymous-matomo-user opened this issue Jan 16, 2011 · 1 comment
Closed

Cannot select "All Websites" on Manage Access page #2025

anonymous-matomo-user opened this issue Jan 16, 2011 · 1 comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. duplicate For issues that already existed in our issue tracker and were reported previously. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.

Comments

@anonymous-matomo-user
Copy link

In the "Users" tab of the settings for administrators, the Manage Access section has a menu from which you can select either "All websites" or an individual site for granting access to the list of users that follows the menu.

Selecting "All websites" always returns you to a page with the first (siteID = 1) site selected, not "All websites".

There are 2 problems here. One is easy to fix, the other I haven't investigated.

  1. The issue: UsersManagers/Controller.php (I have v. 3565) contains, on line 33:
$idSiteSelected = Piwik_Common::getRequestVar('idsite', $defaultWebsiteId, 'int');

But the VALUE attribute of the "All websites" option is "all" -- so we cannot attempt to cast it to an integer. If Piwik is going to allow the "magic" keyword "all" to imply "All Websites," we cannot check for an integer value.

FIX: Remove the 3rd parameter "int" and the code works fine. In any case, URL parameters in PHP are always strings, so it's usually more efficient to use "is_numeric" than to do weird double-castings like (int)(string) as Piwik_Common::getRequestVar() does.

  1. The URLs generated by the change handler of the menu seem to repeatedly append "siteID", so that subsequent changes in selection end up passing a URL that contains e.g. "&siteid=1&site=2&siteid=all".

I didn't even attempt to track this down.

PS: Mon francais n'est pas mal, mme si un peu rouill, si a vous convient mieux de repondre en franais. ;-)
Keywords: siteID access

@mattab
Copy link
Member

mattab commented Jan 16, 2011

already Fixed in trunk #1979

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. duplicate For issues that already existed in our issue tracker and were reported previously. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants