Skip to content

Commit b00914b

Browse files
committed
fixup! src,lib: stabilize permission model
1 parent bb4146a commit b00914b

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

doc/api/cli.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -935,28 +935,6 @@ added:
935935
936936
Enable experimental support for the network inspection with Chrome DevTools.
937937

938-
### `--permission`
939-
940-
<!-- YAML
941-
added: v20.0.0
942-
changes:
943-
- version: REPLACEME
944-
pr-url: https://github.com/nodejs/node/pull/56201
945-
description: Permission Model is now stable.
946-
-->
947-
948-
> Stability: 2.0 - Stable
949-
950-
Enable the Permission Model for current process. When enabled, the
951-
following permissions are restricted:
952-
953-
* File System - manageable through
954-
[`--allow-fs-read`][], [`--allow-fs-write`][] flags
955-
* Child Process - manageable through [`--allow-child-process`][] flag
956-
* Worker Threads - manageable through [`--allow-worker`][] flag
957-
* WASI - manageable through [`--allow-wasi`][] flag
958-
* Addons - manageable through [`--allow-addons`][] flag
959-
960938
### `--experimental-print-required-tla`
961939

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

1768+
### `--permission`
1769+
1770+
<!-- YAML
1771+
added: v20.0.0
1772+
changes:
1773+
- version: REPLACEME
1774+
pr-url: https://github.com/nodejs/node/pull/56201
1775+
description: Permission Model is now stable.
1776+
-->
1777+
1778+
> Stability: 2.0 - Stable
1779+
1780+
Enable the Permission Model for current process. When enabled, the
1781+
following permissions are restricted:
1782+
1783+
* File System - manageable through
1784+
[`--allow-fs-read`][], [`--allow-fs-write`][] flags
1785+
* Child Process - manageable through [`--allow-child-process`][] flag
1786+
* Worker Threads - manageable through [`--allow-worker`][] flag
1787+
* WASI - manageable through [`--allow-wasi`][] flag
1788+
* Addons - manageable through [`--allow-addons`][] flag
1789+
17901790
### `--preserve-symlinks`
17911791

17921792
<!-- YAML
@@ -3031,6 +3031,7 @@ one is included in the list below.
30313031
* `--experimental-json-modules`
30323032
* `--experimental-loader`
30333033
* `--experimental-modules`
3034+
* `--experimental-permission`
30343035
* `--experimental-print-required-tla`
30353036
* `--experimental-require-module`
30363037
* `--experimental-shadow-realm`

src/node_options.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
456456
&EnvironmentOptions::permission,
457457
kAllowedInEnvvar,
458458
false);
459+
AddAlias("--experimental-permission", "--permission");
459460
AddOption("--allow-fs-read",
460461
"allow permissions to read the filesystem",
461462
&EnvironmentOptions::allow_fs_read,

0 commit comments

Comments
 (0)