Online Editor
您也可以使用在线编辑器在您的网页浏览器中编写您的Casbin模型和策略。 它提供了如“语法高亮”和“代码补全”等功能,就像一个编程语言的IDE一样。
Use Custom Functions
If you need to use a customized matching function (e.g. "RBAC with Patterns"), you can add it by clicking the "Add Role Matching" button at the bottom left corner of the editor.
.
如果你想写等价的代码,你需要通过相关的API指定模式匹配函数。 有关更多信息,请参阅带模式的RBAC。
The editor supports multiple Casbin implementations, including Node-Casbin (Node.js), JCasbin (Java), Casbin (Go), and Casbin-rs (Rust). You can switch between different implementations in the upper right corner to test your model and policy.
Although the editor validates through a remote CLI, due to environment differences, the validation results may differ slightly from the results you get in your local environment. If you encounter any issues, please submit them to the corresponding Casbin implementation repository.