-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allowClientClassCreation is not working #4527
Comments
hey, i'm not sure if the booleanParser only parses strings directly coming from the environment variables, so my suggestion might not be working but you might want to try. i assume the problem happens because you are passing the string 'false' to the main config and it is not being processed as the boolean false. rather than trying to set an environment variable yourself, use the envorinment variable: PARSE_SERVER_ALLOW_CLIENT_CLASS_CREATION this is a predefined environment variable and setting this to false should do the trick for you and you can clear your allowClientClassCreation from the config. you can find more default environment variables at src/Options/Definitions.js in parse-server code :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@Nisthar the environment variables are of type String, when being imported in nodejs using the process.env.ENV_VAR. So you need to convert the respective ENV_VAR from string to the Boolean type, since both enableAnonymousUsers and allowClientClassCreation accept Boolean values only. A non-empty string gives it a You can use "yn" package which converts the respective String, containing Boolean type values, to Boolean type. So your code should look something like this :
This should solve the problem. After adding this, committing and pushing the code, Heroku's nodejs buildpack might give you errors saying "yn package was not found", then all you need to do is remove the node_modules from your local repository, do fresh
If still it gives you any other errors, then kindly continue to post the error here. |
I used https://github.com/parse-community/parse-server-example to host my parse server on heroku.
I have edited my
index.js
file:I added
CLIENT_CLASS_CREATION
and set it to false.My parse client is android. I am using this code:
The query should fail. But its giving me
SUCESS
What am i missing here?
The text was updated successfully, but these errors were encountered: