Skip to content

Conversation

@flomonster
Copy link
Member

This PR cleans the x-remote-user-identity and x-remote-user-name when using the mock provider.

Before: mock.identity/Example User
After: mock/mocked


I also fixed the username that was not being passed to editoast. As the mock provider was registered as both a session provider and an identity provider, it always matched the identity (which doesn't provide the username).
To solve this problem, I removed the mock provider's identity implementation. By doing so, the require_login field became unused, so I deleted it.

@flomonster flomonster requested a review from a team as a code owner March 20, 2025 18:30
@flomonster flomonster requested review from a user and sim51 March 20, 2025 18:31
@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 81.42%. Comparing base (997339d) to head (c911486).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
gateway/actix_auth/src/providers/mock.rs 0.00% 6 Missing ⚠️
gateway/actix_auth/src/auth_context.rs 0.00% 2 Missing ⚠️
gateway/src/config_parser.rs 0.00% 2 Missing ⚠️
gateway/actix_auth/src/providers/bearer.rs 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #11215   +/-   ##
=======================================
  Coverage   81.42%   81.42%           
=======================================
  Files        1124     1124           
  Lines      113163   113152   -11     
  Branches      758      758           
=======================================
  Hits        92139    92139           
+ Misses      20969    20958   -11     
  Partials       55       55           
Flag Coverage Δ
editoast 72.47% <ø> (ø)
front 89.96% <ø> (ø)
gateway 2.48% <0.00%> (+0.01%) ⬆️
osrdyne 8.00% <ø> (ø)
railjson_generator 87.58% <ø> (ø)
tests 88.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@Khoyo Khoyo left a comment

Choose a reason for hiding this comment

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

Otherwise lgtm

@flomonster flomonster force-pushed the fam/fix-gateway-mock-provider branch from 89fb796 to ce48858 Compare March 21, 2025 08:45
@flomonster flomonster enabled auto-merge March 21, 2025 08:45
@sim51
Copy link
Contributor

sim51 commented Mar 21, 2025

Tested it.
Now I have a mock/mocked (Example User) in my database., so it works!

@flomonster flomonster force-pushed the fam/fix-gateway-mock-provider branch 2 times, most recently from 192e143 to 42928ba Compare March 25, 2025 08:42
Signed-off-by: Florian Amsallem <florian.amsallem@gmail.com>
@flomonster flomonster force-pushed the fam/fix-gateway-mock-provider branch from 42928ba to c911486 Compare March 25, 2025 11:13
@flomonster flomonster added this pull request to the merge queue Mar 25, 2025
Merged via the queue into dev with commit 8b7dc7c Mar 25, 2025
27 checks passed
@flomonster flomonster deleted the fam/fix-gateway-mock-provider branch March 25, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants