I am looking for a generic open source database schema for a basic login, and user management with roles.
Users: belong to Business Units which belong to Clients.
Users have Roles - Manager, Regional Manager, site manager, worker etc. Users can have multiple roles dependant on the business unit and multiple business units..
Business units belong to Clients. Business units can contain other business units (Region contains other regions which contain business units).
Features: describe behavioral entities in the system. Features are assigned to Users, or to Roles, or both, and also Business Units and/or Clients have features active within the system.
Say for instance it is an accounting system, and has Features such as Payables, Receivables, Reports, General Ledger etc. based on what is active for the Client/Business Unit/Role/User in play, what the user sees is that active matrix hierarchy.
Does anyone have a reference to a schema similar to this that meets those basic requirements? Bonus if it has code for a web based interface (user login, management for the Users, Regions, Roles etc) .Net C# preferred, but I can translate.