nextcloud / nextcloud/integration_davc
External CalDAV calendar stored with NULL permissions and therefore not writable
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 12
- Forks
- 2
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 16
Description
Description
An external CalDAV calendar connected via DAV Connector is shown and synchronized
correctly, but it is not offered as a target calendar when creating a new event.
The problem appears to be that the remote calendar permissions are stored as
NULL in davc_collections.
Environment
- Nextcloud: 34.0.3
- Calendar: 6.5.4
- DAV Connector (
integration_davc): 1.1.0 - Remote CalDAV server: Open-Xchange App Suite 7.10.6
- Remote server: Debian 12
Reproduction
I connected an OX CalDAV calendar using the DAV Connector.
The calendar is visible in Nextcloud and events are synchronized from OX to
Nextcloud.
However, the external calendar does not appear in the calendar selection
dropdown when creating a new event.
The corresponding entry in oc_davc_collections was:
id | uid | type | ccid | permissions | label
1 | micro | EC | /caldav/Y2FsOi8vMC8yMQ/ | NULL | DavC: Carter, Micro
Remote ACL
The OX server returns the following ACL for the calendar owner:
read
write
write-content
write-properties
write-acl
bind
unbind
...
In particular, write-content is explicitly returned by the remote server.
Relevant DAV Connector code
RemoteEventsService::toCollectionModel() processes the ACL:
$acl = $so[RemoteClient::DAV_ACL] ?? null;
if (is_array($acl)) {
$permissions = RemoteConvert::extractPermissions($acl);
$to->permissions = $permissions[$owner] ?? [];
}
RemoteConvert::extractPermissions() copies the privileges from the
remote ACL without modification.
However, the resulting local davc_collections.permissions value was
NULL.
EventCollection::getACL() then falls back to:
['{DAV:}read', '{DAV:}write-properties']
This means write-content is missing from the ACL exposed by DAVC.
Workaround
I manually changed the database entry for the affected collection to:
["{DAV:}read","{DAV:}write","{DAV:}write-content","{DAV:}write-properties"]
UPDATE oc_davc_collections
SET permissions = '["{DAV:}read","{DAV:}write","{DAV:}write-content","{DAV:}write-properties"]'
WHERE id = 1;
After this change, the OX calendar immediately appeared in Nextcloud's
"new event" calendar selection.
Creating a new event in that calendar then worked immediately and the event
was written back to OX.
So the complete synchronization is working in both directions once the
permissions are present.
Expected behavior
The permissions returned by the remote CalDAV server should be preserved in
the DAVC collection, including write-content, so that a writable remote
calendar can be selected when creating an event.
Actual behavior
davc_collections.permissions is NULL, causing EventCollection::getACL()
to fall back to read + write-properties only.
Question
Is this a bug in integration_davc 1.1.0 where the remote collection
permissions are not persisted correctly?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing RemoteEventsService::toCollectionModel() and RemoteConvert::extractPermissions(), then inspect how permissions are persisted in davc_collections and consumed by EventCollection::getACL(). Reproduce the external Open-Xchange calendar case and verify that write-content is preserved, the calendar appears in the new-event selection, and events can be written back.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100