Skip to content
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

Object with Role ACL Write Permissions Issue #389

Closed
raredigital opened this issue Feb 12, 2016 · 2 comments · May be fixed by LadyK-21/parse-server#9
Closed

Object with Role ACL Write Permissions Issue #389

raredigital opened this issue Feb 12, 2016 · 2 comments · May be fixed by LadyK-21/parse-server#9

Comments

@raredigital
Copy link

Hi,

I have ran into an issue with the write permissions on a class object. When I try to update an object that has write permissions set I get an Object Not Found error. If I remove the write permission I am able to successfully update the object. The read permissions on the object seem to be working normally. Parse Server is running on AWS and the database in hosted at MongoLab.

Object in MongoDB:
{ "_id": "AVNXTbPaSg", "installDate": { "$date": "2016-02-12T00:00:00.000Z" }, "location": "Test ACL", "type": "Interior", "_p_company": "Company$4N9uDwBqee", "truckName": "Truck Name", "startTime": "06:15", "_updated_at": { "$date": "2016-02-12T20:34:40.468Z" }, "_created_at": { "$date": "2016-02-11T22:20:51.338Z" }, "_rperm": [ "role:Role Name" ], "_wperm": [ "role:Role Name" ] }

Code to update object:

`strJobId = $('#jobId').val();

// Create the object.
  var Job = Parse.Object.extend("Job");
  var jobObject = new Job();
  jobObject.id = strJobId;

  jobObject.set("location", "updated..yo!");

  jobObject.save(null, {
    success: function(job) {

      console.log(job);
    },
    error: function(job, error) {

      console.log('Failed to update object, with error code: ' + error.message);
    }
  });`

Browser Console Error:
POST http://myparserver.elasticbeanstalk.com/parse/classes/Job/AVNXTbPaSg 404 (Not Found)
myjs.js:408 Failed to update object, with error code: Object not found.

Thanks,
Zain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants