I have kind of a tricky problem in my schema: - I ...
# spicedb
p
I have kind of a tricky problem in my schema: - I want to have a wildcard relation that works a bit like "public", in this case it's for a sort of feature flag that I use to make certain "roles" available in the schema via e.g. "permission editor = direct_editor & feature_flag_enabled" - I can of course activate the flag for all users via a relationship to
user:*
- However, I also have a
team
resource, so the full definition of
direct_editor
is more like
relation direct_editor: user | team#member
- I cannot seem to write a relation
team#member:*
- the schema does not even accept
relation feature_flag_enabled: user:* | team#member:*
- Pnly thing I managed to do so far is write a relationship to
team:*
on
feature_flag_enabled
Of course, when I check/lookup resources on behalf of a user, all is well. However, sometimes I need to check if a team has the
editor
role on a given resource, which does not appear to work in this setup (the direct_editor relationships reference `team#member`while the feature flag references the teams themselves. Is there any way to solve this?