Skip to content

fix(viewer): read legacy dav permission strings - #65482

Merged
skjnldsv merged 1 commit into
masterfrom
fix/viewer-legacy-permissions
Oct 14, 2026
Merged

skjnldsv merged 1 commit into
masterfrom
fix/viewer-legacy-permissions

Conversation

@skjnldsv

Copy link
Copy Markdown
Member

OCA.Viewer.open() still fails for the photos app after #65009, one check further into the node:

Error: Invalid permissions
    at p (core-viewer-init.mjs)
    at Object.C [as open] (core-viewer-init.mjs)
    at … (photos MapView, TimelineView, FoldersView)

Apps pass the permissions dav answers, a string such as CKWNVGDR, and the shim handed it to the node as is. A node only takes a bitmask. A string is now parsed with parsePermissions() from @nextcloud/files/dav; a number is kept.

Failing run on nextcloud/photos#3877: https://github.com/nextcloud/photos/actions/runs/38433136372

The new case in legacy.spec.ts uses a file info shaped like the one photos sends. It fails without the change and passes with it, so no further node check fails behind this one.

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

Apps pass OCA.Viewer.open() the permissions dav answers, a string such
as CKWNVGDR, as the photos app does for every photo. The shim handed it
to the node as is, and a node only takes a bitmask:

  Error: Invalid permissions

A string is now parsed with parsePermissions(); a number is kept.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
@skjnldsv skjnldsv added bug 3. to review Waiting for reviews labels Oct 13, 2026
@skjnldsv skjnldsv self-assigned this Oct 13, 2026
@skjnldsv
skjnldsv requested a review from a team as a code owner October 13, 2026 19:42
@skjnldsv
skjnldsv requested review from kristian-zendato, pringelmann and susnux and removed request for a team October 13, 2026 19:42
@skjnldsv
skjnldsv merged commit f7f84cb into master Oct 14, 2026
115 of 118 checks passed
@skjnldsv
skjnldsv deleted the fix/viewer-legacy-permissions branch October 14, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants