MCPcopy Create free account
hub / github.com/dfinity/orbit / assert_controller

Method assert_controller

core/control-panel/impl/src/services/canister.rs:39–45  ·  view source on GitHub ↗

Checks if the caller is a controller.

(&self, ctx: &CallContext, method: String)

Source from the content-addressed store, hash-verified

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,

Callers 1

Calls 1

is_controllerMethod · 0.80

Tested by

no test coverage detected