Adds support for read-only masterKey#4297
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4297 +/- ##
===========================================
- Coverage 92.49% 82.06% -10.44%
===========================================
Files 118 118
Lines 8169 8196 +27
===========================================
- Hits 7556 6726 -830
- Misses 613 1470 +857
Continue to review full report at Codecov.
|
montymxb
left a comment
There was a problem hiding this comment.
And we'll want to get the coverage up of course.
| rest.del(config, readOnly, 'AnObject', {}) | ||
| }).toThrow(); | ||
| }); | ||
|
|
There was a problem hiding this comment.
Looks like we still need some more tests in here to verify that read still works, config updates are blocked & direct schema updates are blocked
|
Oh and one more thing, we'll need a PR for this feature in the docs, otherwise nobody may know this actually exists... |
|
Push will be block at the RestWrite level, but we can block it earlier. Actually my readOnly users would likely be able to send push notificairtons, so I'll probably have to refactor after to support it. |
|
@montymxb I believe we're good with that one in terms feature + README, I'll update the docs as well. |
README.md
Outdated
There was a problem hiding this comment.
Just a little typo,
This key should be treated...
spec/rest.spec.js
Outdated
There was a problem hiding this comment.
Same name as the test above ^
montymxb
left a comment
There was a problem hiding this comment.
Nothing else besides a couple little wording things
|
@montymxb and those are addressed :) |
|
Sweet! If @marvelm 's PR for relative dates is good, I'd like it in for 2.6.5. |
|
Definitely, once that's present we can start offering it in the sdks! |
|
yep! We plan to use it purely in REST for now, but SDK support would be thrilling :) |
Closes #4296
The motivation for this feature is to provide read only access to all the data, in the dashboard, the readOnlyMasterKey should be treated with as much respect as the masterKey