apeisa / UserGroups

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

Circular reference workaround #3

Closed niklaka closed 10 years ago

niklaka commented 10 years ago

Changed inheritance slightly to avoid circular references. When page has manage_access=1, it gets no inherit_access reference. Instead the selector in find() now does this: "view_groups|inherit_access.view_groups=..." (check view groups from this page or from the inherited one). I had to make a little wrapper getAccessPage() to keep the code clean too.

If the original issue gets fixed in the core this is easy to revert to what it was - if it seems more appropriate/clean that way. But now were set to continue working on this module again!

See previous PR (the closed one) for explanation on what else is here...