This document visualizes the User Account Management hierarchy in SMAP based on the database schema and recent migrations.
The user and role management system uses a flattened, self-referencing structure:
organizations table. Instead, organizations are managed within the users table via the organization_id column, which acts as a self-referencing foreign key to a parent user record.role) in the users table. Supported roles are:superadmin: Has ultimate control over the system.organization_admin: Administrator of a specific organization context.organization_client: A standard user or client belonging to an organization.organization_id). They are defined in the groups table.users_groups.This flow illustrates how a Superadmin sets up a brand new organization client, including setting up their context, groups, and assigning social media accounts to those groups.
This flow illustrates how an existing Organization Admin manages their own context by creating a new group, adding a new client, and assigning social media accounts to that group.