-
-
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
[PROPOSAL] Deprecate fully useMasterKey and Parse.User.currentUser() #2633
Comments
why ? we still using |
@benishak, Parse.Cloud.useMasterKey does not work and you should be sending the useMasterKey option in every individual save/find/etc options instead. HttpRequest is not being deprecated afaik but you should consider using the "request" module instead now that you can use third party node modules. |
Agree with this. IIRC, the current state is that people who port their Cloud Code over without consulting the migration notes may assume their code will continue working as-is as these methods fail silently. |
I've planned that for 2.3.0, to make it breaking/throw error in that case. Do anyone have any voice to raise that those 2 functions will throw an exception starting |
I'm not sure but because when we migrated we almost refactor the whole cloud code and when we were getting 'permission denied use Master Key' we solved it by calling |
even a better reason to prevent the usage of Parse.Cloud.useMasterKey() as it may have horrible side effects with concurrent request... you should use Maybe we haven't been explicit enough about that, an additional reason to enforce it strongly, |
I'm using now the latest version and have a class wich has CLP and ACL set to
It stills working, I also have another Cloud Function which calls |
when you call Basically, calling it once would probably make all future calls use the masterKey which is why we highly recommend you don't use And I never mentioned anything about httpRequest, but |
@flovilmart @hramos |
@cherukumilli yes in the client side SDK that's all good, not on the serverside though... (because of the concurrency and global state of ParseSDK) |
i think this is a great idea that could be helpful to folks migrating (everyone's all done, right?). |
It seems that Parse.User.current() should always return null anyway: https://github.com/ParsePlatform/Parse-SDK-JS/blob/2956decbe54f2cf6d2c17ff1b4d8db98327410d6/src/ParseUser.js#L26 |
As those functions are misleading and unavailable in Cloud Code, I suggest we replace those implementations by implementations that would log a warning in the 1st place and throw an exception later on.
The warning could have a link to the CloudCode migration notes
The text was updated successfully, but these errors were encountered: