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

editoast: implement Authorizer creation middleware #8319

Merged
merged 1 commit into from
Aug 5, 2024
Merged

Conversation

leovalais
Copy link
Contributor

@leovalais leovalais commented Aug 2, 2024

Half of the axum server is in main.rs and the rest in views/mod.rs. We'll need to homogenize that.

We removed the lazy role fetching and caching as this would require internal mutability since the Authorizer now lives in an Arc. Instead, we now fetch the roles when the Authorizer is initialized.

Closes #8276

@leovalais leovalais requested a review from a team as a code owner August 2, 2024 13:54
@leovalais leovalais requested review from Wadjetz and hamz2a August 2, 2024 13:57
@leovalais leovalais force-pushed the authorizer-middleware branch from 5c71392 to 457a29b Compare August 2, 2024 13:58
@codecov-commenter
Copy link

codecov-commenter commented Aug 2, 2024

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

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.74%. Comparing base (9d45d8c) to head (f7d3090).
Report is 9 commits behind head on dev.

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

Additional details and impacted files
@@            Coverage Diff            @@
##                dev    #8319   +/-   ##
=========================================
  Coverage     36.73%   36.74%           
  Complexity     2163     2163           
=========================================
  Files          1282     1282           
  Lines        119626   119651   +25     
  Branches       3218     3226    +8     
=========================================
+ Hits          43943    43962   +19     
+ Misses        73752    73750    -2     
- Partials       1931     1939    +8     
Flag Coverage Δ
core 75.59% <ø> (ø)
editoast 66.84% <100.00%> (-0.05%) ⬇️
front 15.73% <ø> (+0.04%) ⬆️
gateway 2.03% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 72.98% <ø> (ø)

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.

@leovalais leovalais force-pushed the authorizer-middleware branch 5 times, most recently from 0ed793d to 52a6dde Compare August 2, 2024 15:46
@leovalais leovalais force-pushed the authorizer-middleware branch from 52a6dde to f7d3090 Compare August 2, 2024 15:47
Copy link
Contributor

@hamz2a hamz2a left a comment

Choose a reason for hiding this comment

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

LGTM, thanks !

Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

LGTM

@Khoyo Khoyo added this pull request to the merge queue Aug 5, 2024
Merged via the queue into dev with commit c8faee9 Aug 5, 2024
20 checks passed
@Khoyo Khoyo deleted the authorizer-middleware branch August 5, 2024 13:38
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.

editoast: make an authorizer request extractor
6 participants