tchapi / davis

🗓 A simple, fully translatable admin interface for sabre/dav based on Symfony 5 and Bootstrap 5, initially inspired by Baïkal.

Home Page:https://github.com/users/tchapi/projects/1/views/1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Crosspost] Have a calender to be subscribable without authentication

1Luc1 opened this issue · comments

commented

Hi,

this is basically a cross-post, since I didn't got any answer there :( .
Maybe you ( @tchapi ) some answer?

Now I'm asking, if there is the possibility that a calender can be accessed and subscribed without login in into the system? Kind of a public calender without login credentials. Within Mozilla Thunderbird there is the option to subscribe to a calender without credentials.

Thanks,
Luc

Hi
There's no possibility at the moment in Davis but I'm happy to accept a PR if ever the feature is present in sabre/dav. I guess it looks like it is if I believe sabre-io/dav#820

commented

Thanks for the information.
So where does the {DAV:}unauthorized belongs to. Is this within a principal within the database?
I'm kind of lost with sabre-io/dav :D .

There's more information in the release notes: https://sabre.io/dav/upgrade/3.1-to-3.2/

commented

I did some diggin - and believe me, I'm kind of lost within the sabre/dav legacy code :(.
Anyway I found a place, where adding the following line to SharedCalendar class, method getACL() :

 $acl[] = [
    'privilege' => '{DAV:}read',
    'principal' => '{DAV:}unauthenticated',
    'protected' => false,
];

... kind of does what I'm looking for. This change will made Shared calender be subscribe able without loggin in, e.g. from thunderbird.
This will affect all calendars within the installation; this is of course not wanted, so I'm looking for a way, to bind this logic to only selected calendars. @tchapi do you may have some idea, how to achieve this?

Hi again @1Luc1 and thanks for exploring a solution. I'm sorry my latency is high these days (AFK mostly). Will have a look at what you shared and come back to you

I have come up with a solution that should work: see #105

➡️ Would you be able to test, and add your feedback in the draft PR directly, if possible?