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

feat: Add localpart to CSV import #100

Merged
merged 2 commits into from
Dec 13, 2024
Merged

feat: Add localpart to CSV import #100

merged 2 commits into from
Dec 13, 2024

Conversation

jannden
Copy link
Contributor

@jannden jannden commented Dec 13, 2024

Closes #96

Changes:

  1. Added localpart field to the User struct as an optional field
  2. Modified CSV import to store the localpart from CSV as metadata as localpart
  3. Updated creation of new users in Zitadel to use localpart as Zitadel user ID
  4. Emitting warning when attempting to update a user with a different localpart
  5. Updated unit and e2e tests to verify

@jannden jannden requested a review from a team as a code owner December 13, 2024 08:48
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 92.91339% with 9 lines in your changes missing coverage. Please review.

Project coverage is 93.18%. Comparing base (f6ffe7c) to head (b267043).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sources/csv.rs 86.76% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
- Coverage   93.26%   93.18%   -0.09%     
==========================================
  Files           9        9              
  Lines        1604     1716     +112     
==========================================
+ Hits         1496     1599     +103     
- Misses        108      117       +9     
Files with missing lines Coverage Δ
src/bin/migrate.rs 98.83% <100.00%> (+0.11%) ⬆️
src/lib.rs 87.12% <100.00%> (+0.72%) ⬆️
src/sources/ldap.rs 97.86% <100.00%> (+<0.01%) ⬆️
src/user.rs 92.56% <100.00%> (+0.90%) ⬆️
src/zitadel.rs 96.73% <100.00%> (+0.09%) ⬆️
src/sources/csv.rs 94.79% <86.76%> (-4.47%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6ffe7c...b267043. Read the comment docs.

emgrav
emgrav previously approved these changes Dec 13, 2024
Copy link
Member

@emgrav emgrav left a comment

Choose a reason for hiding this comment

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

Looks good, many thanks for getting this done so fast! Should we also tag a release in the same PR?

Cargo.toml Outdated Show resolved Hide resolved
@jannden jannden merged commit b267043 into main Dec 13, 2024
4 of 5 checks passed
@jannden jannden deleted the jannden/localpart branch December 13, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSV: Add field to set userId & localpart
2 participants