fix(notification): Add permission commands for Actions (#1459)

* Add the permission commands

* Add changes file
This commit is contained in:
Naman Garg
2024-06-18 14:28:16 +05:30
committed by GitHub
parent b18a03a376
commit 17c42fd42a
10 changed files with 95 additions and 4 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
const COMMANDS: &[&str] = &["notify", "request_permission", "is_permission_granted"];
const COMMANDS: &[&str] = &["notify", "request_permission", "is_permission_granted", "register_action_types", "register_listener"];
fn main() {
if let Err(error) = tauri_plugin::Builder::new(COMMANDS)
@@ -0,0 +1,13 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-register-action-types"
description = "Enables the register_action_types command without any pre-configured scope."
commands.allow = ["register_action_types"]
[[permission]]
identifier = "deny-register-action-types"
description = "Denies the register_action_types command without any pre-configured scope."
commands.deny = ["register_action_types"]
@@ -0,0 +1,13 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-register-listener"
description = "Enables the register_listener command without any pre-configured scope."
commands.allow = ["register_listener"]
[[permission]]
identifier = "deny-register-listener"
description = "Denies the register_listener command without any pre-configured scope."
commands.deny = ["register_listener"]
@@ -4,6 +4,10 @@
|`deny-is-permission-granted`|Denies the is_permission_granted command without any pre-configured scope.|
|`allow-notify`|Enables the notify command without any pre-configured scope.|
|`deny-notify`|Denies the notify command without any pre-configured scope.|
|`allow-register-action-types`|Enables the register_action_types command without any pre-configured scope.|
|`deny-register-action-types`|Denies the register_action_types command without any pre-configured scope.|
|`allow-register-listener`|Enables the register_listener command without any pre-configured scope.|
|`deny-register-listener`|Denies the register_listener command without any pre-configured scope.|
|`allow-request-permission`|Enables the request_permission command without any pre-configured scope.|
|`deny-request-permission`|Denies the request_permission command without any pre-configured scope.|
|`default`|Allows requesting permission, checking permission state and sending notifications|
@@ -322,6 +322,34 @@
"deny-notify"
]
},
{
"description": "allow-register-action-types -> Enables the register_action_types command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-register-action-types"
]
},
{
"description": "deny-register-action-types -> Denies the register_action_types command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-register-action-types"
]
},
{
"description": "allow-register-listener -> Enables the register_listener command without any pre-configured scope.",
"type": "string",
"enum": [
"allow-register-listener"
]
},
{
"description": "deny-register-listener -> Denies the register_listener command without any pre-configured scope.",
"type": "string",
"enum": [
"deny-register-listener"
]
},
{
"description": "allow-request-permission -> Enables the request_permission command without any pre-configured scope.",
"type": "string",