Skip to content

Commit 3bec656

Browse files
committed
Clarify named permission sets in configuration.md
1 parent cf3dd87 commit 3bec656

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

runtime/fundamentals/configuration.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,11 +527,18 @@ 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 [permission](/runtime/fundamentals/security/#permissions)
531+
sets in the config file.
531532

532533
### Named permissions
533534

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

536543
```jsonc
537544
{
@@ -547,7 +554,8 @@ Permissions can be defined in key value pairs under the `"permissions"` key:
547554
}
548555
```
549556

550-
Then used by specifying the `--permission-set=<name>` or `-P=<name>` flag:
557+
Permission sets can be used by specifying the `--permission-set=<name>` or
558+
`-P=<name>` flag:
551559

552560
```sh
553561
$ deno run -P=read-data main.ts

0 commit comments

Comments
 (0)