Add impersonation feature to user management

- Introduced an ImpersonationBar component for admin users to impersonate other users, enhancing user management capabilities.
- Updated the ProfileForm to include an option for allowing impersonation, with a description for clarity.
- Modified the DashboardLayout to conditionally display the impersonation bar based on user roles and cloud settings.
- Added database schema changes to support the new impersonation feature, including a new column for allowImpersonation in the user table.
- Implemented necessary API updates to handle impersonation actions and user data retrieval.
This commit is contained in:
Mauricio Siu
2025-05-06 01:46:20 -06:00
parent 0609d74d2b
commit cc5574e08a
11 changed files with 6322 additions and 3 deletions

View File

@@ -59,6 +59,7 @@ export const users_temp = pgTable("user_temp", {
logCleanupCron: text("logCleanupCron"),
// Metrics
enablePaidFeatures: boolean("enablePaidFeatures").notNull().default(false),
allowImpersonation: boolean("allowImpersonation").notNull().default(false),
metricsConfig: jsonb("metricsConfig")
.$type<{
server: {