-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Add master-key-only option when saving config parameter #910
Add master-key-only option when saving config parameter #910
Conversation
Codecov Report
@@ Coverage Diff @@
## master #910 +/- ##
=======================================
Coverage 91.95% 91.95%
=======================================
Files 54 54
Lines 5045 5045
Branches 1133 1133
=======================================
Hits 4639 4639
Misses 406 406
Continue to review full report at Codecov.
|
The code coverage diff seems to be a false positive? The integration tests seem to cover all the changed code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few comments and nits
@mtrezza The code coverage here refers to the unit tests and not the integration tests. |
This reverts commit 04152dc.
What should I do about the decreased coverage? Should I add unit test even though the integration tests cover it already? Correction: Coverage shows no diff anymore. |
Even tho the coverage is a 100% now. A few unit test is recommended Add tests here https://github.com/parse-community/Parse-SDK-JS/blob/master/src/__tests__/ParseConfig-test.js#L103 You can check out the ParseObject-test.js Since you are passing in parameters, you want to check that those parameters get passed into the restController |
How would I do this, like this?
|
There are a few ways, you can do it. (Don't forget to remove
|
The unit test I added fails because Parse-SDK-JS/src/ParseConfig.js Lines 190 to 192 in 2fc8da0
Strange, because that logic was not changed in this PR. |
Amazing! Thanks @dplewis |
@dplewis Could you do a release so we can close parse-community/parse-server#5930? |
This allows to save a config parameter that can be read with master key only using
Parse.Config.save(parameters, masterKeyOnly)
.An additional argument can be added to specify which of the parameters should be retrievable with master key only, for example:
A config parameter is retrievable without master key if it is not added in the
masterKeyOnly
argument or is added with valuefalse
.