Skip to content

Commit 845e8ce

Browse files
committed
added example casbinmodel.conf and made pip install TBD
1 parent 67e7464 commit 845e8ce

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Installation / Usage
88

99
To install use pip:
1010
```
11-
$ pip install flask-casbin
11+
TBD
1212
```
1313

1414
Or clone the repo:
@@ -40,6 +40,25 @@ def make_casbin_change(manager):
4040
# Manager is an casbin.enforcer.Enforcer object to make changes to Casbin
4141
return jsonify({'message': 'If you see this you have access'})
4242
```
43+
Example casbinmodel.conf
44+
```ini
45+
[request_definition]
46+
r = sub, obj, act
47+
48+
[policy_definition]
49+
p = sub, obj, act
50+
51+
[role_definition]
52+
g = _, _
53+
54+
[policy_effect]
55+
e = some(where (p.eft == allow))
56+
57+
[matchers]
58+
m = g(r.sub, p.sub) && r.obj == p.obj && r.act == p.act
59+
```
60+
This example file can be found in `tests/casbin_files` along with an example
61+
RBAC policy file.
4362

4463
Development
4564
------------

0 commit comments

Comments
 (0)