Skip to content

vow-rbac

vow-rbac checks comma-separated roles from headers with has_role and require_role — not a policy engine. Install with vpm:

Terminal window
curl -fsSL https://install.vowlang.dev | sh
export PATH="$HOME/.local/bin:$PATH"
vpm add vow-rbac vow-web-server
vpm install
import vrb from vow_rbac
fn main(caps: Caps) -> int {
return match vrb.require_role("admin,editor", "editor") {
Ok(_ok) => 0,
Err(status) => status,
};
}
Terminal window
cd vow-libs/vow-rbac && vow test tests/rbac.vow