feat(fs): `scope-*-recursive` permission allows read dir, closes #1307 (#1696)

We could instead document that you should also enable `scope-*-index`, it is more a matter of semantics.
pull/1699/head
Lucas Fernandes Nogueira 9 months ago committed by GitHub
parent 01c913e83e
commit 0d5e7e2892
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
"fs": patch:enhance
---
The `scope-*-recursive` permissions now also allow reading the contents of the directory.

@ -111,6 +111,8 @@ fn main() {
identifier = "scope-{lower}-recursive"
description = "This scope permits recursive access to the complete `${upper}` folder, including sub directories and files."
[[permission.scope.allow]]
path = "${upper}"
[[permission.scope.allow]]
path = "${upper}/**"
@ -118,6 +120,8 @@ path = "${upper}/**"
identifier = "scope-{lower}"
description = "This scope permits access to all files and list content of top level directories in the `${upper}`folder."
[[permission.scope.allow]]
path = "${upper}"
[[permission.scope.allow]]
path = "${upper}/*"
@ -126,7 +130,7 @@ identifier = "scope-{lower}-index"
description = "This scope permits to list all files and folders in the `${upper}`folder."
[[permission.scope.allow]]
path = "${upper}/"
path = "${upper}"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-app-recursive"
description = "This scope permits recursive access to the complete `$APP` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$APP"
[[permission.scope.allow]]
path = "$APP/**"
@ -16,6 +18,8 @@ path = "$APP/**"
identifier = "scope-app"
description = "This scope permits access to all files and list content of top level directories in the `$APP`folder."
[[permission.scope.allow]]
path = "$APP"
[[permission.scope.allow]]
path = "$APP/*"
@ -24,7 +28,7 @@ identifier = "scope-app-index"
description = "This scope permits to list all files and folders in the `$APP`folder."
[[permission.scope.allow]]
path = "$APP/"
path = "$APP"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-appcache-recursive"
description = "This scope permits recursive access to the complete `$APPCACHE` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$APPCACHE"
[[permission.scope.allow]]
path = "$APPCACHE/**"
@ -16,6 +18,8 @@ path = "$APPCACHE/**"
identifier = "scope-appcache"
description = "This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder."
[[permission.scope.allow]]
path = "$APPCACHE"
[[permission.scope.allow]]
path = "$APPCACHE/*"
@ -24,7 +28,7 @@ identifier = "scope-appcache-index"
description = "This scope permits to list all files and folders in the `$APPCACHE`folder."
[[permission.scope.allow]]
path = "$APPCACHE/"
path = "$APPCACHE"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-appconfig-recursive"
description = "This scope permits recursive access to the complete `$APPCONFIG` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$APPCONFIG"
[[permission.scope.allow]]
path = "$APPCONFIG/**"
@ -16,6 +18,8 @@ path = "$APPCONFIG/**"
identifier = "scope-appconfig"
description = "This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder."
[[permission.scope.allow]]
path = "$APPCONFIG"
[[permission.scope.allow]]
path = "$APPCONFIG/*"
@ -24,7 +28,7 @@ identifier = "scope-appconfig-index"
description = "This scope permits to list all files and folders in the `$APPCONFIG`folder."
[[permission.scope.allow]]
path = "$APPCONFIG/"
path = "$APPCONFIG"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-appdata-recursive"
description = "This scope permits recursive access to the complete `$APPDATA` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$APPDATA"
[[permission.scope.allow]]
path = "$APPDATA/**"
@ -16,6 +18,8 @@ path = "$APPDATA/**"
identifier = "scope-appdata"
description = "This scope permits access to all files and list content of top level directories in the `$APPDATA`folder."
[[permission.scope.allow]]
path = "$APPDATA"
[[permission.scope.allow]]
path = "$APPDATA/*"
@ -24,7 +28,7 @@ identifier = "scope-appdata-index"
description = "This scope permits to list all files and folders in the `$APPDATA`folder."
[[permission.scope.allow]]
path = "$APPDATA/"
path = "$APPDATA"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-applocaldata-recursive"
description = "This scope permits recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$APPLOCALDATA"
[[permission.scope.allow]]
path = "$APPLOCALDATA/**"
@ -16,6 +18,8 @@ path = "$APPLOCALDATA/**"
identifier = "scope-applocaldata"
description = "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder."
[[permission.scope.allow]]
path = "$APPLOCALDATA"
[[permission.scope.allow]]
path = "$APPLOCALDATA/*"
@ -24,7 +28,7 @@ identifier = "scope-applocaldata-index"
description = "This scope permits to list all files and folders in the `$APPLOCALDATA`folder."
[[permission.scope.allow]]
path = "$APPLOCALDATA/"
path = "$APPLOCALDATA"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-applog-recursive"
description = "This scope permits recursive access to the complete `$APPLOG` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$APPLOG"
[[permission.scope.allow]]
path = "$APPLOG/**"
@ -16,6 +18,8 @@ path = "$APPLOG/**"
identifier = "scope-applog"
description = "This scope permits access to all files and list content of top level directories in the `$APPLOG`folder."
[[permission.scope.allow]]
path = "$APPLOG"
[[permission.scope.allow]]
path = "$APPLOG/*"
@ -24,7 +28,7 @@ identifier = "scope-applog-index"
description = "This scope permits to list all files and folders in the `$APPLOG`folder."
[[permission.scope.allow]]
path = "$APPLOG/"
path = "$APPLOG"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-audio-recursive"
description = "This scope permits recursive access to the complete `$AUDIO` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$AUDIO"
[[permission.scope.allow]]
path = "$AUDIO/**"
@ -16,6 +18,8 @@ path = "$AUDIO/**"
identifier = "scope-audio"
description = "This scope permits access to all files and list content of top level directories in the `$AUDIO`folder."
[[permission.scope.allow]]
path = "$AUDIO"
[[permission.scope.allow]]
path = "$AUDIO/*"
@ -24,7 +28,7 @@ identifier = "scope-audio-index"
description = "This scope permits to list all files and folders in the `$AUDIO`folder."
[[permission.scope.allow]]
path = "$AUDIO/"
path = "$AUDIO"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-cache-recursive"
description = "This scope permits recursive access to the complete `$CACHE` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$CACHE"
[[permission.scope.allow]]
path = "$CACHE/**"
@ -16,6 +18,8 @@ path = "$CACHE/**"
identifier = "scope-cache"
description = "This scope permits access to all files and list content of top level directories in the `$CACHE`folder."
[[permission.scope.allow]]
path = "$CACHE"
[[permission.scope.allow]]
path = "$CACHE/*"
@ -24,7 +28,7 @@ identifier = "scope-cache-index"
description = "This scope permits to list all files and folders in the `$CACHE`folder."
[[permission.scope.allow]]
path = "$CACHE/"
path = "$CACHE"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-config-recursive"
description = "This scope permits recursive access to the complete `$CONFIG` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$CONFIG"
[[permission.scope.allow]]
path = "$CONFIG/**"
@ -16,6 +18,8 @@ path = "$CONFIG/**"
identifier = "scope-config"
description = "This scope permits access to all files and list content of top level directories in the `$CONFIG`folder."
[[permission.scope.allow]]
path = "$CONFIG"
[[permission.scope.allow]]
path = "$CONFIG/*"
@ -24,7 +28,7 @@ identifier = "scope-config-index"
description = "This scope permits to list all files and folders in the `$CONFIG`folder."
[[permission.scope.allow]]
path = "$CONFIG/"
path = "$CONFIG"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-data-recursive"
description = "This scope permits recursive access to the complete `$DATA` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$DATA"
[[permission.scope.allow]]
path = "$DATA/**"
@ -16,6 +18,8 @@ path = "$DATA/**"
identifier = "scope-data"
description = "This scope permits access to all files and list content of top level directories in the `$DATA`folder."
[[permission.scope.allow]]
path = "$DATA"
[[permission.scope.allow]]
path = "$DATA/*"
@ -24,7 +28,7 @@ identifier = "scope-data-index"
description = "This scope permits to list all files and folders in the `$DATA`folder."
[[permission.scope.allow]]
path = "$DATA/"
path = "$DATA"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-desktop-recursive"
description = "This scope permits recursive access to the complete `$DESKTOP` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$DESKTOP"
[[permission.scope.allow]]
path = "$DESKTOP/**"
@ -16,6 +18,8 @@ path = "$DESKTOP/**"
identifier = "scope-desktop"
description = "This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder."
[[permission.scope.allow]]
path = "$DESKTOP"
[[permission.scope.allow]]
path = "$DESKTOP/*"
@ -24,7 +28,7 @@ identifier = "scope-desktop-index"
description = "This scope permits to list all files and folders in the `$DESKTOP`folder."
[[permission.scope.allow]]
path = "$DESKTOP/"
path = "$DESKTOP"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-document-recursive"
description = "This scope permits recursive access to the complete `$DOCUMENT` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$DOCUMENT"
[[permission.scope.allow]]
path = "$DOCUMENT/**"
@ -16,6 +18,8 @@ path = "$DOCUMENT/**"
identifier = "scope-document"
description = "This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder."
[[permission.scope.allow]]
path = "$DOCUMENT"
[[permission.scope.allow]]
path = "$DOCUMENT/*"
@ -24,7 +28,7 @@ identifier = "scope-document-index"
description = "This scope permits to list all files and folders in the `$DOCUMENT`folder."
[[permission.scope.allow]]
path = "$DOCUMENT/"
path = "$DOCUMENT"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-download-recursive"
description = "This scope permits recursive access to the complete `$DOWNLOAD` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$DOWNLOAD"
[[permission.scope.allow]]
path = "$DOWNLOAD/**"
@ -16,6 +18,8 @@ path = "$DOWNLOAD/**"
identifier = "scope-download"
description = "This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder."
[[permission.scope.allow]]
path = "$DOWNLOAD"
[[permission.scope.allow]]
path = "$DOWNLOAD/*"
@ -24,7 +28,7 @@ identifier = "scope-download-index"
description = "This scope permits to list all files and folders in the `$DOWNLOAD`folder."
[[permission.scope.allow]]
path = "$DOWNLOAD/"
path = "$DOWNLOAD"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-exe-recursive"
description = "This scope permits recursive access to the complete `$EXE` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$EXE"
[[permission.scope.allow]]
path = "$EXE/**"
@ -16,6 +18,8 @@ path = "$EXE/**"
identifier = "scope-exe"
description = "This scope permits access to all files and list content of top level directories in the `$EXE`folder."
[[permission.scope.allow]]
path = "$EXE"
[[permission.scope.allow]]
path = "$EXE/*"
@ -24,7 +28,7 @@ identifier = "scope-exe-index"
description = "This scope permits to list all files and folders in the `$EXE`folder."
[[permission.scope.allow]]
path = "$EXE/"
path = "$EXE"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-font-recursive"
description = "This scope permits recursive access to the complete `$FONT` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$FONT"
[[permission.scope.allow]]
path = "$FONT/**"
@ -16,6 +18,8 @@ path = "$FONT/**"
identifier = "scope-font"
description = "This scope permits access to all files and list content of top level directories in the `$FONT`folder."
[[permission.scope.allow]]
path = "$FONT"
[[permission.scope.allow]]
path = "$FONT/*"
@ -24,7 +28,7 @@ identifier = "scope-font-index"
description = "This scope permits to list all files and folders in the `$FONT`folder."
[[permission.scope.allow]]
path = "$FONT/"
path = "$FONT"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-home-recursive"
description = "This scope permits recursive access to the complete `$HOME` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$HOME"
[[permission.scope.allow]]
path = "$HOME/**"
@ -16,6 +18,8 @@ path = "$HOME/**"
identifier = "scope-home"
description = "This scope permits access to all files and list content of top level directories in the `$HOME`folder."
[[permission.scope.allow]]
path = "$HOME"
[[permission.scope.allow]]
path = "$HOME/*"
@ -24,7 +28,7 @@ identifier = "scope-home-index"
description = "This scope permits to list all files and folders in the `$HOME`folder."
[[permission.scope.allow]]
path = "$HOME/"
path = "$HOME"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-localdata-recursive"
description = "This scope permits recursive access to the complete `$LOCALDATA` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$LOCALDATA"
[[permission.scope.allow]]
path = "$LOCALDATA/**"
@ -16,6 +18,8 @@ path = "$LOCALDATA/**"
identifier = "scope-localdata"
description = "This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder."
[[permission.scope.allow]]
path = "$LOCALDATA"
[[permission.scope.allow]]
path = "$LOCALDATA/*"
@ -24,7 +28,7 @@ identifier = "scope-localdata-index"
description = "This scope permits to list all files and folders in the `$LOCALDATA`folder."
[[permission.scope.allow]]
path = "$LOCALDATA/"
path = "$LOCALDATA"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-log-recursive"
description = "This scope permits recursive access to the complete `$LOG` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$LOG"
[[permission.scope.allow]]
path = "$LOG/**"
@ -16,6 +18,8 @@ path = "$LOG/**"
identifier = "scope-log"
description = "This scope permits access to all files and list content of top level directories in the `$LOG`folder."
[[permission.scope.allow]]
path = "$LOG"
[[permission.scope.allow]]
path = "$LOG/*"
@ -24,7 +28,7 @@ identifier = "scope-log-index"
description = "This scope permits to list all files and folders in the `$LOG`folder."
[[permission.scope.allow]]
path = "$LOG/"
path = "$LOG"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-picture-recursive"
description = "This scope permits recursive access to the complete `$PICTURE` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$PICTURE"
[[permission.scope.allow]]
path = "$PICTURE/**"
@ -16,6 +18,8 @@ path = "$PICTURE/**"
identifier = "scope-picture"
description = "This scope permits access to all files and list content of top level directories in the `$PICTURE`folder."
[[permission.scope.allow]]
path = "$PICTURE"
[[permission.scope.allow]]
path = "$PICTURE/*"
@ -24,7 +28,7 @@ identifier = "scope-picture-index"
description = "This scope permits to list all files and folders in the `$PICTURE`folder."
[[permission.scope.allow]]
path = "$PICTURE/"
path = "$PICTURE"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-public-recursive"
description = "This scope permits recursive access to the complete `$PUBLIC` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$PUBLIC"
[[permission.scope.allow]]
path = "$PUBLIC/**"
@ -16,6 +18,8 @@ path = "$PUBLIC/**"
identifier = "scope-public"
description = "This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder."
[[permission.scope.allow]]
path = "$PUBLIC"
[[permission.scope.allow]]
path = "$PUBLIC/*"
@ -24,7 +28,7 @@ identifier = "scope-public-index"
description = "This scope permits to list all files and folders in the `$PUBLIC`folder."
[[permission.scope.allow]]
path = "$PUBLIC/"
path = "$PUBLIC"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-resource-recursive"
description = "This scope permits recursive access to the complete `$RESOURCE` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$RESOURCE"
[[permission.scope.allow]]
path = "$RESOURCE/**"
@ -16,6 +18,8 @@ path = "$RESOURCE/**"
identifier = "scope-resource"
description = "This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder."
[[permission.scope.allow]]
path = "$RESOURCE"
[[permission.scope.allow]]
path = "$RESOURCE/*"
@ -24,7 +28,7 @@ identifier = "scope-resource-index"
description = "This scope permits to list all files and folders in the `$RESOURCE`folder."
[[permission.scope.allow]]
path = "$RESOURCE/"
path = "$RESOURCE"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-runtime-recursive"
description = "This scope permits recursive access to the complete `$RUNTIME` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$RUNTIME"
[[permission.scope.allow]]
path = "$RUNTIME/**"
@ -16,6 +18,8 @@ path = "$RUNTIME/**"
identifier = "scope-runtime"
description = "This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder."
[[permission.scope.allow]]
path = "$RUNTIME"
[[permission.scope.allow]]
path = "$RUNTIME/*"
@ -24,7 +28,7 @@ identifier = "scope-runtime-index"
description = "This scope permits to list all files and folders in the `$RUNTIME`folder."
[[permission.scope.allow]]
path = "$RUNTIME/"
path = "$RUNTIME"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-temp-recursive"
description = "This scope permits recursive access to the complete `$TEMP` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$TEMP"
[[permission.scope.allow]]
path = "$TEMP/**"
@ -16,6 +18,8 @@ path = "$TEMP/**"
identifier = "scope-temp"
description = "This scope permits access to all files and list content of top level directories in the `$TEMP`folder."
[[permission.scope.allow]]
path = "$TEMP"
[[permission.scope.allow]]
path = "$TEMP/*"
@ -24,7 +28,7 @@ identifier = "scope-temp-index"
description = "This scope permits to list all files and folders in the `$TEMP`folder."
[[permission.scope.allow]]
path = "$TEMP/"
path = "$TEMP"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-template-recursive"
description = "This scope permits recursive access to the complete `$TEMPLATE` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$TEMPLATE"
[[permission.scope.allow]]
path = "$TEMPLATE/**"
@ -16,6 +18,8 @@ path = "$TEMPLATE/**"
identifier = "scope-template"
description = "This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder."
[[permission.scope.allow]]
path = "$TEMPLATE"
[[permission.scope.allow]]
path = "$TEMPLATE/*"
@ -24,7 +28,7 @@ identifier = "scope-template-index"
description = "This scope permits to list all files and folders in the `$TEMPLATE`folder."
[[permission.scope.allow]]
path = "$TEMPLATE/"
path = "$TEMPLATE"
# Sets Section
# This section combines the scope elements with enablement of commands

@ -9,6 +9,8 @@
identifier = "scope-video-recursive"
description = "This scope permits recursive access to the complete `$VIDEO` folder, including sub directories and files."
[[permission.scope.allow]]
path = "$VIDEO"
[[permission.scope.allow]]
path = "$VIDEO/**"
@ -16,6 +18,8 @@ path = "$VIDEO/**"
identifier = "scope-video"
description = "This scope permits access to all files and list content of top level directories in the `$VIDEO`folder."
[[permission.scope.allow]]
path = "$VIDEO"
[[permission.scope.allow]]
path = "$VIDEO/*"
@ -24,7 +28,7 @@ identifier = "scope-video-index"
description = "This scope permits to list all files and folders in the `$VIDEO`folder."
[[permission.scope.allow]]
path = "$VIDEO/"
path = "$VIDEO"
# Sets Section
# This section combines the scope elements with enablement of commands

Loading…
Cancel
Save