As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Business Logic - How to set _acl.creator value manually?
R
Ryan Henderson
started a topic
over 9 years ago
I'm creating an entity from a business logic custom endpoint. I create a JSON object, then call "modules.utils.kinveyEntity(object)" to set the metadata properties. I then overwrite the "_acl.creator" property with the desired user's "_id" property value.
When I look in the data store, the "_acl.creator" property appears to have been set correctly, however, when I query the data store (which is set to Private) as the target user, the new object is not returned.
Is this the wrong way to overwrite the creator value? Is there another way to do it from the business logic?
1 Comment
I
Igor
said
over 9 years ago
Ryan,
I had the same issue: \_id is stored as BSON while \_acl.creator is a string. You have to overwrite object.\_acl.creator with your user's \_acl.creator property value.
Ryan Henderson
When I look in the data store, the "_acl.creator" property appears to have been set correctly, however, when I query the data store (which is set to Private) as the target user, the new object is not returned.
Is this the wrong way to overwrite the creator value? Is there another way to do it from the business logic?