Skip to content

Conversation

@benjaminfrueh
Copy link
Contributor

@benjaminfrueh benjaminfrueh commented Jan 29, 2026

Summary

Makes the list of WebDAV properties requested in PROPFIND calls extendable via BeforePropfindEvent.
This was implemented to enable the files_lock app to add lock properties for federation.

Changes

  • Dispatch BeforePropfindEvent in DAV::getPropfindProperties()
  • Add getPropfindPropertyValue() method to access requested properties

Required for nextcloud/files_lock#954

@benjaminfrueh benjaminfrueh requested a review from a team as a code owner January 29, 2026 15:50
@benjaminfrueh benjaminfrueh requested review from Altahrim and icewind1991 and removed request for a team January 29, 2026 15:50
@benjaminfrueh benjaminfrueh added the 3. to review Waiting for reviews label Jan 29, 2026
@benjaminfrueh benjaminfrueh force-pushed the feat/extendable-propfind branch from 5471dd1 to 5f63dc5 Compare January 29, 2026 16:04
/**
* @since 32.0.0
*/
class BeforePropfindEvent extends Event {
Copy link
Member

Choose a reason for hiding this comment

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

Not entirely sure about naming, BeforeRemoteProfindEvent may indicate a bit more that it is about outgoing propfind requests, not to be confused with clients requesting the webdav endpoints.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for this good suggestion, I renamed the event to BeforeRemotePropfindEvent

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

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

Some minor comments, but the approach is fine I think 👍

@juliusknorr
Copy link
Member

phpunit failures do not seem related, but autoloader needs to be updated with the new class

@benjaminfrueh benjaminfrueh force-pushed the feat/extendable-propfind branch 2 times, most recently from 38ad2b0 to 82179a8 Compare January 29, 2026 19:02
Signed-off-by: Benjamin Frueh <[email protected]>

Update lib/public/Files/Events/BeforePropfindEvent.php

Co-authored-by: Julius Knorr <[email protected]>
Signed-off-by: Benjamin Früh <[email protected]>

Update lib/public/Files/Events/BeforePropfindEvent.php

Co-authored-by: Julius Knorr <[email protected]>
Signed-off-by: Benjamin Früh <[email protected]>

refactor: rename BeforePropfindEvent to BeforeRemotePropfindEvent

Signed-off-by: Benjamin Frueh <[email protected]>

chore: update composer autoloader for new event class

Signed-off-by: Benjamin Frueh <[email protected]>
@benjaminfrueh benjaminfrueh force-pushed the feat/extendable-propfind branch from 82179a8 to 2ec4d96 Compare January 29, 2026 19:06
@AndyScherzinger
Copy link
Member

/backport to stable33

@benjaminfrueh
Copy link
Contributor Author

/backport to stable32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants