1 stable release
new 1.0.0 | Jan 27, 2025 |
---|
#1068 in Command line utilities
39 downloads per month
17KB
62 lines
casbin-rust-cli
casbin-rust-cli is a command-line tool based on Casbin (Rust language), enabling you to use all of Casbin APIs in the shell.
Installation
From crates.io
cargo install --locked casbin-rust-cli
Install Manually
git clone https://github.com/casbin-rs/casbin-rust-cli.git
cd casbin-rust-cli
cargo install --path .
Options
options | description | must |
---|---|---|
-m, --model |
The path of the model file or model text | y |
-p, --policy |
The path of the policy file or policy text | y |
enforce |
Check permissions | n |
Get started
-
Check whether Alice has read permission on data1
./casbin-rust-cli enforce -m "examples/basic_model.conf" -p "examples/basic_policy.csv" "alice" "data1" "read"
{"allow":true,"explain":[]}
Dependencies
~14–26MB
~372K SLoC