summaryrefslogtreecommitdiff
path: root/docs/getting_started
diff options
context:
space:
mode:
authorMatt Dumler <mattd3v@pm.me>2020-05-18 06:31:18 -0500
committerGitHub <noreply@github.com>2020-05-18 07:31:18 -0400
commit7863d611fcb26b6f2f8a911babb839584668f936 (patch)
tree387cf1657325a4d84bd276c5dd16e224b9e108fe /docs/getting_started
parent9d63772fe5bacc8fa1e0a8cbb152a2f107ae268f (diff)
Update `docs/getting_started/permissions.md` (#5574)
Aligned the example wording more closely with that in the `first_steps.md` document, and made other minor edits/corrections.
Diffstat (limited to 'docs/getting_started')
-rw-r--r--docs/getting_started/permissions.md11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/getting_started/permissions.md b/docs/getting_started/permissions.md
index a3d0a9ea0..867658170 100644
--- a/docs/getting_started/permissions.md
+++ b/docs/getting_started/permissions.md
@@ -6,9 +6,10 @@
### Permissions whitelist
-Deno also provides permissions whitelist.
+Deno also allows you to control the granularity of permissions with whitelists.
-This is an example to restrict file system access by whitelist.
+This example restricts file system access by whitelisting only the `/usr`
+directory:
```shell
$ deno run --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd
@@ -18,15 +19,15 @@ error: Uncaught PermissionDenied: read access to "/etc/passwd", run again with t
...
```
-You can grant read permission under `/etc` dir
+Try it out again with the correct permissions by whitelisting `/etc` instead:
```shell
$ deno run --allow-read=/etc https://deno.land/std/examples/cat.ts /etc/passwd
```
-`--allow-write` works same as `--allow-read`.
+`--allow-write` works the same as `--allow-read`.
-This is an example to restrict host.
+This example restricts network access by whitelisting the allowed hosts:
```ts
const result = await fetch("https://deno.land/");