Reputation: 925
I have a model that is restricted to an owner currently. We need to be able to access and update all models from a background lambda process. This is currently possible when the model is set to public using and API key.
In production it has to be owner restricted. I have the below code that I have adapted from the docs.
Can anyone see any issues here or help with the best way to proceed?
type YourModel
@model
@auth(
rules: [
{ allow: owner }
{ allow: private, provider: apiKey }
]
) {
}
Thank you
Upvotes: 1
Views: 77