Get it from plugin repository: https://plugins.jetbrains.com/plugin/14809-casbin
Plugin for editing and testing Casbin models in IntelliJ-based IDEs.
Provides:
- syntax highlighting
- auto-completion for policy effect definitions and object attributes
- quick fixes to add missing attributes to models
- test casbin model using the casbin executor tool window
- model and policy definitions are watched for changes to automatically update the Casbin Model and execution results
-
Using IDE built-in plugin system:
Preferences > Plugins > Marketplace > Search for "CASBIN" > Install Plugin
-
Manually:
Download the latest release and install it manually using Preferences > Plugins > ⚙️ > Install plugin from disk...
The plugin is built using Gradle and uses gradle-intellij-plugin to integrate with IntelliJ Platform.
To build a plugin run
$ ./gradlew buildPlugin
Plugin zip file will be created in build/distributions
To test plugin in IDE run ./gradlew runIde
The plugin uses Grammar-Kit to generate parser and lexer. Please install Grammar-Kit plugin and refer to the documentation if you want to modify grammar.
Casbin Model Parser & Lexer
- To regenerate the parser for casbin models, open Casbin.bnf and press Ctrl+Shift+G
- To regenerate the lexer, open CasbinLexer.flex and press Ctrl+Shift+G
Casbin CSV Parser & Lexer
- To regenerate the parser, open CasbinCSV.bnf and press Ctrl+Shift+G
- To regenerate the lexer, open CasbinCSVLexer.flex and press Ctrl+Shift+G
Plugin is written in Kotlin.
Look at ThirdPartyNotices.txt for more information.