summaryrefslogtreecommitdiff
path: root/casbin.conf
diff options
context:
space:
mode:
Diffstat (limited to 'casbin.conf')
-rw-r--r--casbin.conf17
1 files changed, 17 insertions, 0 deletions
diff --git a/casbin.conf b/casbin.conf
new file mode 100644
index 0000000..efe93e0
--- /dev/null
+++ b/casbin.conf
@@ -0,0 +1,17 @@
+[request_definition]
+r = subject, domain, action, object
+
+[policy_definition]
+p = subject, domain, action, object
+
+[policy_effect]
+e = some(where (p.eft == allow))
+
+[matchers]
+m =\
+ (\
+ (p.subject == "*" || r.subject == p.subject || regexMatch(r.subject, p.subject))\
+ && (p.domain == "*" || r.domain == p.domain)\
+ && (p.action == "*" || regexMatch(r.action, p.action))\
+ && keyMatch(r.object, p.object)\
+ )