Skip to content

Commit

Permalink
🔧 add eslint config and archive the model conf and csv
Browse files Browse the repository at this point in the history
  • Loading branch information
snowliy committed Aug 22, 2018
1 parent 818d047 commit e91333a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,3 @@
{
"extends": "standard"
}
14 changes: 14 additions & 0 deletions examples/authz_model.conf
@@ -0,0 +1,14 @@
[request_definition]
r = sub, obj, act

[policy_definition]
p = sub, obj, act

[role_definition]
g = _, _

[policy_effect]
e = some(where (p.eft == allow))

[matchers]
m = g(r.sub, p.sub) && keyMatch(r.obj, p.obj) && (r.act == p.act || p.act == "*")
7 changes: 7 additions & 0 deletions examples/authz_policy.csv
@@ -0,0 +1,7 @@
p, alice, /dataset1/*, GET
p, alice, /dataset1/resource1, POST
p, bob, /dataset2/resource1, *
p, bob, /dataset2/resource2, GET
p, bob, /dataset2/folder1/*, POST
p, dataset1_admin, /dataset1/*, *
g, cathy, dataset1_admin

0 comments on commit e91333a

Please sign in to comment.