owncloud/calendar — pull request #264 by ben-denham (2013-12-19 01:33:20+00:00)
Title: Shared-event permissions editing fix

Hi there,

I've been looking into solving a few issues for Owncloud's calendar app over the last few days, and this is my first fix.

The changes in this commit allow edit/reshare-permissions to be saved for shared events, which solves: https://github.com/owncloud/calendar/issues/217 and https://github.com/owncloud/calendar/issues/263 (which appears to be a duplicate).

As suggested in https://github.com/owncloud/calendar/issues/217#issuecomment-28973489, I have altered permissions checking in lib/object.php so that users who only have update permissions for a single event (but not for the whole calendar) are able to edit the event. However, perhaps OC_Calendar_App::getPermissions() should be used instead to check event/calendar permissions in lib/object.php?

One problem that has not been addressed is that shared-event 'resharing' permissions always override shared-calendar 'resharing' permissions.
So in the rare case that a user has reshare-permissions for a shared-calendar, but not for a shared-event on that calendar, they will be denied access if they attempt to reshare that event.
This problem seems to be with the permissions-checking in OCP\Share::put().

Please let me know if I haven't made anything clear or if you would like me to make any changes, and thanks for all your hard work on Owncloud :)

Cheers,
Ben