From c3e441c5b54de09ca3af3e1fd0098e8d307c18d7 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 30 Sep 2021 15:50:59 -0400 Subject: fix: worker environment permissions should accept an array (#12250) --- runtime/ops/worker_host.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'runtime/ops') diff --git a/runtime/ops/worker_host.rs b/runtime/ops/worker_host.rs index f749e495c..c1ce782da 100644 --- a/runtime/ops/worker_host.rs +++ b/runtime/ops/worker_host.rs @@ -223,7 +223,10 @@ fn merge_env_permission( ) -> Result, AnyError> { if let Some(worker) = worker { if (worker.global_state < main.global_state) - || !worker.granted_list.iter().all(|x| main.check(&x.0).is_ok()) + || !worker + .granted_list + .iter() + .all(|x| main.check(x.as_ref()).is_ok()) { return Err(custom_error( "PermissionDenied", @@ -448,11 +451,7 @@ where Ok(Some(UnaryPermission:: { global_state: value.global_state, - granted_list: value - .paths - .into_iter() - .map(|env| EnvDescriptor(env.to_uppercase())) - .collect(), + granted_list: value.paths.into_iter().map(EnvDescriptor::new).collect(), ..Default::default() })) } -- cgit v1.2.3