-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add a trashbin for calendars and calendar objects #26083
Add a trashbin for calendars and calendar objects #26083
Conversation
'length' => 4, | ||
'unsigned' => true, | ||
]); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No index for calendarobjects
?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Do we even need to use RestoreFolder at all? Can't you just move the object to it's original collection directly? /me knows nothing about why it's used in |
I tried that first but then we run into the issue that the URI is identical. Which brings us back to the question whether URIs should be changed when a calendar object is deleted … |
|
@tcitworld now that the trashbin was moved into the user's calendar home, couldn't that mean that there is a potential conflict between the new |
Indeed, we need to reserve that URI just like the birthday calendar. |
I have to check the details but right now I think subscriptions are just not going into the trashbin. They are deleted like before. |
If I'm not mistaken then my todo list is done, yet I'm not fully convinced of the design. The solution with the changed resource type for deleted calendars and that clients still see but ignore the node is solid. But hiding the objects from listing but giving them away when you directly access them (with the -deleted suffix) is strange. I'll dive deeper to find out whether it's not somehow possible to have objects in the calendar that will be ignored by clients like the deleted calendars. |
The RFC says a calendar can only contain calendar object resources. In that sense it's hard to have anything in there that isn't an event. I'll therefore keep the logic where we move the object to a suffix'ed URI and add a flag so the object is excluded from ordinary calendar queries/listings. |
|
Haven't done that yet but I assume anything that we do immediately now could be done either still immediately or eventually when the object is dropped. So the question is more what is the expected behavior. As this is a feature that isn't specified by an official *dav RFC, I supposed we could only look into other non-dav solutions to compare how they handle it. |
This comment has been minimized.
This comment has been minimized.
The etag is only set for files, but it's also possible that in edge cases the copy destination node can't be found. In that case we don't need to set any etag. Required for #26083 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
809b014
to
b6b56ec
Compare
This comment has been minimized.
This comment has been minimized.
8b28ff5
to
ee3ba56
Compare
I tested this.
Well depends on what we define as fine 😉. The recipient can still confirm their attendance. But that attendance is on an event that doesn't exist anymore for the organizer. I don't know what is the right thing to do here to be honest. Keeping it like it is seems a bit meh, but also not allowing the recipient to confirm when the organizer later restores is meh as the confirmation is lost :/ |
So what if we do this: the links works, the event is updated, but the recipient also gets a little warning that the event they just confirmed/rejected is actually deleted. This is also a bit strange but at least we do keep their attendance information and the recipient is aware that the event won't take place. On a related note I think this topic isn't quite solved in general. I noticed that we send out cancellation emails when an event is deleted, but not when a whole calendar is deleted. This feels a bit inconsistent. |
ee3ba56
to
97f042a
Compare
Yup. Check with ITip if there's a special status for this as well.
That could trigger a lot of emails being sent if there's many future events with attendees in the calendar. Would be great if specs or CalConnect gave advice on this. |
Is it worth it to have a repair step to rename existing calendars which URI is exactly |
It would be nice to be able to filter on the |
0492643
to
2759fde
Compare
Possibly. But we can also possibly do the filtering and splitting from the current listing. |
Failing CI seems unrelated. Three of three failed due to a timeout. |
This works well with nextcloud/calendar#3118. I'll merge this PR here when CI happy. Let's rebase just to be sure. |
2759fde
to
421f17a
Compare
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
It's needed in ReminderService::onCalendarObjectCreate() Signed-off-by: Thomas Citharel <tcit@tcit.fr>
421f17a
to
8a73b18
Compare
This adds the calendar part of #1662.
Todo
Exclude deleted calendars fromlist them, but give them a distinct resourcetypeallprop
requestscalendars_trashbin
root to list deleted trashbinsdeleted-at
as DAV propertyAPI
List deleted objects and their contents
REPORT /remote.php/dav/calendars/admin/trashbin/objects/
note: filter is mandatory as per caldav specs (sabre enforces) but they are ignored. you can send anything as filter criteria …
Restore a calendar
MOVE /remote.php/dav/calendars/admin/my-deleted-cal
Restore a calendar object (event)
MOVE /remote.php/dav/calendars/admin/trashbin/objects/73.ics
What I tested
Nextcloud calendar
Thunderbird
Evolution
DAVx5