Skip to content

fix: keep faking read/write permissions on AEM_API 404 responses - #727

Merged
mhaack merged 2 commits into
mainfrom
sheet404
Sep 7, 2026
Merged

fix: keep faking read/write permissions on AEM_API 404 responses#727
mhaack merged 2 commits into
mainfrom
sheet404

Conversation

@mhaack

@mhaack mhaack commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • PR fix: scope daFetch permissions fallback to successful AEM_API responses #716 scoped daFetch's permissions fallback to resp.ok, which also suppressed it on 404s.
  • A 404 from source.get on a brand-new/unsaved doc means nothing exists there yet, not that access was denied, so it should still get the read/write fallback. Real auth failures (401/403) and other error statuses continue to get no fabricated permissions.
  • This unblocks da-live's sheet block, which was leaving da-title.permissions undefined for a new sheet and hiding da-sheet-tabs (failing the "New sheet" e2e test).

Test plan

  • npx wtr on test/nx2/utils/api.test.js — 123 passed
  • npm test (full suite) — 1769 passed, 0 failed, 3 skipped
  • lint clean (pre-commit hook)

PR #716 scoped daFetch's permissions fallback to resp.ok, which also
suppressed it on 404s. A 404 from source.get on a brand-new/unsaved
doc means nothing exists there yet, not that access was denied, so it
should still get the fallback. Real auth failures (401/403) and other
errors continue to get no fabricated permissions.

This unblocks da-live's sheet block, which was leaving da-title's
permissions undefined for a new sheet and hiding da-sheet-tabs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aem-code-sync

aem-code-sync Bot commented Sep 7, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mhaack
mhaack requested a review from bosschaert September 7, 2026 12:20
@mhaack
mhaack merged commit dc2e698 into main Sep 7, 2026
3 checks passed
@mhaack
mhaack deleted the sheet404 branch September 7, 2026 12:41
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.

2 participants