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.
I fetched the object from the backend, but when I modify it and try to save it again it always gives me this error:
The credentials used to authenticate this request are not authorized to run this operation. Please retry your request with appropriate credentials
But if I change the entityID it will create a new object and save it without a problem. is there a way to fix this?
Best Answer
W
Wani
said
about 7 years ago
Hi Ben,
This seems like an error with collection level permissions.
My best guess is that you are facing this error due to following scenario: Collection is in shared mode where the logged in user can fetch/view all objects but can modify only the objects created by the logged in user. And logged in user (say A) is trying to modify object created through the console (with master credentials) or by another user (say B).
If you create an object with the logged in user and then, try to modify using the same user, then it should work.
This seems like an error with collection level permissions.
My best guess is that you are facing this error due to following scenario: Collection is in shared mode where the logged in user can fetch/view all objects but can modify only the objects created by the logged in user. And logged in user (say A) is trying to modify object created through the console (with master credentials) or by another user (say B).
If you create an object with the logged in user and then, try to modify using the same user, then it should work.
User A is able to modify the object but then User B is unable to. I have read the article you posted and added this into my code while creating the object:
group.metadata?.setGloballyWritable(true)
group.metadata?.setGloballyReadable(true)
Are you supposed to put it when you create the object and save it into the server or is there another place to put it? Also is there another thing that may be wrong with the code?
W
Wani
said
about 7 years ago
Hi Ben,
Can you tell me about the use case? What's the collection for? Who is supposed to have permissions for read/write? What's the current collection level permissions setting?
Answers to above questions will help me suggest you the best possible approach to set up collections and access control.
The global read/write permissions can be set while creating the object and they can be edited later as well.
Regards,
Wani
B
Ben Loan
said
about 7 years ago
Your previous post answered the question. I had switched the position for the wrong collection and I had relished that right after I posted that. Sorry for the inconvenience.
Ben Loan
I fetched the object from the backend, but when I modify it and try to save it again it always gives me this error:
The credentials used to authenticate this request are not authorized to run this operation. Please retry your request with appropriate credentials
But if I change the entityID it will create a new object and save it without a problem. is there a way to fix this?
Hi Ben,
This seems like an error with collection level permissions.
My best guess is that you are facing this error due to following scenario: Collection is in shared mode where the logged in user can fetch/view all objects but can modify only the objects created by the logged in user. And logged in user (say A) is trying to modify object created through the console (with master credentials) or by another user (say B).
If you create an object with the logged in user and then, try to modify using the same user, then it should work.
Additionally, this document can help you with setting up and managing access permissions and security: http://devcenter.kinvey.com/rest/guides/security
Regards,
Wani
Kinvey Support
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstWani
Hi Ben,
This seems like an error with collection level permissions.
My best guess is that you are facing this error due to following scenario: Collection is in shared mode where the logged in user can fetch/view all objects but can modify only the objects created by the logged in user. And logged in user (say A) is trying to modify object created through the console (with master credentials) or by another user (say B).
If you create an object with the logged in user and then, try to modify using the same user, then it should work.
Additionally, this document can help you with setting up and managing access permissions and security: http://devcenter.kinvey.com/rest/guides/security
Regards,
Wani
Kinvey Support
Ben Loan
Hi Wani,
User A is able to modify the object but then User B is unable to. I have read the article you posted and added this into my code while creating the object:
group.metadata?.setGloballyWritable(true)
group.metadata?.setGloballyReadable(true)
Are you supposed to put it when you create the object and save it into the server or is there another place to put it? Also is there another thing that may be wrong with the code?
Wani
Hi Ben,
Can you tell me about the use case? What's the collection for? Who is supposed to have permissions for read/write? What's the current collection level permissions setting?
Answers to above questions will help me suggest you the best possible approach to set up collections and access control.
The global read/write permissions can be set while creating the object and they can be edited later as well.
Regards,
Wani
Ben Loan
-
Why do I get "Undefined symbols" errors when building with KinveyKit?
-
How do I register push tokens?
-
When using social login, to perform a log-out, do I need to log out of the social network, Kinvey, o
-
How can I assign additional properties to users?
-
Does KinveyKit support 64-bit ARM devices, such as iPhone 5s?
-
Authorization Token Invalid or Expired
-
BOOL and how it is stored in the database.
-
Offline saving throwing errors
-
Custom endpoint not able to form request object
-
Security through business logic
See all 437 topics