I'm trying to implement a system that sets data associated with a user in an ACL-enabled app. I'm able to read data set via
userService:addJSONObject( collectionName, Global.user);
using this code:
It seems there's no difference between data loaded into the storageService with a userService login and data loaded directly through the storageServer. Correct me if I'm wrong about this.
But anyway, when I try to change that data using updateDocument, it doesn't work. I get a Document not found error, despite being able to find it with the findDocumentByKeyValue method.
Do I need to do something with ACLs and user authentication to write the data? If so, how should that be formatted? The docs are unclear about this. Thanks.