Destructive actions (high or critical risk) enabled by the given scopes.
(&self, scopes: &[String])
| 117 | |
| 118 | /// Destructive actions (high or critical risk) enabled by the given scopes. |
| 119 | pub fn destructive_actions_for_scopes(&self, scopes: &[String]) -> Vec<&ApiAction> { |
| 120 | self.actions_for_scopes(scopes) |
| 121 | .into_iter() |
| 122 | .filter(|a| { |
| 123 | let risk = self.action_risk.get(&a.action).map(String::as_str); |
| 124 | matches!(risk, Some("high" | "critical")) |
| 125 | }) |
| 126 | .collect() |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | /// Combined set of credentials and API registries. |
no test coverage detected