We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 35844a2 + 8871cf6 commit e9cd076Copy full SHA for e9cd076
1 file changed
README.md
@@ -32,10 +32,7 @@ Create and use the authorization service:
32
33
```python
34
from panda_authz.service import AuthorizationService
35
-
36
37
authz = AuthorizationService("policy.csv")
38
39
allowed = authz.enforce(
40
["atlas-adc-pandamon"],
41
{"type": "user_contact"},
@@ -53,19 +50,14 @@ more examples in the [documentation](docs/examples.md).
53
50
54
51
# oauth/authz.py
55
52
from django.conf import settings
56
57
58
59
60
authz = AuthorizationService(settings.AUTHZ_POLICY_FILE)
61
```
62
63
Then use it in views or service code:
64
65
66
from oauth.authz import authz
67
68
69
if not authz.enforce(
70
request.user_roles,
71
0 commit comments