Hi,
I have been trying to do the following thing: I would like my gallery to be accessible only to those who are registered users, and for each user, I would like to choose what albums they are allowed to see and what albums they are not allowed to see.
After reading the Troubleshooting page, several topics on this forum, etc. I arrived to the conclusion that I should:
* Choose Options > Gallery > Gallery Type : private
-> so that only registered users can enter the gallery.
* For each album, uncheck the "Published" option in the "General" box
-> so that by default nobody sees any album.
* For each user, in the box "Managed albums", select the albums that they are allowed to see.
Am I right or is there something I misunderstood?
I am asking this, because I have the strange following behavior, which I believe is a bug, but I am not sure because it might simply come from a misunderstanding.
If I have several (unpublished) albums, say album1, album2 and album3, and if John manages only album2, it perfectly works: John sees only album2. If I uncheck every albums (so that John actually manages no album), I expect that John sees an empty page when he enters the gallery (as if no album had ever been created). But in fact, he can see and browse *all* albums. Is it normal?
Thanks for your answer.
Comments
# Zenphoto version 1.4.1.2 [7836] (Official Build)
# Current locale setting: fr_FR.UTF8
# Current gallery theme: Default
# PHP version: 5.2.17
[edit] make that tonight's build. There was still an issue.
What I have is a public gallery with commenting only allowed for logged in users. No albums have passwords, I just want to keep comments limited.
I've read several posts and all the guides I could find regarding hiding albums, and the only way seems to be unpublishing the desired albums. But this does not hide them from logged in users. Even if I create a user with no rights what so ever, unpublished albums are still visible. Likewise if I have a dummy user manage the unpublished albums they are still visible to other users. Only when no user is logged in are they hidden as I'd like.
It took a while to track down where zenphoto checks if an album should be shown or not and it would seem the sortAlbumArray() in class-gallery.php is responsible for it while in the next_album() loop. It seems to remove unpublished albums from the list only if no user is logged in ( $row['show'] || $mine || (is_null($mine) && $album->isMyItem(LIST_RIGHTS)) ) so this matches my observations.
So essentially what I'm asking: is there currently a way to hide albums from logged in users while still keeping them unprotected in other ways?