Modeling access control groups and employees
Access control requires that we define access groups and employees.
Access groups and employees can be identified uniquely by their _id
properties. Both of these also have a property name.
Access groups are linked to a hotel chain and will define what region or location the access group has permission to access for writes. Access groups' levels and names will be different for different hotel chains.
Employees belong to a hotel chain and are associated with access groups. This association defines what they all have access to. The following diagram illustrates the relationship between hotels, hotel chains, access groups, and employees:
Access groups can be named differently and have a different granularity for different chains. For example, Ibis hotels have an access group named Europe, which is applicable for all the countries in Europe, and thus, members of...