diff --git a/Cargo.toml b/Cargo.toml index 5589e58..8869f94 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-casbin" -version = "0.3.0" +version = "0.3.1" authors = ["Eason Chai ","Cheng JIANG "] edition = "2018" license = "Apache-2.0" @@ -15,6 +15,7 @@ path = "src/lib.rs" [dependencies] actix = "0.9.0" casbin = { version = "1.1.2", default-features = false, features = [ "incremental" ] } +actix-casbin-auth = {version = "0.3.1", default-features = false } tokio = { version = "0.2.21", default-features = false, optional = true } async-std = { version = "1.6.2", default-features = false, optional = true } futures = "0.3" @@ -29,4 +30,3 @@ runtime-async-std = ["casbin/runtime-async-std", "async-std/std", "actix-casbin- tokio = { version = "0.2.21", features = [ "full" ] } async-std = { version = "1.6.2", features = [ "attributes" ] } actix-rt = "1.1.1" -actix-casbin-auth = {version = "0.3.0", default-features = false } diff --git a/README.md b/README.md index 00e7a45..1c0b466 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Add it to `Cargo.toml` ```rust -actix-casbin = "0.3.0" +actix-casbin = "0.3.1" actix-rt = "1.1.1" ``` @@ -66,7 +66,7 @@ async fn main() -> Result<()> { .await?; let a = FileAdapter::new("examples/rbac_policy.csv"); - let casbin_middleware = CasbinService::new(m, a).await; + let mut casbin_middleware = CasbinService::new(m, a).await; let enforcer = casbin_middleware.get_enforcer().await; let addr = CasbinActor::::set_enforcer(enforcer) diff --git a/tests/test_set_enforcer.rs b/tests/test_set_enforcer.rs index ba12039..8502309 100644 --- a/tests/test_set_enforcer.rs +++ b/tests/test_set_enforcer.rs @@ -9,7 +9,7 @@ async fn test_set_enforcer() { .unwrap(); let a = FileAdapter::new("examples/rbac_policy.csv"); - let casbin_middleware = CasbinService::new(m, a).await; + let mut casbin_middleware = CasbinService::new(m, a).await; let enforcer = casbin_middleware.get_enforcer().await; let addr = CasbinActor::::set_enforcer(enforcer)