Skip to content

Commit 506a884

Browse files
authored
CDR : open result endpoint to sellers (#806)
### Description Please explain the changes you made here. ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] All tests passing - [ ] Extended the documentation, if necessary
1 parent 4e653a7 commit 506a884

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/modules/cdr/endpoints_cdr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,14 +521,16 @@ async def generate_and_send_results(
521521
async def send_seller_results(
522522
seller_id: UUID,
523523
db: AsyncSession = Depends(get_db),
524-
user: models_users.CoreUser = Depends(is_user_in(GroupType.admin_cdr)),
524+
user: models_users.CoreUser = Depends(is_user_a_member),
525525
):
526526
"""
527527
Get a seller's results.
528528
529529
**User must be CDR Admin to use this endpoint**
530530
"""
531531

532+
await is_user_in_a_seller_group(seller_id, user=user, db=db)
533+
532534
path = await generate_and_send_results(seller_id=seller_id, db=db)
533535
return FileResponse(path)
534536

0 commit comments

Comments
 (0)