Idea: default is anyone can execute a query.
Or you can specify the following:
{
"databases": {
"my-database": {
"queries": {
"add_twitter_handle": {
"sql": "insert into twitter_handles (username) values (:username)",
"write": true,
"allow": {
"id": ["simon"],
"role": ["staff"]
}
}
}
}
}
}
These get matched against the actor JSON. If any of the fields in any of the keys of "allow" match a key on the actor, the query is allowed.
"id": "*" matches any actor with an id key.
Originally posted by @simonw in #698 (comment)
Originally posted by @simonw in #698 (comment)