Skip to content
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

fix(DataStore): owner based auth, read operations #788

Merged
merged 1 commit into from
Oct 1, 2020
Merged

fix(DataStore): owner based auth, read operations #788

merged 1 commit into from
Oct 1, 2020

Conversation

wooj2
Copy link
Contributor

@wooj2 wooj2 commented Sep 30, 2020

In attempts to fix:
#691

Corresponding android change:
https://github.com/aws-amplify/amplify-android/pull/807/files#diff-5a6612b4d7b74db7c28a89d55c63cd09

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@wooj2
Copy link
Contributor Author

wooj2 commented Sep 30, 2020

There seems to be an issue with using a model like:

 type ModelMultipleOwner @model
   @auth(rules: [
     { allow: owner },
     { allow: owner, ownerField: "editors", operations: [update, read] }
   ]) {
   id: ID!
   content: String
   editors: [String]
 }

That being said, this is already an issue in our current codebase, and the code proposed in this PR doesn't make this issue worse.

@wooj2 wooj2 requested a review from lawmicha September 30, 2020 23:48
@wooj2 wooj2 marked this pull request as ready for review September 30, 2020 23:48
Copy link
Contributor

@lawmicha lawmicha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI there are also some API integration tests that needs to be updated here https://github.com/aws-amplify/amplify-ios/tree/main/AmplifyPlugins/API/AWSAPICategoryPluginIntegrationTests/GraphQL/GraphQLWithUserPoolIntegrationTests/AuthDirective

but i'm guessing these will be vastly improved later anyways on the work you are doing for auth directive support

@wooj2 wooj2 merged commit 892e38d into main Oct 1, 2020
@wooj2 wooj2 deleted the main-691 branch October 1, 2020 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants