Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add migration that backfills scim user email hashes #9295

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

daveleek
Copy link
Contributor

A migration that sets already added SCIM users' email_hash

Copy link

vercel bot commented Feb 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2025 8:05am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2025 8:05am

Copy link
Contributor

github-actions bot commented Feb 11, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

db.runSql(`
UPDATE users
SET email_hash = md5(email::text)
WHERE scim_external_id IS NOT NULL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why scim_external_id and not scim_id? Providers don't need to set scim_external_id so there's cases where it's null. scim_id should always be set for a scim user or a user where scim has taken over

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, changed it!

Copy link
Member

@sighphyre sighphyre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daveleek daveleek merged commit 5921f0e into main Feb 12, 2025
9 checks passed
@daveleek daveleek deleted the chore/scim-email-hash-backfill branch February 12, 2025 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants