Skip to content

feat: expose the author of file versions in the versions PROPFIND - #816

Open
Jonher937 wants to merge 1 commit into
owncloud:mainfrom
Jonher937:draft/version-author
Open

Jonher937 wants to merge 1 commit into
owncloud:mainfrom
Jonher937:draft/version-author

Conversation

@Jonher937

Copy link
Copy Markdown

Description

Record who uploaded each file version and return it in the versions listing.

  • decomposedfs stores the uploading user as user.ocis.author.{id,idp,type} on the node
    when an upload is prepared.
  • The author attributes are copied to a revision when a later upload archives the content.
    They are copied back on restore, so the author follows the content and is not the user who
    restored it.
  • Restoring a revision that has no author (created before this change) clears the author on
    the node, so the restored content is not attributed to the user it replaced.
  • ListRevisions returns the author as a JSON UserId in FileVersion.Opaque under the
    key author.
  • The ocdav versions handler resolves the author to a username and display name through the
    gateway. It asks the user provider once per distinct user per request. A user that cannot be
    resolved (for example, deleted) leaves the properties unset and does not fail the listing.
  • The versions PROPFIND supports two new properties: oc:meta-version-edited-by (username)
    and oc:meta-version-edited-by-name (display name). A version without a recorded author
    answers 404 for both.

Related Issue

Motivation and Context

Clients that show the version history of a file can show when a version was created, but not
who created it. Recording the author at upload time and returning it in the versions
PROPFIND lets clients show who edited each version.

How Has This Been Tested?

  • test environment: reva unit tests, both the xattrs and messagepack metadata backends
  • test case 1: with three uploads by different users, each archived version keeps its author and the current node has the latest uploader as author
  • test case 2: restoring a version moves its author onto the node, not the restoring user
  • test case 3: restoring a version without an author clears the node's author
  • test case 4: the versions PROPFIND returns username and display name for an author, and 404 when there is none
  • test case 5: author lookup happens once per distinct user, and an unresolvable user does not fail the listing
  • acceptance tests: not run yet (TODO)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

@Jonher937
Jonher937 requested a review from a team as a code owner November 14, 2026 22:59
@kw-security

kw-security commented Nov 14, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

file versions do not report the version author

2 participants