Bỏ qua đến nội dung chính

Online Editor

Bạn cũng có thể sử dụng trình chỉnh sửa trực tuyến để viết mô hình và chính sách Casbin trong trình duyệt web của bạn. Nó cung cấp các chức năng như "tô sáng cú pháp" và "hoàn thành mã tự động", giống như một IDE cho ngôn ngữ lập trình.

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.

editor-tips.

Nếu bạn muốn viết mã tương đương, bạn cần chỉ định hàm so khớp mẫu thông qua API liên quan. Tham khảo RBAC với Mẫu để biết thêm thông tin.

ghi chú

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.