Passer au contenu principal

Online Editor

Vous pouvez également utiliser l'éditeur en ligne pour écrire votre modèle et votre politique Casbin dans votre navigateur web. Il offre des fonctionnalités telles que la "coloration syntaxique" et la "complétion de code", tout comme un IDE pour un langage de programmation.

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.

Si vous voulez écrire le code équivalent, vous devez spécifier la fonction de correspondance de motifs via l'API pertinente. Consultez RBAC avec motif pour plus d'informations.

note

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.