Skip to content

editoast: views: POST:/timetable/{id}/stdcm endpoint: add authorization for the rolling stocks used in the query - #17433

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

editoast: views: POST:/timetable/{id}/stdcm endpoint: add authorization for the rolling stocks used in the query#17433
Sh099078 merged 1 commit into
feature-branch/check-rolling-stock-privilegesfrom
lf/perm-stdcm-endpoint

Conversation

@Sh099078

@Sh099078 Sh099078 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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

Note

The authorization tests might need some refactoring to be more concise (?)

Authorization rules:

  • Users must have the Reader grant on every rolling stock.
  • Users must have the Stdcm role.

The endpoint tests now also take into account infra permissions.

@Sh099078 Sh099078 self-assigned this Jun 29, 2026
@Sh099078 Sh099078 moved this to In Progress in Board PI 20 Jun 29, 2026
@github-actions github-actions Bot added the area:editoast Work on Editoast Service label Jun 29, 2026
@Sh099078 Sh099078 changed the title editoast: POST:/timetable/{id}/stdcm endpoint: check consist permissions editoast: views: POST:/timetable/{id}/stdcm endpoint: add authorization for the rolling stocks used in the query Jun 29, 2026
@Sh099078
Sh099078 force-pushed the lf/perm-stdcm-endpoint branch 13 times, most recently from be434dd to a57168b Compare June 29, 2026 22:34
@Sh099078
Sh099078 marked this pull request as ready for review June 29, 2026 22:36
@Sh099078
Sh099078 requested a review from a team as a code owner June 29, 2026 22:36
@Sh099078 Sh099078 moved this from In Progress to Awaiting merge in Board PI 20 Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ API changes

This Pull Request introduces some changes in the API:

  • please own it: notify or even prepare dedicated PR(s) to consumer projects

@younesschrifi younesschrifi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR :)

Comment thread editoast/src/views/timetable/stdcm.rs Outdated
Comment thread editoast/src/views/timetable/stdcm.rs Outdated
@Sh099078
Sh099078 force-pushed the lf/perm-stdcm-endpoint branch 2 times, most recently from 6b4fbcb to 35d5606 Compare June 30, 2026 11:24
@Sh099078
Sh099078 requested a review from younesschrifi June 30, 2026 11:28
@Sh099078
Sh099078 force-pushed the lf/perm-stdcm-endpoint branch from 2f19bf4 to f2fc10b Compare July 1, 2026 21:34
@github-actions github-actions Bot removed area:front Work on Standard OSRD Interface modules kind:api-change labels Jul 1, 2026
@Sh099078
Sh099078 force-pushed the lf/perm-stdcm-endpoint branch 5 times, most recently from 85ab2cb to 714872d Compare July 1, 2026 22:39
@Sh099078
Sh099078 requested a review from leovalais July 1, 2026 22:41

@leovalais leovalais left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tests are much better now thanks

Comment thread editoast/src/views/timetable/stdcm.rs
@Sh099078
Sh099078 force-pushed the lf/perm-stdcm-endpoint branch from 44856ac to 5084f90 Compare July 3, 2026 09:20
@younesschrifi
younesschrifi force-pushed the feature-branch/check-rolling-stock-privileges branch from 25b1202 to c6e470e Compare July 3, 2026 12:33
@SharglutDev
SharglutDev removed the request for review from a team July 10, 2026 12:58
@Sh099078
Sh099078 force-pushed the lf/perm-stdcm-endpoint branch from 5084f90 to 2135e57 Compare July 13, 2026 10:49
@Sh099078

Copy link
Copy Markdown
Contributor Author

rebased on the feature branch

@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-stdcm-endpoint branch from 2135e57 to d106522 Compare July 15, 2026 08:47
@Sh099078

Copy link
Copy Markdown
Contributor Author

rebase

@Sh099078
Sh099078 requested a review from leovalais July 16, 2026 10:02
Comment thread editoast/src/views/timetable/stdcm.rs Outdated
@Sh099078
Sh099078 force-pushed the lf/perm-stdcm-endpoint branch from 746baf7 to 11e0e7a Compare July 17, 2026 13:31
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
@Sh099078
Sh099078 force-pushed the lf/perm-stdcm-endpoint branch from 11e0e7a to fc91c66 Compare July 17, 2026 18:01
@Sh099078
Sh099078 merged commit 89df84a into feature-branch/check-rolling-stock-privileges Jul 17, 2026
31 checks passed
@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
@Sh099078
Sh099078 deleted the lf/perm-stdcm-endpoint branch July 17, 2026 18:35
@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