We're building member lists using a Profile module, listing everyone with a certain field and value in the profile. However all information is not public, we want only some of these lists to be public, others not to be. I initially imagined being able to control the access using the path_access module but it doesn't seem to be the case, the module doesn't seem to work with paths that contain +'s and urlencoded non-English chars and I've filed an issue about that.
Someone might suggest aliasing the userlist paths, well it's only secure until someone figures out the real path of the alias, that will circumvent path_access entirely.
Does anyone know of another way of doing this? Preferably a way that doesn't involve hacking existing code, a modular and flexible approach that will not be an obstacle when it's time to upgrade to the next major Drupal version.
All help is most welcome!
Comments
Same Problem...
I am dealing with the same requirements and thus the same problem...
Workaround
I worked around this. Here's my solution. Perhaps you find it useful Maureen:
template.php
profile_listing.php
This way we can make some fields publicly browsable while at the same time restricting what information guests can see, logged in members will see contact details and photo while guests only see names.
A lot of it is hard coded, I'd like to see some of this stored in the database, for example the list of public fields. I believe it's easy to do editing the profile.module, adding another access level for fields and just pull those fields from the DB to populate the array we use here.
--
Jakob Persson
web design and usability consulting
http://www.jakob-persson.com
--
Jakob Persson - blog
Leancept – Digital effect and innovation agency