-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datastore update auth groups Unauthorized error #5162
Comments
Hi @jamontesg, your update function looks good to me. Do you see this behavior on iOS too? |
Thanks @Equartey (test done in emulators) |
Hi @Equartey, any news about this issue ? |
Hi @jamontesg, no updates yet. Still need to reproduce the error. We will provide an update from our investigation we possible. |
Hi @jamontesg, small update I was able to reproduce the issue, and believe this to be a bug. Will be working next finding the root cause and solution. Updates to follow. |
thanks @Equartey , tell me if you need more info from my side. |
@jamontesg we will let you know if there is any information you need, thanks. |
thanks @khatruong2009 |
@jamontesg we are working with the Amplify Android team to investigate this issue and will provide you update as we have them. thanks for your patience. |
Hi @jamontesg, sorry for the delay. I investigated this with both the Amplify Swift and Android teams, and we have determined that the observed error is expect. Update mutations within DataStore require the delete permission. Which is due to our libraries including To explain what was seen here, Android was working correctly by returning the error. The observation that Swift was working was the result of a bug and will be corrected to mirror behavior observed on Android. I have an open PR #5370 to address this. I will notify you here when its available. Again, apologies for the delay, please let us know if you have any additional questions. |
Thanks @Equartey , if. Android is working properly. For what is update permission ? I think that update permissions is useless. |
Hi @jamontesg, while using DataStore I understand that conclusion. Unfortunately, its currently a technical requirement when using DataStore. If you want to use the update permission how you were initially thinking, I recommend using the API category escape hatch to create your own GraphQL requests. The generated requests by the library make assumptions about what how to handle null values. |
Ok @Equartey, thanks for your time. |
Closing this issue out as it was released in v2.4.1 |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Description
I have a table using authorization rules with cognito groups
profile Operative has. permission "update" but not. delete.
when I try to update a item whit this code:
This code only update a field "images" and generates the following error:
but, if I add a. "delete" permission
update record works fine.
Does my update function have any errors?
What are the auth rules for. update (without delete permission) ?
Kind regards
Thanks. for your. time
Categories
Steps to Reproduce
configure DynamoDB/ API /. AUTH with cognate group access.
define a auth rule. with update but without delete permission
tries to. update a item
Screenshots
No response
Platforms
Flutter Version
3.22.2
Amplify Flutter Version
2.2.0
Deployment Method
Amplify CLI
Schema
The text was updated successfully, but these errors were encountered: