Skip to content
This repository has been archived by the owner on Oct 31, 2018. It is now read-only.

remove valarms from objects in read-only shared calendars #668

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

georgehrke
Copy link
Contributor

please help testing
need to pay special attention on sharing private events

@JB1985
Copy link

JB1985 commented Feb 18, 2015

@georgehrke it works!

I have test it on ios and lightning and cant find any bug. I hope it will be push asap to the stable calendars app.

@JB1985
Copy link

JB1985 commented Mar 18, 2015

@georgehrke,

how do I know if the patch already work with the current version (OC 8.0.2)?

@georgehrke
Copy link
Contributor Author

You can help by testing it ;)
I haven't tested it with 8 either.

Please excuse my brevity and typos.
Sent from my mobile

On Mar 18, 2015, at 11:31 AM, JB1985 [email protected] wrote:

@georgehrke,

how do I know if the patch already work with the current version (OC 8.0.2)?


Reply to this email directly or view it on GitHub.

@caco3
Copy link
Contributor

caco3 commented Apr 1, 2015

This seems not to work for me.
This is what I did:

  1. Replaced apps/calendar/lib/sabre/backend.php by your mod in my Owncloud 8.0.2
  2. Added a user A
  3. Added a user B
  4. Added a calendar for user A
  5. Added user B to calendar (read only)
  6. Added calendar as user A to thunderbird/lightning
  7. Added an event with a reminder
  8. Synced
  9. Opened owncloud webinterface as user B
  10. Downloaded the calendar and opened the ics file in a text editor

Outcome:
The ics file still shows the VALARM section. also, loading the calendar on my phone with both users still brought me 2 reminders.

@georgehrke
Copy link
Contributor Author

Downloaded the calendar and opened the ics file in a text editor

The Valarm is not supposed to be removed when downloading, but if you add User B to lightning you should not see the alarm in Lightning

@caco3
Copy link
Contributor

caco3 commented Apr 1, 2015

how is thunderbird or any other client supposed to know it has to ignore the event?
comparing the downloads of both users showed identical ics files!

@georgehrke
Copy link
Contributor Author

Thunderbird doesn't ignore the event, but the caldav interface doesn't deliver the alarm information if the shared calendar is read-only

@caco3
Copy link
Contributor

caco3 commented Apr 1, 2015

sry, I seem to stand on the tube.
How does a client know it should not show the reminder?
How do I test/validate it?

@georgehrke
Copy link
Contributor Author

How does a client know it should not show the reminder?

When an object is accessed via caldav (not via web interface) and the calendar is read-only, this patch removes the reminders-information

How do I test/validate it?

remove user a's calendar from thunderbird, add user b's calendar to thunderbird and check the event if there is any reminder shown in lightning

@caco3
Copy link
Contributor

caco3 commented Apr 1, 2015

When an object is accessed via caldav (not via web interface) and the calendar is read-only, this patch removes the reminders-information
ok, that makes sense

remove user a's calendar from thunderbird, add user b's calendar to thunderbird and check the event if there is any reminder shown in lightning

ok, I tested it on 2 different thunderbird users as well as on my android phone (business calendar Pro) and it seems to work as expected.

Now I would only request that the decision to show/remove the reminders is based on an individually based flag and not on read/write access.
I.e. I share my personal calendars with my GF, she has write access, but doesn’t want to get the reminders. And then we have a common calendar, where we both have write access and want to get reminders.

@georgehrke
Copy link
Contributor Author

see discussion in owncloud/calendar#547,
we most certainly won't add an option on a per-event basis.

@maybeec
Copy link

maybeec commented Apr 25, 2015

👍 works as expected

@tobiasKaminsky
Copy link

@georgehrke This is working for me just fine for the last 5 months.
Maybe you can add it?
Or are there some restrictions against merging it?

@georgehrke
Copy link
Contributor Author

Still haven't found time to test whether or not the don't show / 'show busy only' still works via caldav. If I'm sure that this works, we can merge this.

@vmuth
Copy link

vmuth commented Jun 22, 2015

I tried to integrate the patch into owncloud 8.0.4 but it does not seem to suppress the reminders.
Honestly I do not know what I did wrong:

  1. Downloaded the modified backend.php file
  2. Replaced owncloud/apps/calendar/lib/sabre/backend.php
  3. Restarted Apache (who knows...)

The clients are:

  1. User A is calendar owner and shared it read-only to User B.
  2. As User A created a calendar entry with reminder in Thunderbird.
  3. User B uses Thunderbird and Outlook with Bynari WebDAV Collaborator to sync calendars.
    The URL for the calendar is https://mydomain.bla/owncloud/remote.php/caldav/UserB/TestCalendarUserA_shared_by_usera
    In Outlook but also in Thunderbird the reminder is not suppressed.
    Is there something like a cache, or did I miss something?

Kind regards,
Vittorio

Update: I didn't do anything wrong except for one thing: User A and User B were both administrators. That's why User B got the reminder even if he had only read only access. After downgrading User B to a normal user and recreating the calendar in Outlook and Thunderbird the reminders were gone. :)

@fichif
Copy link

fichif commented Oct 6, 2015

I have installed the patch on my Owncloud (v8.0.4) installation with the Owncloud calendar App (v0.6.6) on a QNAP NAS and at the first glance it worked fine. But then I realized that the synchronization with DAVdroid (v0.8.4.1) on my Android device produces double entries in the Android calender for the owner of the calender.

In the web interface of Owncloud there is only one event but the Android calendar shows two events with identical properties. The synchronisation with Thunderbird Ligthning works fine and shows only one event.

Any ideas what could be the problem?

Thanks Mike

@tobiasKaminsky
Copy link

@fichif I cannot confirm this, but I am using CalDav-Sync.
Can you double check if you have applied the patch correctly?

@fichif
Copy link

fichif commented Oct 8, 2015

@ tobiasKaminsky
Yes I think so. In the directory /share/MD0_DATA/Web/owncloud/apps/calendar/lib/sabre I issued the following commands:

cp backend.php backend.php .orig
wget https://github.com/owncloud/calendar/commit/8a3606ba651b83910271320db95c2ab7e6c46962.patch
patch < 8a3606b.patch
chown httpdusr:administrators *
chmod 755 *
/etc/init.d/Qthttpd.sh restart

When I look at the resulting backend.php then the patch is applied. I have attached a screen shot how the event looks in the calendar after importing the calendar with DavDroid.

screenshot_2015-10-08-09-52-21

And in fact when I use the CalDav-Sync Adapter (v1.8.1) I get only one event in the calendar.
After moving back to the original version of backend.php I get again only one event with both (DavDroid and CalDav-Sync)

@DeepDiver1975 DeepDiver1975 added this to the backlog milestone Oct 13, 2015
@tobiasKaminsky
Copy link

With 8.1.1 I have a problem:
The events of another user are not synced any longer to android via calDav.

@tobiasKaminsky
Copy link

@georgehrke With 8.1.3 I get: {"reqId":"ufkoa4NkaZ2ft25Z6Ql4","remoteAddr":"80.","app":"PHP","message":"Class 'OC_VObject' not found at /var/www/owncloud/apps/calendar/lib/sabre/backend.php#444","level":3,"time":"2015-10-22T05:32:49+00:00","method":"REPORT","url":"/owncloud/remote.php/caldav/calendars/tobi/defaultcalendar_shared_by_user1/"}

Also the events of my normal user are not synced to android.

@tobiasKaminsky
Copy link

@georgehrke Is there a progress on this? With 8.1.3 it is not working any longer for me.
But without this the calendar is for me nearly a showstopper.
Please let me know if I can help you by testing or similar!

@tobiasKaminsky
Copy link

ping @georgehrke
Please let me know if (and how) I can help you

@georgehrke
Copy link
Contributor Author

We updated sabre/dav with ownCloud 8.2 and this patch is not compatible. I haven't yet investigated how much work it would be to make this patch work with ownCloud 8.2.

There is one more issue: There will be a major change about everything DAV in ownCloud 9. We will ship a dedicated dav app and the calendar app will be replaced with the calendar rework, which only provides a GUI for the caldav interface of the dav app. Therefore this patch would break yet again with ownCloud 9.

Additionally the dav app will not use ownCloud's sharing but the official caldav sharing standard. The standard contains a note about your issue, but it's still to be discussed.

@tobiasKaminsky
Copy link

Thank you for your detailled explanation.
I guess I can wait until the release of 9.0. And I hope that "my" issue will be included.
Who is discussing this? Maybe I can "vote" for the behaviour like it is written now.
(To be more flexible it would, of course, be much better to have this choose-able by the sharees)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants