-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENG-7120] fix calling internal functions from dashboard (#28973)
when components are enabled, we check that function paths are public exports, and if they're not we throw an error early. this is a problem for the dashboard which should be allowed to call internal functions, but they're not public exports. therefore we should have a fallback to the udf path if the function path isn't a public export. we still validate later on that the function is public if the caller is only allowed to call public functions. this is falling back to the legacy behavior where exports aren't special. tested in the dashboard and you can now call internal functions again. also tested with `npx convex run` for good measure (it can call internal functions). and tested with a non-admin client to see that it gives the expected error: ``` Could not find public function for 'messages:sumNumbers'. Did you forget to run `npx convex dev` or `npx convex deploy`? ``` GitOrigin-RevId: df6416e75f90730836d3215511df045f89bbb942
- Loading branch information
Showing
2 changed files
with
23 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters