Managing Roles Memberships in Fauna (DB) (the hacky way)
The above definitions are a hacky way to manage base role memberships while still being able to do proper check of a Ref roles.
You would manage the memberships predicates by modifying a User-Defined Function. (It doesn't sound amazing but well, until we're able to read a predicate and use it as a Lambda, I see no other way.)
Let me know if you see optimizations ;)