mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
feat(permissions): allow run permission to take values (#9833)
This commit adds allowlist support to `--allow-run` flag. Additionally `Deno.permissions.query()` allows to query for specific programs within allowlist.
This commit is contained in:
parent
1c7217e390
commit
e7b7129b7a
11 changed files with 271 additions and 51 deletions
|
@ -2846,6 +2846,21 @@ console.log("finish");
|
|||
output: "088_dynamic_import_already_evaluating.ts.out",
|
||||
});
|
||||
|
||||
itest!(_089_run_allow_list {
|
||||
args: "run --allow-run=cat 089_run_allow_list.ts",
|
||||
output: "089_run_allow_list.ts.out",
|
||||
});
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn _090_run_permissions_request() {
|
||||
let args = "run 090_run_permissions_request.ts";
|
||||
let output = "090_run_permissions_request.ts.out";
|
||||
let input = b"g\nd\n";
|
||||
|
||||
util::test_pty(args, output, input);
|
||||
}
|
||||
|
||||
itest!(js_import_detect {
|
||||
args: "run --quiet --reload js_import_detect.ts",
|
||||
output: "js_import_detect.ts.out",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue