Checks if the caller is a controller.
(&self, ctx: &CallContext, method: String)
| 37 | |
| 38 | /// Checks if the caller is a controller. |
| 39 | fn assert_controller(&self, ctx: &CallContext, method: String) -> ServiceResult<()> { |
| 40 | if !ctx.is_controller() { |
| 41 | Err(CanisterError::Forbidden { method })? |
| 42 | } |
| 43 | |
| 44 | Ok(()) |
| 45 | } |
| 46 | |
| 47 | pub async fn upload_canister_modules( |
| 48 | &self, |
no test coverage detected