New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compatibility iOS app, avoid faking pwg.categories.getList #23
Comments
to know what is the real user status (not the faked one) and the method to call to get the uploadable categories list.
@plegall, I've prepared a few albums on the demo site to understand how I should exploit this new method and modify the iOS app. Without Community installed, the iOS app uses With Community installed (I tested as Guest, User and Admin):
How can I get the list of albums for which the user has no Upload rights but read rights (the option Thanking you in advance for your help. |
@EddyLB so the problem is the "Method name is not valid" on pwg.categories.getList, because it should work and give you exactly what you need, ie the list of albums reachable to the current user. If I go to https://piwigo.us/dev/eddy/tools/ws.htm (where Community is currently installed and activated), I can request pwg.categories.getList with no problem! |
Sorry for bothering you @plegall, I've realised this evening that there was a typo error in the So I checked again and got these results when logged as User:
With the web interface, when I am logged as User, I see the 3 albums, which is normal because they are public. Both |
Thank you @plegall. The iOS app follows that route:
#23 can be closed. |
And does that check:
to remain compatible with old versions of Community as well? |
Sorry for the slow answer, I travel a lot these days for my work (Belgium, Italy and now in Korea).
|
@plegall, For example, when sending the following request while logged as I get data for 5 albums, not 7 (sub-albums with id 6 and 7 are empty): How should I proceed ? can you fix the |
That is "on purpose". This is not related to Community. I suppose the Community user can see the empty albums in the "Upload" bottom menu (so we can't say the user has no possibility to upload photos in empty albums). Only true admin can see empty albums. I agree it would be better that Community users can see empty albums where they have upload permission. I have to think about how to do that. Not super easy to implement (to say the least). |
When Community 2.8a is installed, for users having upload rights in Community albums (non true admins or webmasters), the method
|
OK @EddyLB but we can't go back in time and what's in Community 2.8.a cannot be modified, remote apps have to deal with it :-/ What's important is "does new versions of Community return data your need?" |
Ok @plegall, that will stay like this. I sent this message because I did not know to which extent Users have started requesting more capabilities, e.g. the ability to delete their photos, to create sub-albums and visualise empty albums (in addition to the admin APIs requested in #25). |
I guess you can close this issue. |
As described on Piwigo/Piwigo-Mobile#117 Community should be able to avoid faking pwg.categories.getList to return the real list of "reachable" albums.
The text was updated successfully, but these errors were encountered: