When considering the architecture of any system and how a user will interact with it, it determines the types of relationship surrounding a user and any permissions or grouping models you might need.
Usually this task is discussed early on in the planning phase and, as such, this was the case when working on a Learning Management System with a user base over 100k.
The requirement was to have a User Management module which facilitated the management of user permission groups and user roles along with facility & organisation associations.
The logic of the module was split into two sections. The first was focusing on the Organisations and Facilities:
The second section was built for managing users, permissions groups and further associations:
Although this module contained, to a large extent, the functionality required for the first phase of development, it was largely used on a second platform focussing on a different area of the business.