Piwigo-Android
Piwigo-Android copied to clipboard
support community plugin
@EddyLB wrote in #20: I suggest to add Compatibility with the Community plugin (which should have been added to the current list of features of the iOS app). Many users requested it.
@EddyLB can you elaborate what that technically means? And also feel free to submit such kind of proposals directly in a new ticket.
Hi @ramack
Here is how Piwigo-Mobile detects the presence of the Community plugin while opening a session:
- Call
reflection.getMethodListto determine whether the Community extension is installed (by detecting the presence ofcommunity.session.getStatus) - Call
pwg.session.loginto authenticate the user - If the Community extension is installed, call
community.session.getStatusto determine the real user rights (admin or webmaster). - Call
pwg.session.getStatusto check Piwigo version, get token, available image sizes, upload file types, etc. Set the user rights from this call only when the Community extension is not used. - Call
pwg.categories.getListwith parameterscat_id,recursiveandfaked_by_community. As explained in https://github.com/plegall/Piwigo-community/issues/23 the value offaked_by_communitymust be "false" if the Community extension is installed and "true" otherwise. - If the Community extension is installed, call
community.categories.getListto identify albums having upload rights
The app displays all albums (public and belonging to Community user). The actions proposed to the user then depend on his/her rights: [admin], [upload rights on specific albums] or [none].
Cheers