User Management
User Lifecycle
How Users Get Access
┌─────────────────────────────────────────────────────────────────────────────┐
│ USER ONBOARDING FLOW │
└─────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────┐
│ STEP 1: INVITATION │
│ │
│ Admin invites user via email │
│ • User record created with status: "invited" │
│ • User assigned to a team with role │
│ • User optionally assigned to projects │
│ │
└─────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ STEP 2: FIRST LOGIN │
│ │
│ User clicks "Sign in with Google" │
│ • Google OAuth authentication │
│ • Auth Guard verifies email domain (@turing.com) │
│ • Auth Guard looks up user by email │
│ • User found with status "invited" → Change to "active" │
│ • Generate JWT with user context │
│ │
└─────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ STEP 3: ACTIVE USER │
│ │
│ User can now: │
│ • Access teams they're assigned to │
│ • Access projects they're assigned to │
│ • Execute services allowed by team policy │
│ • Use the admin dashboard │
│ │
└─────────────────────────────────────────────────────────────────────────┘User Status
Status
Description
Can Login?
Effect
Global Roles
super_admin
org_admin
member
Effective Role Calculation
Precedence Order
Examples
User
Global
Team Role
Project Role
Accessing Project X
Effective Role
Key Insight
Permissions
Permission List
Permission
Description
Role → Permission Matrix
Permission
super_admin
org_admin
team_admin
team_member
project_admin
editor
viewer
JWT Token
Token Expiration
Token Type
Expiration
Use Case
Admin Dashboard Features
User List View
Column
Description
User Actions
Action
Description
Common Scenarios
Scenario 1: Inviting a New User
Scenario 2: Promoting User to Org Admin
Scenario 3: Suspending a User
Scenario 4: User Leaves the Organization
Best Practices
Role Assignment
Practice
Reason
Security
Practice
Reason
Troubleshooting
"Account is suspended"
"You are not authorized"
"Insufficient permissions"
"Invalid or expired token"
Last updated