parse-community / parse-community/parse-server
log the field that was the added during validatingPermission
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
Current Limitation
Currently, when there's a newly added field to an object, we validate for permission if it can be added
if (newKeys.length > 0) {
// adds a marker that new field is being adding during update
runOptions.addsField = true;
const action = runOptions.action;
return schema.validatePermission(className, aclGroup, 'addField', action);
}
validatePermission can throw an error depending on whether the field can be added or not.
Actual Error :- ParseError: Permission denied for action addField on class _User.
I think would be better to log the newly added field if in case validatePermission throws error
Feature / Enhancement Description
Log the newly added field if the validation fields, as it provides better information on what went wrong.
Expected Error :- ParseError: Permission denied for action addField on class -User.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the shown update path where newKeys are detected and validatePermission is called for the addField action; trace how the newly added field and permission error are represented. Done means a denied addField validation reports the relevant field in the error, with behavior confirmed by the existing permission-validation tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- authorization, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100