Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3178] ACS Object update by another

GitHub Issuen/a
TypeNew Feature
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2014-01-01T22:06:12.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsACS, Cloud
ReporterImraan Jhetam
AssigneeRitu Agrawal
Created2012-04-19T08:18:43.000+0000
Updated2016-03-08T07:57:34.000+0000

Description

The documents state that "Only the owner of the object can update the object." How can someone else update an object created by another? For example i have created an object like so: Cloud.Objects.create({ classname: 'cars', fields: { make: 'nissan', color: 'blue', year: 2005 } }, function (e) { if (e.success) { var car = e.cars[0]; alert('Success:\\n' + 'id: ' + car.id + '\\n' + 'make: ' + car.make + '\\n' + 'color: ' + car.color + '\\n' + 'year: ' + car.year + '\\n' + 'created_at: ' + car.created_at); } else { alert('Error:\\n' + ((e.error && e.message) || JSON.stringify(e))); } }); We then want another user who is logged into my app to update it like so: Cloud.Objects.update({ classname: 'cars', id: savedCar1.id, fields: { color: 'purple', mileage: 10000 } }, function (e) { if (e.success) { var car = e.cars[0]; alert('Success:\\n' + 'id: ' + car.id + '\\n' + 'make: ' + car.make + '\\n' + 'color: ' + car.color + '\\n' + 'year: ' + car.year + '\\n' + 'mileage: ' + car.mileage + '\\n' + 'updated_at: ' + car.updated_at); } else { alert('Error:\\n' + ((e.error && e.message) || JSON.stringify(e))); } }); Can this be looked at please

Comments

  1. Davide Cassenti 2012-06-06

    Hello, the behavior you described is expected: currently it is not possible to edit objects created by others, while it is allowed to see them. We are working on a ACL feature that will allow to configure read/write properties for the objects; this will be released in the near future. Thanks for contacting us.
  2. Ritu Agrawal 2014-01-01

    ACS now supports ACL functionality that should enable you to implement your use case. Please let us know if you have any follow up question.
  3. Ritu Agrawal 2014-01-01

    http://docs.appcelerator.com/cloud/latest/#!/api/ACLs

JSON Source