-
Notifications
You must be signed in to change notification settings - Fork 79
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
Different authorization for GET and UPDATE #1652
Comments
Hey @biller-aivy, Thank you for bringing this to our attention. We are currently working on reproducing the issue. Could you kindly inform us about the authorization method you used for the read and update operations? |
It's cognito auth users. |
@AnilMaktala do you need more information? Or the complete Schema? For the career?
|
Hey @biller-aivy, We appreciate the additional information you have provided. We will make an effort to replicate the issue and will reach out to you if further details are required. |
Hey @biller-aivy, By following the steps outlined in the description, we have successfully replicated the issue. Therefore, we are categorizing it as a bug for the team to conduct further evaluation. |
@AnilMaktala Do you know in which files the bug could be? Then I could try to solve it. |
any news here? its important because we can't open our system for all users to get the data. |
Any news here @sundersc @AnilMaktala I could help here if needed. |
Hey @biller-aivy, The field The auth rules on the field If you are not using subscriptions, you turn off the subscriptions in the type Career
@model
@auth(
rules: [
{ allow: groups, groups: ["__admin"] }
{ allow: private, provider: iam }
{ allow: private, operations: [read, create] }
{ allow: public, provider: iam, operations: [read] }
{ allow: groups, groupsField: "partner_id" }
{ allow: groups, groupsField: "authorized" }
]
) {
id: ID!
name: String
career_analyse: AWSJSON
@auth(
rules: [
{ allow: groups, groups: ["__admin"] }
{ allow: groups, groupsField: "partner_id" }
{ allow: groups, groupsField: "authorized" }
]
)
createdAt: String
updatedAt: String
} The behavior is called out in the docs. |
But I don't use subscription. The diff comes from a simple update call?! |
Though you are not using subscriptions, it is enabled on the model. You can disable subscriptions using one of the below options. type Career
@model(subscriptions: null) ## or subscriptions: { level: off }
@auth(
rules: [
...
...
]
) {
...
...
} |
Mhhh, and than the res of the update mutation is the same like the get? |
Correct, if you disable subscriptions for this model the |
This issue is now closed. Comments on closed issues are hard for our team to see. |
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
18.6.0
Amplify CLI Version
12.1.1
What operating system are you using?
macOS
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Describe the bug
When I use:
With this Schema:
The Response is:
Expected behavior
The same rules should apply for an update.
Reproduction steps
Try out the Auth Rules
Project Identifier
⠹ Sending zip
DiagnoseReportUploadError
✖ Sending zip
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: