Skip to content

Add permission requests for directories of subdomains associated with apps owned by the user#2507

Merged
KernelDeimos merged 4 commits intomainfrom
eric/262H0_request-app-root-dir
Feb 18, 2026
Merged

Add permission requests for directories of subdomains associated with apps owned by the user#2507
KernelDeimos merged 4 commits intomainfrom
eric/262H0_request-app-root-dir

Conversation

@KernelDeimos
Copy link
Copy Markdown
Contributor

This allows an app to request permission to access the directory for one of the user's apps. The user must have permission to access the directory in order for the app to have permission. The subdomain associated with the app is determined in one of two ways:

  1. Subdomain has an associated app set (typical deployment)
  2. Subdomain URL matches (create a site and then set index url of an app)

Permission is checked primarily based on filesystem permission of the directory. App ownership is also checked as an additional precaution.

Add the ability to request an app's root directory. A permission
rewriter is provided so that apps may refer to a permission when
requesting this access without knowing the path of the app's root
directory.
Add support for requesting access to the root directory of an app's
associated subdomain.
Fix ESM/CJS interop issue in unit tests with a hack that checks the
class name as a string instead of just doing an `instanceof` check. This
is assuming that the "rewriter must be a PermissionRewriter" error I'm
seeing on GitHub is because there are two different "copies" of
PermissionWriter due to ESM/CJS interop issues. If this is not the case,
then you're not reading this commit message on `main`; if this commit is
on `main` then that's exactly what went down.
@KernelDeimos
Copy link
Copy Markdown
Contributor Author

I hate ESM/CJS interop soooo much

@KernelDeimos KernelDeimos merged commit cecb63b into main Feb 18, 2026
4 checks passed
@jelveh jelveh deleted the eric/262H0_request-app-root-dir branch May 1, 2026 20:09
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