The iCal standard used by Owncloud sets three event types :

  • PUBLIC : the event is fully visible by anyone.
  • CONFIDENTIAL : the event is fully visible to owner, but only shows time segment for those who have a read access to the calendar.
  • PRIVATE : the event is only visible to owner and fully hidden to others (no time segment).

Owncloud stores the events in its database in iCal format, setting the value “CLASS” to the privacy level if needed, and nothing if not specified.

So, let’s change all the default events to CONFIDENTIAL :

UPDATE clndr_objects SET calendardata = REPLACE(calendardata, 'END:VEVENT', 'CLASS:CONFIDENTIAL
END:VEVENT') WHERE objecttype='VEVENT' AND calendardata NOT LIKE '%CLASS:CONFIDENTIAL%' AND calendardata NOT LIKE '%CLASS:PRIVATE%' AND calendardata NOT LIKE '%CLASS:PUBLIC%';

Note that the new line after “CONFIDENTIAL” is mandatory and should not trigger the query until you type the ” ; ” and press enter.

Note that it will change the events for all users.

Backup your database before executing the query.