Skip to content
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

Share calendar to users or groups with "show only as busy". #11214

Open
Tracked by #20096
phlegx opened this issue Sep 14, 2018 · 39 comments
Open
Tracked by #20096

Share calendar to users or groups with "show only as busy". #11214

phlegx opened this issue Sep 14, 2018 · 39 comments
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: caldav Related to CalDAV internals feature: dav

Comments

@phlegx
Copy link

phlegx commented Sep 14, 2018

Steps to reproduce

  1. Click on calendar app
  2. Click on share calendar
  3. Select user or group

Expected behaviour

After the steps to reproduce the behavior I want to choose an option "show only as busy". So, that the selected user or group can see my complete calendar but without details. This option is missing.

I know that it is possible for a single event to "show only as busy". But what if I want to have this for a specific user or group for the complete calendar?

Actual behaviour

After the steps to reproduce the behavior there is only an option "can edit" for the chosen user or group.

Server configuration

Nextcloud version: 13.0.6
Nextcloud calendar version: 1.6.1

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #8698 (need a group or folder for all user), #7340 (Show circle name in details of a shared file (group user)), #866 (Calendar Share Functionality missing), #10347 (Make shares visible to other users), and #3801 (Adding appointment into shared calendar fails).

@MorrisJobke
Copy link
Member

cc @georgehrke

@stefanoco

This comment has been minimized.

@georgehrke

This comment has been minimized.

@stefanoco

This comment has been minimized.

@jfrederickson
Copy link

Ideally it'd be possible to do this for calendar links as well. (And to be able to generate links for both full access and free/busy simultaneously.) Google Calendar for example only lets you do one or the other at any given time.

@nolens
Copy link

nolens commented Jan 23, 2020

I badly need this feature and I have just set a bounty on this.
Bountysource

@nolens
Copy link

nolens commented Jan 24, 2020

@stefanoco
Would you like add to my bounty on this? I have a couple of freelance programers who I am working with on other projects, they might be able to contribute on short notice....

@georgehrke
Could we setup a group chat somewhere for us and the programers, to discuss scope and for you to give clear directions? Could make life easier, in the end...

@brylie
Copy link

brylie commented Oct 29, 2020

This would be really important to avoid accidentally publishing event details to a shared calendar. Right now, events seem to default to "when shared, show full event". This may accidentally expose private information when creating an event from a phone or app that doesn't expose the "when shared show" field.

Is it possible to change the default value for "when shared show" field to "when shared, show only busy"?

@biva

This comment has been minimized.

@stefanoco

This comment has been minimized.

@biva
Copy link

biva commented Mar 4, 2021

As a workaround, and within our organisation, I use the free-busy feature of caldav within Thunderbird: https://docs.nextcloud.com/server/latest/admin_manual/groupware/calendar.html#freebusy

@aresius
Copy link

aresius commented Mar 4, 2021

As a workaround, and within our organisation, I use the free-busy feature of caldav within Thunderbird: https://docs.nextcloud.com/server/latest/admin_manual/groupware/calendar.html#freebusy

This sounds interesting, but I do not understand directly how that works. Could you please briefly give an idea of your setup?

@szaimen

This comment has been minimized.

@ChristophWurst ChristophWurst removed the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 23, 2021
@trevor87
Copy link

trevor87 commented Jul 2, 2021

As a workaround, and within our organisation, I use the free-busy feature of caldav within Thunderbird: https://docs.nextcloud.com/server/latest/admin_manual/groupware/calendar.html#freebusy

Did anyone figure out, how this works? Unfortunately is very little information online about this workaround… All I could find out so far is that this feature is probably used when creating a new appointment and then pressing the "Invite Attendees" button.

@biva
Copy link

biva commented Jul 2, 2021

This is it @trevor87 ! Nothing more to do

@trevor87
Copy link

trevor87 commented Jul 2, 2021

OK, thanks I think I figured it out now. So for everyone who runs into this problem, the workaround is simply the following:

If you use thunderbird and want to see whether your colleagues are available just doubleclick in the Thunderbird Calendar to create a new event and then in the next view click on "Invite Attendees". When you enter a mail address of someone who is also using your nextcloud instance, it will show when the other person has appointments. In my case for some reason it shows the other people's appointments as "no information", which I find rather confusing.

Otherwise: Still trying to figure the rest out. Hope this helps!

@szaimen szaimen removed the needs info label Jul 2, 2021
@nursoda
Copy link

nursoda commented Jul 2, 2021

@trevor87 Thanks. That is about what Outlook does. My issue with this approach is that I don't only need my employees using NC and TB to be able to see when they may invite me, but also my customers. Therefore I'd like two things to be available: a NC web interface "free only" view for those who have an account on my server, and a publicly sharable calendar (similar to what Google Calendar provides). But maybe this is not the right place to ask for the latter.

@qq7te
Copy link

qq7te commented Aug 5, 2021

I also would like to stress what @nursoda mentioned recently: I also need it to be able to publish a calendar externally, but I want all the time slots to simply say "busy" so that I can share my calendar anywhere with clients without revealing what I'm doing

If there is any work already going on, I'm happy to contribute, but this ticket doesn't mention a branch or any work in progress. Let me know... would be happy to participate

@ChristophWurst
Copy link
Member

@qq7te we'll soon look into nextcloud/calendar#1023. This might be necessary for that but maybe it's not. I'll let you know if we have to work on this specific ticket.

@ChristophWurst ChristophWurst added the feature: caldav Related to CalDAV internals label Dec 17, 2021
@nursoda
Copy link

nursoda commented Jan 18, 2022

We'll soon look into nextcloud/calendar#1023. This might be necessary for that but maybe it's not.

Well, "appointments" were implemented, but nothing to help "share/show busy only".

I try to sum up my understanding of this issue and my needs in more detail: We need a new? endpoint that returns only pruned events matching restrictions which a user should be able to set. Such filters might be

  • only show events that are at least partly within the time frame set in /settings/user/groupware
  • don't show certain event types such as day, private, cancelled or tentative events (or only show "confirmed" events?)
  • don't show events marked as "free" (or only show events marked as "busy"?)

The OP's request was to be able to share such restricted view within the nextcloud instance. I second that. This probably would be a checkbox "show only as busy" in the calendar's prefs. Since such restricted calendar view should be available to other clients such as Thunderbird, too, just a restricted view within the calendar app doesn't seem sufficient from a security perspective.

My usecase is an enhancement to the OP's request: In the Calendar app, a user should be able to "Share free/busy link" (below "Share link"); an URL that renders a web view with buttons to switch view and move in time, but without e.g. the possibility to download that calendar, that renders the filtered/pruned events.

For me, any web view would suffice. A further enhancement would be have a user setting that either renders a full-fledged view with top bar (cloud and/or calendar name, etc.) or just a minimal (embed-style) view.

@paradeiser
Copy link

I was happy to see this OP request, as this is exactly what's missing to make Nexcloud the Google Calendar successor.

For now, it is not possible to have a private Calendar shared with team-mates as "show only busy times".
(A second "private" calendar is needed as CalendarApps using CalDAV do not support the per-appointment-setting "show full details / as busy / not at all").

Is there any active development for this feature?
(Or a workaround to for private entries via CalendarApps?)

Thanks everyone for contributing to Nextcloud!
paradeiser

@paradeiser
Copy link

paradeiser commented Feb 17, 2022

I just wonder if this would be better off at https://github.com/nextcloud/calendar ?
Does it make sense to cross post it there as well?

@krombel
Copy link

krombel commented Mar 2, 2022

There is nextcloud/calendar#1044 and nextcloud/calendar#725 which point to this issue

@Jaxom99
Copy link

Jaxom99 commented Sep 6, 2022

Maybe a workaround could be found with the Calcleaner project : see my open issue here flozz/calcleaner#3

In short: automate a caldav tool (in python) to add "visibility settings" to created events (CLASS:CONFIDENTIAL). Thus a standard NC share of the calendar would show only date/time.

@section1
Copy link

I have similar issue ...we want to share calendar inside NC instance and we want that always the shared calendar show the events as 'Busy'.. i know that exist de free/busy option when you create and event...but sometimes is more easy that multiple users share the calendar to me and i can found a slot very fast in the 'calendar page'.
i don't need to create an event, add attendants, find free slot for everyone etc..

I'm testing this stupid workaround that i make:

Edit file apps/dav/lib/CalDAV/CalendarObject.php search get() function.. in this version i have something like this:

                // shows as busy if event is declared confidential
                if ($this->objectData['classification'] === CalDavBackend::CLASSIFICATION_CONFIDENTIAL) {
                        $this->createConfidentialObject($vObject);
                }

if you remove this if clause (keeping $this->createConfidentialObject($vObject); obviously) you'll see all events as Busy at shared calendars.

If someone knows if this is a very bad idea please tell me :D , I can't find any bugs or problems so far.

@wargreen
Copy link

wargreen commented Oct 2, 2023

Hi,
The per-event and per-calendar workaround isn't really the same feature.
In my use case, i need to share the free/busy for users that use multiple calendars for multiple projects. Currently, the free/busy info are taken from all the cal a user own (if i have good information), so it is far most complete than just share one cal.
Is the per-user free/busy share the same issue, from an internal Nextcloud point-of-view ?

@wargreen
Copy link

For detail my previous comment (i've found it when searching again for this feature :) :
My use case : i work with many music / theater shows. One calendar each (that i'm or not owner), but not all want to use NC. I also have many other shared calendars for associative life etc, that don't should be used for free/busy...
So, many frends, productions and tour managers need to know when i'm available (sometime from goo**e things).

That i can imagine a good way :

  • Have a "Share links" section in left calendar panel
    • That list all shared links and a button "Create share"
      • That open a popup for :
        • select which calendar to use (in all viewable calendars by user)
        • select to show full or free/busy
        • manage share (same as the share panel for files)

The "confidential trick" said before can't work for me (already tried) because if i add an event in a shared cal, only the cal owner can see it.
In my case, a "personal / user point-of view" of the free/busy information, and all information are not necessarily in one calendar.

I think that the current state of calendar sharing work well for a monolitic organization (one NC instance / one orga) but is complicated for one-by-one (inter-users or user-to-external-world) organization.

Thanks a lot for all the work in all cases !

@section1
Copy link

section1 commented Nov 15, 2023

Yes, I'm agreed, that would be a nice and important('must have') feature. I want to add that the workaround above have a bug with recurrent events. i created an issue here: nextcloud/calendar#5555

@tetefolle

This comment was marked as abuse.

@bentuna

This comment was marked as spam.

@mdrobisch
Copy link

mdrobisch commented Jul 8, 2024

To whom it may concern.

We have a Nextcloud setup in use and a lot of different user clients including MS Outlook and Thunderbird (with CalDav).

Finding free meeting slots was constantly hard to manage because of hidden "private" events of MS Outlook users. The behaviour is described a lot in different issues here on github.

With the hint of @section1 (thanks alot here) we managed to extend his solution to show all events as "Busy"-timeslot. So this includes "confidential" and "private" types.

Here is the solution:

In /nextcloud/apps/dav/lib/CalDAV/CalendarObject.php we handled private events separatly with

class CalendarObject extends \Sabre\CalDAV\CalendarObject {

	public function get() {

		// ... other code of the function

		// shows as busy if event is declared confidential
		if ($this->objectData['classification'] === CalDavBackend::CLASSIFICATION_CONFIDENTIAL) {
				$this->createConfidentialObject($vObject);
		}

		// code added here !!!!!!!!!!!!!!!!!!!!
		// shows as busy if event is declared private
		if ($this->objectData['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) {
				$this->createConfidentialObject($vObject);
		}

		// ... other code of the function

	}

To get this working we had to drop the filters for private event in /nextcloud/apps/dav/lib/CalDAV/Calendar.php as well.

We changed the behaviour in the following functions.

  • public function getChild($name) { ... }
  • public function getChildren() { ... }
  • public function getMultipleChildren(array $paths) { ... }
  • public function childExists($name) { ... }

Simply by commenting out the CLASSIFICATION_PRIVATE test/condition for every section/function like below:

	//if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE && $this->isShared()) {
	//      return false;
	//}

So the filtering is done in the CalendarObject.php only

If you interested in this. You can test this in your live system directly without any restart.
Please be careful to do not mess up with the other code. Please also tell your thunderbird users about the visibility of "private" events as well.

As a result nextcloud will show every event in the Nextcloud calendar. It works even with the sync by Thunderbird and Outlook (CalDav) showing "Busy" slots (maybe a solution for the workflow of @wargreen . This does the trick for us and we are really happy with the solution.

For your decission to patch, please mention that this is a workaorround only and it may leak out data like e.g. described in nextcloud/calendar#5555

If anyone can help me to make an option in the admin setting (or even calendar wise) i am interested to make a Pull-request to have a general opt-in solution for all nextcloud users.

@kaystrobach
Copy link

@mdrobisch thank you for your input, this was not the intention of the ticket.

We want to modify the sharing options in a way, so that the sharing user can decide to hide all events, no matter, what kind and just provide the busy information. Modifying each and every event can cause quite a huge security risk.

@mdrobisch
Copy link

mdrobisch commented Jul 8, 2024

Sure thing. Maybe nextcloud/calendar#4782 fits better, or even one of the other issues. They imho describe all some different aspects of the same topic. So for me it is hard to figure out where my findings fits best. Hopefully my workarround here can help people that also want a more "MS Outlook/Exchange" like behaviour of showing/hiding private events.

UPDATE: This might be especially interesting for people using nextcloud as a company/enterprise solution.

If i can help please let me know.

@mdrobisch
Copy link

mdrobisch commented Jul 8, 2024

Modifying each and every event can cause quite a huge security risk.

Please let me put one addition here to clear things out. My approach do not alter events. It is just about change the filter to let "private" events to be shown as "busy" events in CalendarObject.php.

@kaystrobach
Copy link

yes totally get that, but all non "private" events will be shown - right?

@kaystrobach
Copy link

and yes nextcloud/calendar#4782 seems to be the very same issue ...

@mdrobisch
Copy link

yes totally get that, but all non "private" events will be shown - right?

Yes, all events that are not "private" nor "confidential" are shown/shared as normal (with all informations).

Thank you for the hint. You are right. This solution fits best with nextcloud/calendar#4782 not with this one here.

@miaulalala
Copy link
Contributor

Related: nextcloud/calendar#6247

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: caldav Related to CalDAV internals feature: dav
Projects
None yet
Development

No branches or pull requests