Description
We use GitHub Issues for bugs.
If you have a non-bug question, ask on Stack Overflow or Server Fault:
You may also search through existing issues before opening a new one: https://github.com/ParsePlatform/Parse-Server/issues?utf8=%E2%9C%93&q=is%3Aissue
--- Please use this template. If you don't use this template, your issue may be closed without comment. ---
Issue Description
When attempting to retrieve a user to update, I cannot update my admin field. My javascript code stops after calling the user but it will not allow me to update fields. I have attempted using the master key and I am still unable to actually load the user.
Steps to reproduce
`Parse.Cloud.define("modifyAdminStatus", function(request, response) {
var userQuery = new Parse.Query(Parse.User);
var isAdmin = request.params.adminStatus
userQuery.equalTo("username", request.params.username);
userQuery.find({ useMasterKey: true,
success: function(user) {
console.log(user.length);
console.log("Got User")
console.log(user);
user.set("isAdmin", isAdmin);
console.log("Set Status");
user.save(null, {useMasterKey: true,
success: function(user) {
response.success();
},
error: function(error) {
response.error(error.message);
}
});
},
error: function(error) {
response.error(error.message);
}
});
});`
The output I get in console is:
1 Got User [ ParseUser { _objCount: 46, className: '_User', id: '2vigcitsl6' } ]
Expected Results
Update and save the user
Actual Outcome
Code is stopped and does not update the user
Environment Setup
-
Server
- parse-server version (Be specific! Don't say 'latest'.) : 2.3.3
- Operating System: Linux 16.1
- Hardware: Intel NUC Celeron 4GB Ram 500GB 7200rpm
- Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): Local server
-
Database
- MongoDB version: 2.6.11
- Storage engine:
- Hardware: Same as above
- Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): Local
Logs/Trace
Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment.