Skip to content

Object with Role ACL Write Permissions Issue #389

Closed
LadyK-21/parse-server
#9

Description

@raredigital

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

Activity

  1. flessard commented on Feb 13, 2016

    @flessard
    Contributor

    Will be fix with this pull request

  2. raredigital commented on Feb 13, 2016

    @raredigital
    Author

    @flessard Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions