apeisa / UserGroups

Adds users groups and page based permission to ProcessWire
GNU General Public License v2.0
11 stars 4 forks source link

Problems when finding users in templates #24

Closed apeisa closed 10 years ago

apeisa commented 10 years ago

Probably all other admin pages too. Now when UserGroups is enabled you need to add check_access=0 if you want to find $users for example. That is not in line how PW works without UserGroups.

Do we have easy way to fix that?

niklaka commented 10 years ago

At first it looked like we don't. But it turns out the fix itself is easy, just finding it required reading wire/core/PageFinder.php minutely which took some time.

Looking for "check_access=0" was only a partial solution as also "include=all" AND option "findAll" (the latter may be present without the selector counterpart!) trigger skipping access checks when using template based access control.

A commit with the fix follows.

Looks like we're really getting somewhere with this :).