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

Added support for webcal-subscriptions #1229

Merged

Conversation

leso-kn
Copy link
Contributor

@leso-kn leso-kn commented Mar 28, 2022

This PR adds support for webcal subscriptions, as discussed in #776.

Please note, that this is a backend-focused implementation, so efforts to adapt the web UI have not been made in this changeset.

Webcal subscriptions can be added in the form of a collection, just like calendars, todo lists and the like. The URL to the targeted online ICS file, as well as the display name and an optional color for the calendar are stored in the .Radicale.props file of the regarding collection.

Steps to subscribe to a calendar manually:

  1. Create a new collection (folder) in Radicale's collection-root/ directory
  2. Create a .Radicale.props file, structured as shown in the example below

The subscribed calendar will now be advertised by Radicale and should appear in supported applications (e.g. DAVx⁵ for Android)

Example:

// cat collection-root/[...]/[a collection]/.Radicale.props
{
    "tag": "VSUBSCRIBED",
    "D:displayname": "Online Calendar",
    "ICAL:calendar-color": "#00BBEEFF",
    "CS:source": "https://example.org/online-calendar.ics"
}

Result (DAVx⁵ + ICSx⁵):

Screenshot_20220328-191826232 Screenshot_20220328-191846410

@lamyergeier
Copy link

@Unrud Please approve this pull request.

@dstrelnikov
Copy link

Since Radicale does not announce calendars which do not belong to the user but are accessible to read, this would be a very convenient workaround in my workflow!

@trougnouf
Copy link
Contributor

trougnouf commented Jul 19, 2022

I would like to share my existing Radicale calendars with a public (passwordless) read-only URL so that it works with google calendar and such.
Would this PR provide the solution or I should create a separate issue from #776 ?

edit: I think that was mostly irrelevant, and I got passwordless subscriptions working already by setting the following:

in /etc/radicale/config:

...
[rights]
type = from_file
file = /etc/radicale/rights
...

in /etc/radicale/rights:

# Allow reading root collection for authenticated users
[root]
user: .+
collection:
permissions: R

# Allow reading and writing principal collection (same as username)
[principal]
user: .+
collection: {user}
permissions: RW

# Allow reading and writing calendars and address books that are direct
# children of the principal collection
[calendars]
user: .+
collection: {user}/[^/]+
permissions: rw

# Allow access to public calendars and address books via HTTP GET for everyone
[public-calendars-restricted]
user: .*
collection: public/[^/]+
permissions: i

then create a public folder/user and symlink the relevant calendars to it.

Copy link
Collaborator

@pbiering pbiering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like at least not breaking anything

@OdinVex
Copy link

OdinVex commented Nov 14, 2022

looks like at least not breaking anything

Tested with Apache, works fine. Repo org community site is 500, nothing else done to this repo since earlier mid-year.

@pbiering
Copy link
Collaborator

https://radicale.org/ is working, @Unrud : can you approve the pull request?

@OdinVex
Copy link

OdinVex commented Nov 14, 2022

https://radicale.org/ is working, @Unrud : can you approve the pull request?

I meant their GitHub community site, https://community.kozea.fr/.

@leso-kn leso-kn force-pushed the feature/advertise-webcal-calendars branch from fcfd74f to bd57f53 Compare February 16, 2023 09:36
@leso-kn
Copy link
Contributor Author

leso-kn commented Feb 16, 2023

Update: Upstreamed to master to include latest changes, no merge conflicts.

ℹ️ As a side note: the Github Actions configuration seems to be broken though, it's using some outdated python version strings (see pipeline log and the list of supported python versions of the Github Actions module).

@MrPixelized
Copy link

Why hasn't this PR been merged yet? Is there anything I can do to help it along?

@govynnus
Copy link

Why hasn't this PR been merged yet? Is there anything I can do to help it along?

Same question here :)

@leso-kn leso-kn force-pushed the feature/advertise-webcal-calendars branch 2 times, most recently from 3c10d42 to 7b6ac19 Compare April 18, 2023 17:21
@leso-kn
Copy link
Contributor Author

leso-kn commented Apr 18, 2023

Update: Upstreamed to master to include latest changes:

  • Adapted code to use the new collection.tag-field.

Regarding my previous side note: I see the Github Actions configuration has been fixed, nice! :)
The pipeline is passing on my side.

Using that as a quick reminder that this PR is ready to be merged!

@leso-kn
Copy link
Contributor Author

leso-kn commented Apr 18, 2023

@Unrud Do you require any additional adjustments to this PR from my side?

Copy link
Collaborator

@pbiering pbiering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, only extensions

@mmBesar
Copy link

mmBesar commented Jul 17, 2023

If it's approved, Why it's not merged yet?!

@leso-kn
Copy link
Contributor Author

leso-kn commented Jul 17, 2023

@mmBesar There hasn't been much activity on this project lately. The last commit is from mid-April, so I believe the maintainer simply didn't have the time to look into it since this PR was approved.

In case you want to try out an alternative, you may want to check out https://sabre.io/baikal/.

@mmBesar
Copy link

mmBesar commented Jul 18, 2023

@leso-kn I have Baikal installed.
Is it possible to subscribe to an online WEBCAL calendar?

@leso-kn
Copy link
Contributor Author

leso-kn commented Jul 26, 2023

@mmBesar According to https://sabre.io/dav/clients/ical/#subscriptions it should be possible, though it seems like you need to manually create the object (just like with this implementation for Radicale) or use a client that supports adding server-side webcal subscriptions (e.g. iCal).

@mmBesar
Copy link

mmBesar commented Jul 31, 2023

@leso-kn Not available yet!
Check sabre-io/Baikal#1027
If you have any work around, please share.

@MatthewHana
Copy link
Contributor

Had a look at the web UI and it wouldn't be difficult to add Webcal support to the UI that builds off @leso-kn's great work.

+1 for merging this PR.

@6801318d8d
Copy link

@Kozea can we merge please?

@pbiering pbiering added this to the 3.2.x milestone Mar 1, 2024
@pbiering pbiering changed the base branch from master to v3.2-devel March 2, 2024 19:19
@pbiering pbiering self-assigned this Mar 2, 2024
@pbiering pbiering self-requested a review March 2, 2024 19:27
Copy link
Collaborator

@pbiering pbiering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@pbiering
Copy link
Collaborator

pbiering commented Mar 2, 2024

@leso-kn : can you please create an empty commit to trigger "actions"? See here for more information: https://stackoverflow.com/questions/52408592/how-to-relaunch-github-check-without-pushing-new-commits

Add check for base_prefix indicating Radicale running at site root (/)
Revert "Add check for base_prefix indicating Radicale running at site root (/)"
@leso-kn leso-kn force-pushed the feature/advertise-webcal-calendars branch from 316f57e to 7b6ac19 Compare March 3, 2024 00:09
@leso-kn leso-kn force-pushed the feature/advertise-webcal-calendars branch from 7b6ac19 to 94a5ff0 Compare March 3, 2024 00:14
@leso-kn
Copy link
Contributor Author

leso-kn commented Mar 3, 2024

@pbiering done. Also rebased against master, which makes the docs job fail but that's only due to the branch name. All tests pass on all platforms.

@pbiering pbiering merged commit 32050ef into Kozea:v3.2-devel Mar 3, 2024
22 checks passed
@pbiering
Copy link
Collaborator

pbiering commented Mar 3, 2024

@leso-kn : I have requested enabling GitHub's Wiki for radicale, once enabled it would be great to have example documented there.

@MatthewHana MatthewHana mentioned this pull request Mar 3, 2024
@gentooboontoo
Copy link
Member

@pbiering @leso-kn Radicale's wiki has been enabled again.

MatthewHana added a commit to MatthewHana/Radicale-newwebui that referenced this pull request Mar 5, 2024
Added support to view, edit, and add Webcals in web UI to support functionality added in PR Kozea#1229.
@MatthewHana
Copy link
Contributor

I have added support for this in the web UI in PR #1329. Thanks again @leso-kn.

@leso-kn
Copy link
Contributor Author

leso-kn commented Mar 5, 2024

@MatthewHana oh, Nice work! That's very cool

@pbiering pbiering modified the milestones: 3.2.x, 3.2.0 Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.