-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump casbin version & implement filtered adapter
- Loading branch information
Cheng JIANG
committed
Apr 18, 2020
1 parent
1ef3511
commit b6dd6fb
Showing
5 changed files
with
128 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "diesel-adapter" | ||
version = "0.5.0" | ||
version = "0.6.0" | ||
authors = ["Cheng JIANG <[email protected]>"] | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
|
@@ -9,7 +9,7 @@ homepage="https://github.com/casbin-rs/diesel-adapter" | |
readme="README.md" | ||
|
||
[dependencies] | ||
casbin = { version = "0.5.1" } | ||
casbin = { version = "0.6.0" } | ||
diesel = { version = "1.4.4", features = ["r2d2"] } | ||
async-trait = "0.1.30" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[request_definition] | ||
r = sub, dom, obj, act | ||
|
||
[policy_definition] | ||
p = sub, dom, obj, act | ||
|
||
[role_definition] | ||
g = _, _, _ | ||
|
||
[policy_effect] | ||
e = some(where (p.eft == allow)) | ||
|
||
[matchers] | ||
m = g(r.sub, p.sub, r.dom) && r.dom == p.dom && r.obj == p.obj && r.act == p.act |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
p, admin,domain1,data1,read | ||
p, admin,domain1,data1,write | ||
p, admin,domain2,data2,read | ||
p, admin,domain2,data2,write | ||
g, alice,admin,domain1 | ||
g, bob,admin,domain2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters