Bug 89927 - Syncing a event where the user was removed from the event cause the sync to fail
Summary: Syncing a event where the user was removed from the event cause the sync to fail
Status: RESOLVED MOVED
Alias: None
Product: SyncEvolution
Classification: Unclassified
Component: CalDAV/CardDAV (show other bugs)
Version: unspecified
Hardware: Other All
: medium critical
Assignee: renato filho
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-07 03:07 UTC by renato filho
Modified: 2018-10-13 12:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
sync log (53.39 KB, text/plain)
2015-04-07 03:07 UTC, renato filho
Details
target log (52.40 KB, text/html)
2015-04-07 03:09 UTC, renato filho
Details
Patch to handle google calendar error 403. (1.74 KB, patch)
2015-04-07 17:24 UTC, renato filho
Details | Splinter Review

Description renato filho 2015-04-07 03:07:05 UTC
Created attachment 114898 [details]
sync log

Syncing google calendar where the user was removed from a shared event. Causes the sync to fail whe error  403.



How to reproduce
================

1 - Create a event in a different calendar invite the user to attend it (do not give permission to the user to modify it).
2 - Do the calendar sync using syncevolution.
3 - Go to remote calendar and remove user from the event
4 - Do another sync

Expected
========

The sync ends end the event get removed from local calendar.

Current
=======

The sync fails with error, and the sync never work again.

[ERROR @google] error code from SyncEvolution access denied (remote, status 403): PUT: bad HTTP status: <status 1.1, code 403, class 4, Forbidden>
Comment 1 renato filho 2015-04-07 03:09:04 UTC
Created attachment 114899 [details]
target log
Comment 2 renato filho 2015-04-07 17:24:58 UTC
Created attachment 114929 [details] [review]
Patch to handle google calendar error 403.
Comment 3 Patrick Ohly 2015-04-07 19:00:38 UTC
Comment on attachment 114929 [details] [review]
Patch to handle google calendar error 403.

Review of attachment 114929 [details] [review]:
-----------------------------------------------------------------

The commit message needs a full description of the problem and an explanation why the chosen approach is a suitable (or at least evil) solution. Also include an analysis of the side effects, like "what happens in future syncs".

::: src/backends/webdav/WebDAVSource.cpp
@@ +2252,5 @@
>          //
>          // req.addHeader("If-Match", etag);
> +        std::set<int> expected;
> +        if (m_contextSettings->googleUpdateHack()) {
> +            expected = boost::assign::list_of(403);

This is unnecessarily complex. Just use expected.push_back(403).
Comment 4 Patrick Ohly 2015-04-17 08:43:29 UTC
Renato, I had comments on the patch. Can you address those so that I can include the patch upstream?
Comment 5 GitLab Migration User 2018-10-13 12:42:51 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/SyncEvolution/syncevolution/issues/94.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.