Skip to content

Commit b969bc9

Browse files
author
Ben Elam
committed
Ensure resume_process_endpoint checks workflow auth
This was already enabled in resume_process, but we weren't passing the user model in to be checked.
1 parent f0677d1 commit b969bc9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

orchestrator/api/api_v1/endpoints/processes.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@ def new_process(
150150
dependencies=[Depends(check_global_lock, use_cache=False)],
151151
)
152152
def resume_process_endpoint(
153-
process_id: UUID, request: Request, json_data: JSON = Body(...), user: str = Depends(user_name)
153+
process_id: UUID,
154+
request: Request,
155+
json_data: JSON = Body(...),
156+
user: str = Depends(user_name),
157+
user_model: OIDCUserModel | None = Depends(authenticate),
154158
) -> None:
155159
process = _get_process(process_id)
156160

@@ -166,7 +170,7 @@ def resume_process_endpoint(
166170
broadcast_invalidate_status_counts()
167171
broadcast_func = api_broadcast_process_data(request)
168172

169-
resume_process(process, user=user, user_inputs=json_data, broadcast_func=broadcast_func)
173+
resume_process(process, user=user, user_inputs=json_data, user_model=user_model, broadcast_func=broadcast_func)
170174

171175

172176
@router.post(

0 commit comments

Comments
 (0)