I am going through the Modeling Google Groups with...
# spicedb
m
I am going through the [Modeling Google Groups with SpiceDB](

https://www.youtube.com/watch?v=dlARPyDVPZQ

) and it's very useful, but I have one question about assigning user defined permissions to objects. Specifying who can search for a group is done like this:
Copy code
// Dynamically determine who is allowed to search for the group
relation searchers: organization#member
permission view_in_search = owner + (member + searchers - banned)
If admin of group
test
decides they want group to be searchable by anyone in the organisation they would update the setting in the application UI which would then instantiate the following relationship:
Copy code
// Write this rel to allow any org member to search for the group
group:test#searchers@organization:authzed#member
However, here we must specify the name/ID or organisation whose members are allowed to search for group
test
(in this case the organisation being
authzed
). Is there a way to set things up, so when this setting is selected in the application UI, the members of organisation group
test
belongs to are specified as searchers without having to manually specify the organisation ID?
2 Views