We can declare an access rule on a particular role like this
"""@model"""
type Test {
"""
@allowOn('USER', 'allow1', 'create')
"""
test: String
}
Which forces the all create inputs for any USER to set test = 'allow1'. This way, USER can create a Test with the test field set to anything other than allow1.
What happens when two or more create rules are defined on the same field?
Currently, the test field will always be set to allow2.
This creates no problems for 'read' and 'delete' operations because they do not save data. Forcing the filters work for queries but maybe we shouldn't force inputs.
We can declare an access rule on a particular role like this
Which forces the all create inputs for any
USER
to settest = 'allow1'
. This way,USER
can create aTest
with the test field set to anything other thanallow1
.What happens when two or more
create
rules are defined on the same field?Currently, the test field will always be set to
allow2
.This creates no problems for 'read' and 'delete' operations because they do not save data. Forcing the filters work for queries but maybe we shouldn't force inputs.