Skip to content

Commit 10bcd3c

Browse files
committed
Clarify named permission sets in configuration.md
1 parent cf3dd87 commit 10bcd3c

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

runtime/fundamentals/configuration.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,11 +527,21 @@ import * as module_2 from "@example/my-package/module2";
527527

528528
## Permissions
529529

530-
Deno 2.5+ supports storing permission sets in the config file.
530+
Deno 2.5+ supports storing
531+
[permission](/runtime/fundamentals/security/#permissions) sets in the config
532+
file.
531533

532534
### Named permissions
533535

534-
Permissions can be defined in key value pairs under the `"permissions"` key:
536+
Permissions can be defined as key-value pairs under arbitrarily-named permission
537+
sets under the `"permissions"` key. Within each set,
538+
539+
- the key is the name of a
540+
[permission](/runtime/fundamentals/security/#permissions) that would follow
541+
`--allow-` or `--deny-` in the CLI invocation (i.e. `read`, `write`, `net`,
542+
`env`, `sys`, `run`, `ffi`, `import`)
543+
- the value is a boolean, and array of strings representing paths, domains etc.,
544+
or an object with `allow`, `deny` or `ignore` keys.
535545

536546
```jsonc
537547
{
@@ -547,7 +557,8 @@ Permissions can be defined in key value pairs under the `"permissions"` key:
547557
}
548558
```
549559

550-
Then used by specifying the `--permission-set=<name>` or `-P=<name>` flag:
560+
Permission sets can be used by specifying the `--permission-set=<name>` or
561+
`-P=<name>` flag:
551562

552563
```sh
553564
$ deno run -P=read-data main.ts

0 commit comments

Comments
 (0)