-
Notifications
You must be signed in to change notification settings - Fork 44
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
front: enable authorization #9237
front: enable authorization #9237
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #9237 +/- ##
============================================
- Coverage 39.77% 39.71% -0.07%
Complexity 2270 2270
============================================
Files 1302 1302
Lines 99565 99671 +106
Branches 3282 3283 +1
============================================
- Hits 39599 39581 -18
- Misses 58034 58157 +123
- Partials 1932 1933 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
4753119
to
4b6af73
Compare
9599907
to
c6fa83f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested every SQL scripts for the permissions, it all seems correct.
c6fa83f
to
4cbb593
Compare
Was fixed in #9278, thanks for reporting it :) |
8d95e53
to
964ef77
Compare
42d4da3
to
964ef77
Compare
310c0fe
to
dea232a
Compare
The user ID of the authorizer and the provided `user_id` may differ. Adds a special case for diabled authorization instead. Signed-off-by: Leo Valais <leo.valais97@gmail.com>
Signed-off-by: nncluzu <ngamenichaka@yahoo.fr>
1d67551
to
18cfb7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a bunch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve editoast part
closes #8049
Warning
There is currently an authorization bug between the core service and the Editoast service that prevents retrieving the
infraId
. This issue is being worked on and will be fixed soon. Because of this, theManageTrainSchedule
andSTDCM
views may have refresh problems.New Functionalities:
Technical Updates:
REQUIRED_USER_ROLES_FOR
object, which describes the required roles for accessing various views, features and those associated with different user profiles.RoleBasedComponent
wrapper by adding thedisabledIfUnauthorized
property, which grays out the wrapped component instead of hiding it when the user lacks proper authorization.How to Test:
Add the environment variable
EDITOAST_DISABLE_AUTHORIZATION: "false"
to thedocker-compose.yml
file, just belowOSRD_MQ_URL
.or if you run editoast individually
EDITOAST_DISABLE_AUTHORIZATION=false cargo run runserver
Rebuild the Editoast Docker Image:
Rebuild the Editoast Docker image and restart it.
Apply the SQL Scripts:
Depending on the user profile and the feature access you want to test, apply the following SQL scripts:
Starting editoast with
EDITOAST_DISABLE_AUTHORIZATION=false
, you should have a subject1
created inauthn_subject
tableRailway Undertaking profil
Operational Studies profil
Superuser
No Authorization to create projet/study/scenario