From 328cf7152000cbde24dcd942439b758c786b835e Mon Sep 17 00:00:00 2001 From: Hackerchai Date: Tue, 4 Aug 2020 14:39:20 +0800 Subject: [PATCH 1/2] Feat: modify actix-casbin-auth import --- Cargo.toml | 2 +- README.md | 2 +- tests/test_set_enforcer.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5589e58..50a464d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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..9ffe280 100644 --- a/README.md +++ b/README.md @@ -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) From 2d0c8c292524a0d118ca52b767ac8ad870154271 Mon Sep 17 00:00:00 2001 From: Hackerchai Date: Tue, 4 Aug 2020 14:52:48 +0800 Subject: [PATCH 2/2] Feat: bump version v0.3.1 --- Cargo.toml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 50a464d..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" diff --git a/README.md b/README.md index 9ffe280..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" ```