(method: &str)
| 118 | /// RPCs, but it remains as defense-in-depth. |
| 119 | #[must_use] |
| 120 | pub fn is_user_callable(method: &str) -> bool { |
| 121 | match lookup(method).map(|m| m.mode) { |
| 122 | Some(AuthMode::Sandbox | AuthMode::Unauthenticated) => false, |
| 123 | Some(AuthMode::Bearer | AuthMode::Dual) | None => true, |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | #[cfg(test)] |
| 128 | mod tests { |