(
principal: Option<&crate::auth::principal::Principal>,
)
| 874 | } |
| 875 | |
| 876 | fn authorize_inference_bundle( |
| 877 | principal: Option<&crate::auth::principal::Principal>, |
| 878 | ) -> Result<(), Status> { |
| 879 | match principal { |
| 880 | Some(crate::auth::principal::Principal::Sandbox(_)) => Ok(()), |
| 881 | Some(crate::auth::principal::Principal::User(_)) => Err(Status::permission_denied( |
| 882 | "GetInferenceBundle requires a sandbox principal", |
| 883 | )), |
| 884 | Some(crate::auth::principal::Principal::Anonymous) | None => Err(Status::unauthenticated( |
| 885 | "GetInferenceBundle requires an authenticated sandbox principal", |
| 886 | )), |
| 887 | } |
| 888 | } |
| 889 | |
| 890 | /// Resolve the inference bundle (all managed routes + revision hash). |
| 891 | async fn resolve_inference_bundle(store: &Store) -> Result<GetInferenceBundleResponse, Status> { |
no outgoing calls