Skip to content

perf(dav): Optimize system tag permission checks for multi-mount file IDs#61752

Open
joshtrichards wants to merge 1 commit into
masterfrom
jtr/perf-dav-SystemTag-updateCheck
Open

perf(dav): Optimize system tag permission checks for multi-mount file IDs#61752
joshtrichards wants to merge 1 commit into
masterfrom
jtr/perf-dav-SystemTag-updateCheck

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

Optimize SystemTagPlugin::canUpdateTagForFileIds() by using getFirstNodeById() as a fast path and falling back to getById() only when needed.

A file ID can be visible through multiple mounts or shares with different effective permissions. This change keeps the existing batch behavior that all requested file IDs must be authorized, while treating a file ID as updateable when at least one visible occurrence has PERMISSION_UPDATE.

  • Aligns the permission check with similar logic in related DAV/system tag code
  • Preserves correctness for multi-mount / multi-share edge cases
  • Reduces work in the common case

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 35 milestone Jul 3, 2026
@joshtrichards joshtrichards marked this pull request as ready for review July 3, 2026 15:12
@joshtrichards joshtrichards requested a review from a team as a code owner July 3, 2026 15:12
@joshtrichards joshtrichards requested review from Altahrim, leftybournes, provokateurin and salmart-dev and removed request for a team July 3, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant