editoast: add authorization to GET:rolling_stock/{id}/usage - #17383
Conversation
ab22a29 to
962df22
Compare
younesschrifi
left a comment
There was a problem hiding this comment.
LGTM.
I wrote some comments you can resolve after making the changes.
9cda363 to
af93581
Compare
e8524c6 to
fec34fa
Compare
af93581 to
49c63ff
Compare
49c63ff to
25b1202
Compare
|
(I have pending review comments and I cannot comment on the thread unless I discard them all... thx github, this is a response to #17383 (comment)) That's indeed a serious design flaw... I'm not a huge fan of ordering tests though.
I've experimented a bit and came up with #17521. Lmk what you think @Sh099078. Basically no changes for endpoints where ordering is irrelevant. Handling the relative order of checks boils down to consuming the |
fec34fa to
63f2e61
Compare
25b1202 to
c6e470e
Compare
63f2e61 to
1f20be5
Compare
|
rebased on the feature branch |
77c7390 to
3d24d43
Compare
1f20be5 to
bcb7b4e
Compare
|
rebase |
|
I would be in favor of merging the MR as is and keep skipping authz on the problematic test if that's fine with you @leovalais: the undefined http response code is not directly related to this PR |
leovalais
left a comment
There was a problem hiding this comment.
ignore old comments, github won't let me delete them...
- Users must have the Reader grant on the rolling stock to get its usage. - No role is required (or allows) to read a rolling stock usage except admin. Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
6438c47 to
c4663a1
Compare
d28bc5c
into
feature-branch/check-rolling-stock-privileges
Note
There are a lot of line changes but it's mainly because of tests moved into a submodule. Authorization tests have been added, the existing ones are unchanged.
Authorization rules:
Part of #17364 / https://github.com/osrd-project/osrd-confidential/issues/1064.