``` definition resource_type { relation searcher...
# spicedb
j
Copy code
definition resource_type {
  relation searcher: user
  permission can_search = searcher
}
and then have
resource_type:whatever
per type?
a
Sounds good. Thanks, @Joey - How would the permission check look like? From my understanding, it is required to pass a resource ID while doing the check. In the use case of search this doesn't exist though.
j
the resource ID would be the resource type
resource_type
would be a "meta" type
a
Ah okay, sorry, what is the meta type? Would you mind demonstrating an example request?
j
zed permission check resource_type:someresourcetypehere can_search user:someguy
a
Awesome. Thanks a lot, will give it a try with the Node.js client.
3 Views