Skip to content

editoast: add authorization to POST:/rolling_stock/{id}/livery - #17392

Merged
Sh099078 merged 1 commit into
feature-branch/check-rolling-stock-privilegesfrom
lf/perm-endpoint-rs-post-livery
Jul 17, 2026
Merged

editoast: add authorization to POST:/rolling_stock/{id}/livery#17392
Sh099078 merged 1 commit into
feature-branch/check-rolling-stock-privilegesfrom
lf/perm-endpoint-rs-post-livery

Conversation

@Sh099078

@Sh099078 Sh099078 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Part of #17364 / https://github.com/osrd-project/osrd-confidential/issues/1064.

Note

There were no existing tests for the endpoint. The PR does the minimum required to test its authorization (add a random png in the tests folder) but the endpoint could definitely use more tests later (I got a lot of different 5xx errors while trying to use the endpoint, it doesn't parse user input safely at all).

Note

The openapi description of the endpoint request body is wrong and should be changed (not in this PR though).

Authorization rules:

  • Users must have the CanWrite privilege on the rolling stockand the OperationalStudies role to post a livery.
  • No role is required (or allows) to use the endpoint except admin.

@Sh099078 Sh099078 self-assigned this Jun 25, 2026
@github-actions github-actions Bot added the area:editoast Work on Editoast Service label Jun 25, 2026
@Sh099078 Sh099078 moved this to In Progress in Board PI 20 Jun 25, 2026
@Sh099078 Sh099078 changed the title WIP editoast: add authorization to POST:/rolling_stock/{id}/livery WIP editoast: add authorization to POST:/rolling_stock/{id}/livery Jun 25, 2026
@Sh099078
Sh099078 force-pushed the lf/perm-endpoint-rs-post-livery branch 3 times, most recently from 47fb55d to 255130b Compare June 25, 2026 13:37
@github-actions github-actions Bot added the area:integration-tests Work on Integration test, by nature related to different services label Jun 25, 2026
@Sh099078
Sh099078 force-pushed the lf/perm-endpoint-rs-post-livery branch 3 times, most recently from 115dc58 to 81bd195 Compare June 25, 2026 14:09
@Sh099078
Sh099078 marked this pull request as ready for review June 25, 2026 14:16
@Sh099078
Sh099078 requested review from a team as code owners June 25, 2026 14:16
@Sh099078
Sh099078 force-pushed the lf/perm-endpoint-rs-post-livery branch from 81bd195 to 0ec8a73 Compare June 25, 2026 14:19
@Sh099078 Sh099078 moved this from In Progress to Awaiting merge in Board PI 20 Jun 25, 2026
@Sh099078 Sh099078 changed the title WIP editoast: add authorization to POST:/rolling_stock/{id}/livery editoast: add authorization to POST:/rolling_stock/{id}/livery Jun 25, 2026
Comment thread editoast/src/views/rolling_stock.rs Outdated
@younesschrifi
younesschrifi force-pushed the feature-branch/check-rolling-stock-privileges branch from 9cda363 to af93581 Compare June 26, 2026 14:04
@Sh099078
Sh099078 force-pushed the feature-branch/check-rolling-stock-privileges branch from af93581 to 49c63ff Compare June 29, 2026 14:35
@younesschrifi
younesschrifi force-pushed the feature-branch/check-rolling-stock-privileges branch from 49c63ff to 25b1202 Compare July 1, 2026 07:53
@Sh099078
Sh099078 force-pushed the lf/perm-endpoint-rs-post-livery branch from 0ec8a73 to c1b5c6e Compare July 2, 2026 12:25
@Sh099078

Sh099078 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

rebased on the feature branch

@younesschrifi
younesschrifi force-pushed the feature-branch/check-rolling-stock-privileges branch from 25b1202 to c6e470e Compare July 3, 2026 12:33
@Sh099078
Sh099078 force-pushed the lf/perm-endpoint-rs-post-livery branch 2 times, most recently from 377d617 to 77d5954 Compare July 13, 2026 09:16
@Sh099078

Copy link
Copy Markdown
Contributor Author

rebase on dev & resolve conflict

@Sh099078
Sh099078 force-pushed the lf/perm-endpoint-rs-post-livery branch from 77d5954 to c7d041c Compare July 13, 2026 09:17
@younesschrifi
younesschrifi force-pushed the feature-branch/check-rolling-stock-privileges branch from 77c7390 to 3d24d43 Compare July 15, 2026 07:20
@Sh099078
Sh099078 force-pushed the lf/perm-endpoint-rs-post-livery branch from c7d041c to 6ce627e Compare July 15, 2026 08:45
@Sh099078

Copy link
Copy Markdown
Contributor Author

rebase

Comment thread editoast/authz/src/v2/rolling_stock.rs
Comment thread editoast/src/views/rolling_stock.rs
Comment thread editoast/src/views/rolling_stock.rs Outdated
Comment thread editoast/src/views/rolling_stock.rs Outdated
Comment thread editoast/src/views/rolling_stock.rs Outdated
Comment thread editoast/src/views/rolling_stock.rs Outdated
Comment thread editoast/src/views/rolling_stock.rs Outdated
Comment thread editoast/authz/src/model.rs Outdated
@github-actions github-actions Bot removed the area:integration-tests Work on Integration test, by nature related to different services label Jul 17, 2026
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
@Sh099078
Sh099078 force-pushed the lf/perm-endpoint-rs-post-livery branch from 99cd32e to b21c728 Compare July 17, 2026 12:40
@Sh099078
Sh099078 merged commit 4f1a1fb into feature-branch/check-rolling-stock-privileges Jul 17, 2026
31 checks passed
@Sh099078
Sh099078 deleted the lf/perm-endpoint-rs-post-livery branch July 17, 2026 13:32
@github-project-automation github-project-automation Bot moved this from Awaiting merge to Awaiting Validation in Board PI 20 Jul 17, 2026
@github-project-automation github-project-automation Bot moved this to Awaiting Validation in Board PI 21 Jul 17, 2026
@Maymanaf Maymanaf removed this from Board PI 20 Jul 23, 2026
@Maymanaf Maymanaf moved this from Awaiting Validation to Done in Board PI 21 Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:editoast Work on Editoast Service

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants