From 1ec0de83fa94b57a7f0d3bdc1d5a293f7e0ba5d8 Mon Sep 17 00:00:00 2001 From: adrieljss Date: Tue, 11 Mar 2025 23:53:08 +0800 Subject: [PATCH] update permissions --- .../commands/fetch_stream_body.toml | 13 ++++++++++ .../permissions/autogenerated/reference.md | 26 +++++++++++++++++++ plugins/http/permissions/default.toml | 2 +- plugins/http/permissions/schemas/schema.json | 16 ++++++------ 4 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 plugins/http/permissions/autogenerated/commands/fetch_stream_body.toml diff --git a/plugins/http/permissions/autogenerated/commands/fetch_stream_body.toml b/plugins/http/permissions/autogenerated/commands/fetch_stream_body.toml new file mode 100644 index 00000000..5f711fd5 --- /dev/null +++ b/plugins/http/permissions/autogenerated/commands/fetch_stream_body.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-fetch-stream-body" +description = "Enables the fetch_stream_body command without any pre-configured scope." +commands.allow = ["fetch_stream_body"] + +[[permission]] +identifier = "deny-fetch-stream-body" +description = "Denies the fetch_stream_body command without any pre-configured scope." +commands.deny = ["fetch_stream_body"] diff --git a/plugins/http/permissions/autogenerated/reference.md b/plugins/http/permissions/autogenerated/reference.md index 4126f0b9..aade2fda 100644 --- a/plugins/http/permissions/autogenerated/reference.md +++ b/plugins/http/permissions/autogenerated/reference.md @@ -128,6 +128,32 @@ Enables the fetch_send command without any pre-configured scope. Denies the fetch_send command without any pre-configured scope. + + + + + + +`http:allow-fetch-stream-body` + + + + +Enables the fetch_stream_body command without any pre-configured scope. + + + + + + + +`http:deny-fetch-stream-body` + + + + +Denies the fetch_stream_body command without any pre-configured scope. + diff --git a/plugins/http/permissions/default.toml b/plugins/http/permissions/default.toml index b469536d..9c8818db 100644 --- a/plugins/http/permissions/default.toml +++ b/plugins/http/permissions/default.toml @@ -17,6 +17,6 @@ All fetch operations are enabled. permissions = [ "allow-fetch", "allow-fetch-cancel", - "allow-fetch-read-body", + "allow-fetch-stream-body", "allow-fetch-send", ] diff --git a/plugins/http/permissions/schemas/schema.json b/plugins/http/permissions/schemas/schema.json index 794ee204..eb7e4763 100644 --- a/plugins/http/permissions/schemas/schema.json +++ b/plugins/http/permissions/schemas/schema.json @@ -315,24 +315,24 @@ "const": "deny-fetch-cancel" }, { - "description": "Enables the fetch_read_body command without any pre-configured scope.", + "description": "Enables the fetch_send command without any pre-configured scope.", "type": "string", - "const": "allow-fetch-read-body" + "const": "allow-fetch-send" }, { - "description": "Denies the fetch_read_body command without any pre-configured scope.", + "description": "Denies the fetch_send command without any pre-configured scope.", "type": "string", - "const": "deny-fetch-read-body" + "const": "deny-fetch-send" }, { - "description": "Enables the fetch_send command without any pre-configured scope.", + "description": "Enables the fetch_stream_body command without any pre-configured scope.", "type": "string", - "const": "allow-fetch-send" + "const": "allow-fetch-stream-body" }, { - "description": "Denies the fetch_send command without any pre-configured scope.", + "description": "Denies the fetch_stream_body command without any pre-configured scope.", "type": "string", - "const": "deny-fetch-send" + "const": "deny-fetch-stream-body" }, { "description": "This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n",