Skip to content
Tauri 中文网

运行时权限

运行时权限是 Tauri Core 的一部分。它在运行时拥有所有权限、功能和范围,以强制哪个窗口可以访问哪个命令并将范围传递给命令。

¥The runtime authority is part of the Tauri Core. It holds all permissions, capabilities and scopes at runtime to enforce which window can access which command and passes scopes to commands.

每当从 webview 调用 Tauri 命令时,运行时权限都会收到调用请求,确保允许源实际使用请求的命令,检查源是否是功能的一部分,以及是否为命令定义了范围并且适用,然后将它们注入到调用请求中,然后传递给正确的 Tauri 命令。

¥Whenever a Tauri command is invoked from the webview the runtime authority receives the invoke request, makes sure that the origin is allowed to actually use the requested command, checks if the origin is part of capabilities and if scopes are defined for the command and applicable then they are injected into the invoke request, which is then passed to the proper Tauri command.

如果不允许来源调用该命令,则运行时权限将拒绝该请求,并且永远不会调用 Tauri 命令。

¥If the origin is not allowed to call the command, the runtime authority will deny the request and the Tauri command is never invoked.

IPC Diagram


Tauri 中文网 - 粤ICP备13048890号