pub fn check_permission(
ctx: &ModuleContext<'_>,
permission: Permission,
) -> Result<(), String>Expand description
Check whether the current execution context has a required permission.
If granted_permissions is None, all operations are allowed (backwards
compatible with code that predates the permission system). If Some, the
specific permission must be present in the set.