1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -05:00
denoland-deno/ext
Asher Gomez 6fb7e8d93b
feat(permissions): add "--deny-*" flags (#19070)
This commit adds new "--deny-*" permission flags. These are complimentary to
"--allow-*" flags.

These flags can be used to restrict access to certain resources, even if they
were granted using "--allow-*" flags or the "--allow-all" ("-A") flag.

Eg. specifying "--allow-read --deny-read" will result in a permission error,
while "--allow-read --deny-read=/etc" will allow read access to all FS but the
"/etc" directory.

Runtime permissions APIs ("Deno.permissions") were adjusted as well, mainly
by adding, a new "PermissionStatus.partial" field. This field denotes that
while permission might be granted to requested resource, it's only partial (ie.
a "--deny-*" flag was specified that excludes some of the requested resources).
Eg. specifying "--allow-read=foo/ --deny-read=foo/bar" and then querying for
permissions like "Deno.permissions.query({ name: "read", path: "foo/" })"
will return "PermissionStatus { state: "granted", onchange: null, partial: true }",
denoting that some of the subpaths don't have read access.

Closes #18804.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2023-08-03 13:19:19 +02:00
..
broadcast_channel fix: call setIsTrusted for generated events (MessageEvent) (#19919) 2023-07-31 23:22:07 +02:00
cache 1.35.3 (#19947) 2023-07-26 10:18:02 -04:00
console 1.35.3 (#19947) 2023-07-26 10:18:02 -04:00
crypto chore: remove unused dependencies (#19962) 2023-07-28 15:10:13 +05:30
fetch fix(Deno.serve): accessing .url on cloned request throws (#19869) 2023-07-30 09:13:28 -04:00
ffi feat(permissions): add "--deny-*" flags (#19070) 2023-08-03 13:19:19 +02:00
fs feat(permissions): add "--deny-*" flags (#19070) 2023-08-03 13:19:19 +02:00
http feat(ext/http): Upgrade to hyper1.0-rc4 (#19987) 2023-07-31 07:34:53 -06:00
io refactor(runtime): use new fd methods from resource table (#20010) 2023-08-01 14:48:39 -04:00
kv refactor: update core extension api usage (#19952) 2023-07-31 18:19:15 +00:00
napi 1.35.3 (#19947) 2023-07-26 10:18:02 -04:00
net 1.35.3 (#19947) 2023-07-26 10:18:02 -04:00
node fix(node): node:test reports correct location (#20025) 2023-08-02 17:11:04 +02:00
tls 1.35.3 (#19947) 2023-07-26 10:18:02 -04:00
url refactor: update core extension api usage (#19952) 2023-07-31 18:19:15 +00:00
web fix: call setIsTrusted for generated events (MessageEvent) (#19919) 2023-07-31 23:22:07 +02:00
webidl refactor: update core extension api usage (#19952) 2023-07-31 18:19:15 +00:00
websocket fix: call setIsTrusted for generated events (MessageEvent) (#19919) 2023-07-31 23:22:07 +02:00
webstorage 1.35.3 (#19947) 2023-07-26 10:18:02 -04:00