the annotation gets deleted from the local database even if the current user does not have delete rights (“all”). It stays undeleted on the server database, as expected. Andre suggests that the following order of the operations can help to fix this. That is: first send the delete request to the server and if it returns 403 do not change the local database, and if it returns 200, delete the annotation from the local database as well.
user is not logged in: Annotations from local sqlite db can be deleted. I left this as TODO, because currently new annotations can be added as well, when the user is not logged in.
user is logged in:
own annotations can be deleted
other users' annotations in /Incoming folder cannot be deleted as long as permission is not set to access mode "ALL".
the annotation gets deleted from the local database even if the current user does not have delete rights (“all”). It stays undeleted on the server database, as expected. Andre suggests that the following order of the operations can help to fix this. That is: first send the delete request to the server and if it returns 403 do not change the local database, and if it returns 200, delete the annotation from the local database as well.