Skip to content

Commit

Permalink
fixup! src,lib: stabilize permission model
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Dec 10, 2024
1 parent bb4146a commit b00914b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
45 changes: 23 additions & 22 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -935,28 +935,6 @@ added:
Enable experimental support for the network inspection with Chrome DevTools.

### `--permission`

<!-- YAML
added: v20.0.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/56201
description: Permission Model is now stable.
-->

> Stability: 2.0 - Stable
Enable the Permission Model for current process. When enabled, the
following permissions are restricted:

* File System - manageable through
[`--allow-fs-read`][], [`--allow-fs-write`][] flags
* Child Process - manageable through [`--allow-child-process`][] flag
* Worker Threads - manageable through [`--allow-worker`][] flag
* WASI - manageable through [`--allow-wasi`][] flag
* Addons - manageable through [`--allow-addons`][] flag

### `--experimental-print-required-tla`

<!-- YAML
Expand Down Expand Up @@ -1787,6 +1765,28 @@ unless either the `--pending-deprecation` command-line flag, or the
are used to provide a kind of selective "early warning" mechanism that
developers may leverage to detect deprecated API usage.

### `--permission`

<!-- YAML
added: v20.0.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/56201
description: Permission Model is now stable.
-->

> Stability: 2.0 - Stable
Enable the Permission Model for current process. When enabled, the
following permissions are restricted:

* File System - manageable through
[`--allow-fs-read`][], [`--allow-fs-write`][] flags
* Child Process - manageable through [`--allow-child-process`][] flag
* Worker Threads - manageable through [`--allow-worker`][] flag
* WASI - manageable through [`--allow-wasi`][] flag
* Addons - manageable through [`--allow-addons`][] flag

### `--preserve-symlinks`

<!-- YAML
Expand Down Expand Up @@ -3031,6 +3031,7 @@ one is included in the list below.
* `--experimental-json-modules`
* `--experimental-loader`
* `--experimental-modules`
* `--experimental-permission`
* `--experimental-print-required-tla`
* `--experimental-require-module`
* `--experimental-shadow-realm`
Expand Down
1 change: 1 addition & 0 deletions src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
&EnvironmentOptions::permission,
kAllowedInEnvvar,
false);
AddAlias("--experimental-permission", "--permission");
AddOption("--allow-fs-read",
"allow permissions to read the filesystem",
&EnvironmentOptions::allow_fs_read,
Expand Down

0 comments on commit b00914b

Please sign in to comment.