Skip to content

Conversation

@salmart-dev
Copy link
Contributor

@salmart-dev salmart-dev commented Aug 20, 2025

Summary

Adds OC-Permissions and OC-OwnerId headers to the response of PUT DAV requests.

Documentation update: nextcloud/documentation#13525

Checklist

@salmart-dev salmart-dev self-assigned this Aug 20, 2025
@salmart-dev salmart-dev added enhancement 3. to review Waiting for reviews labels Aug 20, 2025
@salmart-dev salmart-dev marked this pull request as ready for review August 21, 2025 09:32
@salmart-dev salmart-dev requested a review from a team as a code owner August 21, 2025 09:32
@salmart-dev salmart-dev requested review from come-nc, sorbaugh and yemkareems and removed request for a team August 21, 2025 09:32
Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

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

New non-standard headers should be prefixed with X-

@come-nc come-nc requested review from CarlSchwan and susnux August 21, 2025 16:00
@salmart-dev salmart-dev requested a review from come-nc August 21, 2025 16:42
@salmart-dev salmart-dev requested review from come-nc and susnux August 27, 2025 16:22
@salmart-dev
Copy link
Contributor Author

The last three commits add the changes necessary to add the filtering logic to hide mount and share information from the permission string, under Robin's suggestion that the behaviour should be kept.

@salmart-dev salmart-dev force-pushed the 54088-providePermissionsAndOwnerIdInPut branch from a62a217 to dd52669 Compare September 16, 2025 16:13
@salmart-dev salmart-dev force-pushed the 54088-providePermissionsAndOwnerIdInPut branch from f40f9a6 to 035f7cd Compare October 14, 2025 14:56
@salmart-dev salmart-dev force-pushed the 54088-providePermissionsAndOwnerIdInPut branch from 035f7cd to 81a7bf9 Compare December 5, 2025 15:59
@salmart-dev
Copy link
Contributor Author

Last update 🤞 : the fixes with $isPublic having a wrong value have been merged and now they are usable for this PR. The Owner ID header is not set in the case isPublic is true.

@salmart-dev salmart-dev requested a review from come-nc December 8, 2025 09:50
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

I don't like traits 🙈

@salmart-dev
Copy link
Contributor Author

I don't like traits 🙈

Right, I think in this case a good option would be to add a new Node::getPublicDavPermissions that returns permissions without the mount and share information.

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

Nice 🎉

The permission string for directories and files can contain M or S
depending if they are respectively coming from a mount or a share. This
information is not to be disclosed when the share is a public one.

Signed-off-by: Salvatore Martire <[email protected]>
@salmart-dev salmart-dev force-pushed the 54088-providePermissionsAndOwnerIdInPut branch from 44ef5c0 to 0b577ef Compare December 11, 2025 09:43
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.

Provide permissions and ownerId in PUT request when uploading a new file

5 participants