feat: read-only impersonation and impersonation opt-out
Problem
Changes
How did you test this code?
đ Stay up-to-date with PostHog coding conventions for a smoother review.
Changelog: (features only) Is this feature complete?
Size Change: +10 B (0%)
Total Size: 3.7 MB
âšī¸ View Unchanged
| Filename | Size | Change |
|---|---|---|
frontend/dist/toolbar.js |
3.7 MB | +10 B (0%) |
Migration SQL Changes
Hey đ, we've detected some migrations on this PR. Here's the SQL output for each migration, make sure they make sense:
posthog/migrations/0940_user_allow_impersonation.py
BEGIN;
--
-- Add field allow_impersonation to user
--
ALTER TABLE "posthog_user" ADD COLUMN "allow_impersonation" boolean DEFAULT true NULL;
ALTER TABLE "posthog_user" ALTER COLUMN "allow_impersonation" DROP DEFAULT;
COMMIT;
Last updated: 2025-12-11 23:40 UTC (2f7549a)
đ Migration Risk Analysis
We've analyzed your migrations for potential risks.
Summary: 1 Safe | 0 Needs Review | 0 Blocked
â Safe
Brief or no lock, backwards compatible
posthog.0940_user_allow_impersonation
ââ #1 â
AddField
Adding nullable field requires brief lock
model: user, field: allow_impersonation
đ How to Deploy These Changes Safely
AddField:
This operation acquires a brief lock but doesn't rewrite the table.
Deployment uses lock timeouts with automatic retries, so lock contention will cause retries rather than connection pile-up.
Last updated: 2025-12-11 23:40 UTC (2f7549a)
Visual regression: Storybook UI snapshots updated
Changes: 2 snapshots (2 modified, 0 added, 0 deleted)
What this means:
- Snapshots have been automatically updated to match current rendering
- Next CI run will switch to CHECK mode to verify stability
- If snapshots change again, CHECK mode will fail (indicates flapping)
Next steps:
- Review the changes to ensure they're intentional
- Approve if changes match your expectations
- If unexpected, investigate component rendering
Visual regression: Storybook UI snapshots updated
Changes: 2 snapshots (2 modified, 0 added, 0 deleted)
What this means:
- Snapshots have been automatically updated to match current rendering
- Next CI run will switch to CHECK mode to verify stability
- If snapshots change again, CHECK mode will fail (indicates flapping)
Next steps:
- Review the changes to ensure they're intentional
- Approve if changes match your expectations
- If unexpected, investigate component rendering
âī¸ Skipped snapshot commit because branch advanced to f41556d while workflow was testing 5a290ac.
The new commit will trigger its own snapshot update workflow.
If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:
- Merge master into your branch, or
- Push an empty commit:
git commit --allow-empty -m 'trigger CI' && git push
Visual regression: Storybook UI snapshots updated
Changes: 2 snapshots (2 modified, 0 added, 0 deleted)
What this means:
- Snapshots have been automatically updated to match current rendering
- Next CI run will switch to CHECK mode to verify stability
- If snapshots change again, CHECK mode will fail (indicates flapping)
Next steps:
- Review the changes to ensure they're intentional
- Approve if changes match your expectations
- If unexpected, investigate component rendering