Skip to content

feat: restrict explorer new-item menu to folders-only at org level#1013

Open
kptdobe wants to merge 1 commit into
mainfrom
orgonly
Open

feat: restrict explorer new-item menu to folders-only at org level#1013
kptdobe wants to merge 1 commit into
mainfrom
orgonly

Conversation

@kptdobe

@kptdobe kptdobe commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Customer reported they cannot edit a sheet created at the org level (da-admin cannot read the sheet). 2 solutions: fix da-admin or simply restrict the UI to only allow folder creation at the org level. This is implementing the latter.

  • At the org level (path depth 1 — e.g. #/org), clicking New skips the type-picker dropdown and jumps straight to the folder name input, since the only valid thing to create there is a site/folder
  • At site level and deeper (#/org/site/...) the full menu (Folder, Document, Sheet, Media, Link) is preserved unchanged
  • Implemented via a new folderOnly boolean prop on da-new; da-browse derives the value from the existing isRootFolder() helper

Test plan

  • Navigate to an org (#/org) — click New, verify it goes directly to the name input with no dropdown
  • Navigate to a site (#/org/site) — click New, verify the full Folder/Document/Sheet/Media/Link menu appears
  • Create a folder from the org level and confirm it appears in the list
  • npm test passes (1454 tests, all green)

🤖 Generated with Claude Code

At the org level (path depth 1), clicking New skips the type menu and
goes straight to folder-name input. At site level and deeper the full
menu (Document, Sheet, Media, Link, Folder) is preserved.

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

aem-code-sync Bot commented Jun 18, 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

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.

1 participant