Write actions (POST, PUT, PATCH, DELETE) enabled by the given scopes.
(&self, scopes: &[String])
| 106 | |
| 107 | /// Write actions (POST, PUT, PATCH, DELETE) enabled by the given scopes. |
| 108 | pub fn write_actions_for_scopes(&self, scopes: &[String]) -> Vec<&ApiAction> { |
| 109 | self.actions_for_scopes(scopes) |
| 110 | .into_iter() |
| 111 | .filter(|a| { |
| 112 | let m = a.method.to_uppercase(); |
| 113 | m == "POST" || m == "PUT" || m == "PATCH" || m == "DELETE" |
| 114 | }) |
| 115 | .collect() |
| 116 | } |
| 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> { |
no test coverage detected