(value: &str)
| 444 | } |
| 445 | |
| 446 | fn parse_executor_kind(value: &str) -> ApiResult<ExecutorKind> { |
| 447 | value |
| 448 | .parse() |
| 449 | .map_err(|_| ApiError::bad_request(format!("invalid executor_type: {value}"))) |
| 450 | } |
| 451 | |
| 452 | fn can_view_agent(agent: &Agent, user: &AuthenticatedUser) -> bool { |
| 453 | agent.visibility == "global" || agent.owner_id.as_deref() == Some(&user.user_id) |
no test coverage detected