Mercurial > hg > orthanc-tests
comparison NewTests/Authorization/auth_service.py @ 659:3ac37a99a093
new tests for auth: uploader-a
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 24 Jun 2024 18:28:43 +0200 |
parents | c28bd957cb93 |
children |
comparison
equal
deleted
inserted
replaced
658:31a7e52b3da6 | 659:3ac37a99a093 |
---|---|
45 name="user-a", | 45 name="user-a", |
46 permissions=["view"], | 46 permissions=["view"], |
47 authorized_labels=["label_a"], | 47 authorized_labels=["label_a"], |
48 validity=60 | 48 validity=60 |
49 ) | 49 ) |
50 elif user_profile_request.token_value == "token-uploader-a": # this use shall be able to upload anything but view only the labeled studies | |
51 p = UserProfileResponse( | |
52 name="uploader-a", | |
53 permissions=["view", "upload"], | |
54 authorized_labels=["label_a"], | |
55 validity=60 | |
56 ) | |
50 | 57 |
51 return p | 58 return p |
52 | 59 |
53 | 60 |
54 @app.post("/tokens/validate") | 61 @app.post("/tokens/validate") |