Changing the owner of a record via console or API?
d
daniel_sedlacek
started a topic
almost 5 years ago
Hi
As an admin I need to create a new data record on behalf of my user but I have noticed I can not change the "creator" attribute in the _acl field - even if I am logged in with the master key. Is there a way to change the owner of a record or create a record on user's behalf?
Thanks
Best Answer
W
Wani
said
almost 5 years ago
Hi Daniel,
You can achieve this with Kinvey API console.
Make POST request to the collection you want.
Use master secret for authentication.
In request body, include _acl property as below along with all other columns-values: "_acl": { "creator": "<id of user you want as creator>" }
Using Kinvey console or API PUT request, you cannot edit the _acl.creator property once the object is created.
Through the API Console, you can POST a request as a particular user. (It's under the "Authentication" option). Attached is a screenshot where you can login as a specific user and then run the POST request and check "_acl.creator" for the newly posted entry.
Let me know if this works for you.
Thanks,
Pranav
Kinvey Support
d
daniel_sedlacek
said
almost 5 years ago
Hi Pranav
the problem is that I do not know the passwords of my users - obviously - and I am not going to ask my users to send me their passwords via email. As an admin of the DB I should be able to create a record on their behalf - or change the ownership of a record, but whenever I try to change the _acl.creator via the console it fails.
Thanks
W
Wani
said
almost 5 years ago
Answer
Hi Daniel,
You can achieve this with Kinvey API console.
Make POST request to the collection you want.
Use master secret for authentication.
In request body, include _acl property as below along with all other columns-values: "_acl": { "creator": "<id of user you want as creator>" }
Using Kinvey console or API PUT request, you cannot edit the _acl.creator property once the object is created.
Let me know if this is helpful.
Regards,
Wani
Kinvey Support
d
daniel_sedlacek
said
almost 5 years ago
Hi Wani, I understand, I can create but not change. Thanks
daniel_sedlacek
Hi
As an admin I need to create a new data record on behalf of my user but I have noticed I can not change the "creator" attribute in the _acl field - even if I am logged in with the master key. Is there a way to change the owner of a record or create a record on user's behalf?
Thanks
Hi Daniel,
You can achieve this with Kinvey API console.
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstPranav J
Daniel,
Through the API Console, you can POST a request as a particular user. (It's under the "Authentication" option). Attached is a screenshot where you can login as a specific user and then run the POST request and check "_acl.creator" for the newly posted entry.
Let me know if this works for you.
Thanks,
Pranav
Kinvey Support
daniel_sedlacek
Hi Pranav
the problem is that I do not know the passwords of my users - obviously - and I am not going to ask my users to send me their passwords via email. As an admin of the DB I should be able to create a record on their behalf - or change the ownership of a record, but whenever I try to change the _acl.creator via the console it fails.
Thanks
Wani
Hi Daniel,
You can achieve this with Kinvey API console.
daniel_sedlacek
Hi Wani, I understand, I can create but not change. Thanks
1 person likes this
-
My columns disappeared from the databrowser
-
Api console with query body
-
Users being imported
-
How to delete a archived project?
-
Console Logs still lock up
-
Collections Do Not Get Destroyed
-
Importing Large Data Sets
-
Upload public image through console
-
Unable to download or delete added FIles
-
Bug: Using API Console to list entities error
See all 124 topics