mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-10-30 21:52:00 +01:00
Piwigo 11.3.0 - user unable to view folder and contents they DO HAVE permission to view when newly created folder permissions updated and images added via webservice calls #1189
Reference in new issue
Block a user
Steps to reproduce:
0. log in as the non-admin user in a private webbrowser session.
0. log in as the admin user in a private webbrowser session.
set default album permissions to admin only
create new folder - pwg.categories.add - status:private
call pwg.categories.getList cat_id:
observe new album not visible (this is correct)
pwg.permissions.add - group:, cat_id:
call pwg.categories.getList cat_id:
observe - album is not visible
log out, and log in - still no visible album
Add image to the new folder (accessible to all users) using the pwg.images.setInfo method.
observe - album still not visible to non-admin user
observe - album contents not visible to non-admin user if queried direct
If these steps are instead followed on the website webpages, then the album is visible to the user.
I suggest that the website webpage calls something extra when linking a photo to a folder other than that contained inside "pwg.images.setInfo".
I've spent a few hours reading through the php code but cannot find the necessary change.
I think the problem is that the USER_CACHE_CATEGORIES_TABLE is not being updated with a list of users who have indirect permission. I think this because of the album_notification.php file line 294 that merges direct and indirect permissions, but, maybe this is totally unrelated.
Needless to say, once the user is given explict rather than indirect permission to view the album, they can see it immediatly,
Hello Extorn
thank you for your reports
just to be 100% sure: when you say direct/indirect that's a reference to the fact the permission is inherited from a group to the user, and not a refe to the child/parent system for albums
This is correct