Closed badboy-tian closed 1 month ago
Could you please clarify the feature you are suggesting?
for example: I define a cloud function
Parse.Cloud.define("internalFunc", { internal: true, fetchUser:false }, (request)=>{} )
I call the function use parse clicent sdk, for example flutter sdk. return "function not found".
when i call the function from express and parse-server, return normal result
Still don't understand it. What does this have to do with fetchUser
?
fetchUser?: boolean
: Whether to automatically fetch the user logged in on the client side. Defaults to true. When set to false, Request will not contain the currentUser property.
internal?: boolean
: Whether to only allow the function to be invoked within Cloud Function (with Parse.Cloud.run without enabling remote) or with the Master Key (by providing useMasterKey when calling Parse.Cloud.run). When set to true, the function cannot be invoked directly by the client. Defaults to false.
I'm just giving an example, it doesn't matter if fetchUser
is used or not. I just feel that internal: true
is very useful. It allows the cloud function
to be called only internally
on the server, not on the client.
(1) requieres a different discussion than (2), so I'd keep this issue focused on one of the two. If you find (2) important then I suggest to focus on only that for now and adapt the issue title and description to make it easier for readers to follow this.
New Feature / Enhancement Checklist
Current Limitation
Feature / Enhancement Description
current define function
and then add a DefineOptions
Example Use Case
Alternatives / Workarounds
no
3rd Party References
https://docs.leancloud.cn/en/sdk/engine/functions/guides/![image](https://github.com/parse-community/parse-server/assets/2835129/72553fe6-a9dc-49ed-9d8a-c050c23a1745)