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

Online Editor

Write and test your Casbin models and policies directly in your browser using the online editor. The editor provides syntax highlighting and code completion similar to a programming IDE.

Editor Features

The online editor includes these capabilities to streamline Casbin development:

AI-Powered Assistance

Get AI help while writing Casbin models and policies.

editor-ai

Engine Selection

Test your models using Go, Java, Node.js, Python, Rust, or .NET Casbin implementations.

editor-engine

Multiple Engine Support

Switch between Casbin implementations to validate your models across different platforms.

editor-multi-engine

Endpoint Configuration

Point the editor to custom endpoints for testing models in different environments.

editor-endpoint

File Upload

Import existing model and policy files to start working immediately.

editor-upload

Use Custom Functions

Add custom matching functions (for example, "RBAC with Patterns") by clicking the "Add Role Matching" button in the bottom left corner.

editor-tips.

To implement custom matching functions in your code, configure them through the Casbin API. See RBAC with Pattern for details.

ghi chú

The editor supports Node-Casbin (Node.js), JCasbin (Java), Casbin (Go), Casbin-rs (Rust), PyCasbin (Python), and Casbin.NET (C#). Switch between implementations in the upper right corner to test your configuration.

The editor validates models through a remote CLI. Results may vary slightly from your local environment due to implementation differences. Report any issues to the appropriate Casbin implementation repository.