Added possibility to add other user's resources.
AutoImport-felixfontein last edited by
Assume you have two users a and b, each having one calendar (a/a.ics and b/b.ics). Both users have r/w access to their own calendar, and read access to each other's calendars.
If now user a tries to use the current davdroid to sync b's calendar, and tries to add b/b.ics by entering https://server/b/b.ics/ with his credentials (user name a and his password), davdroid only presents his own calendar (https://server/a/a.ics/) instead of b's calendar in the list. It seems to be impossible to add anything else but calendars belonging to user a.
This patch will check whether the home set for user a is the start of the given URL. If not, it also tries to add the resource given by the URL to the list of address books respectively calendars. Thus, with this patch, one can also add other user's calendars and address books (assuming that one has at least read access) as well.
(In case you have any questions or want to discuss this, feel free to contact me at firstname.lastname@example.org. I haven't found your email address anywhere, otherwise I would have contacted you about this before sending a pull request.)
Related to #249.
Closing, please see #249 for further updates.