the larger reason behind such an
# spicedb
b
the larger reason behind such an approach would be to define self referencing relations on the 'org' object to control access to certain featuresets - which can be dynamically added/removed by administrators. For example;
Copy code
definition organization {
....
relation do_something: organization#admin ... other roles here

permission can_do_something = do_something
}

definition user {
relation current: user
relation org: organization
relation do_something: user

permission can_do_something = (current & do_something) + (current & org->can_do_something)
}
v
while this works, it might be easier to implement "access control features" using
user:*
. It's a very common pattern to use it as a "feature flag" to enable or disable certain features.
3 Views