I am building a WebApp With AWS Amplify
.
I have the following object as part of my schema.graphql
file.
type Xbiis @model @auth(rules: [{ allow: private,
operations: [create, update, delete, read] }])
{
id: ID!
name: String!
owner: User! @hasOne
defaultRole: AccessLevel
}
I want to limit access and queries to only users who are logged in.
When I login with my "admin user". That created everything. It works fine.
When I login with my second normal user I account I get the error
Not Authorized to access listXbiis on type Query
.
Originally, Xbiis had a more complicated security model
type Xbiis @model @auth(rules: [{ allow: groups, groups: ["WebAppAdmin"],
operations: [create, update, read, delete] },
{ allow: public, operations: [read] }])
{
Could it be some semblence of of the old model in the backend still. Even though I ran a push with Xbiis commented out in the schema file?
What is causing the permissions error and how do I fix it?