Ask HN: How to best design a hierarchy of user accounts, orgs and products
Im trying to look for and find standard patterns (if any) for structuring user accounts, organisations, sub organisations and products.
It would need to handle: 1. Role based permissions 2. Roll up billing
My initial thoughts are: 1. A user account is unique but can be a member of 1 or more organisations. 2. An organisation could have one or more sub organisations. 3. An organisation (or sub organisation) would be subscribed to one or more products 4. A the product level, the user would have role based permissions to provide access to certain features.
How would you best design something like this from a rule / hierarchy perspective?
Would you apply role based permissions at every level for the user?