projects
/
invirt/packages/invirt-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f581f23
)
Make authz use new config interface
author
Ben Steffen
<bds@mit.edu>
Tue, 26 Nov 2019 21:57:18 +0000
(16:57 -0500)
committer
Ben Steffen
<bds@mit.edu>
Tue, 26 Nov 2019 21:57:18 +0000
(16:57 -0500)
python/invirt/authz.py
patch
|
blob
|
history
diff --git
a/python/invirt/authz.py
b/python/invirt/authz.py
index
284db81
..
7471ac1
100644
(file)
--- a/
python/invirt/authz.py
+++ b/
python/invirt/authz.py
@@
-11,15
+11,15
@@
a unique name. That name can then be configured in
import pkg_resources
import pkg_resources
-from invirt.config import structs as cfg
+from invirt.config import config
def expand_owner(name):
"""Expand an "owner" to a list of authorized users."""
def expand_owner(name):
"""Expand an "owner" to a list of authorized users."""
- for ep in pkg_resources.iter_entry_points('invirt.authz', cfg.authz.name):
+ for ep in pkg_resources.iter_entry_points('invirt.authz', config['authz.name']):
return ep.load().expandOwner(name)
def expand_admin(name):
"""Expand an "administrator" to a list of authorized users."""
return ep.load().expandOwner(name)
def expand_admin(name):
"""Expand an "administrator" to a list of authorized users."""
- for ep in pkg_resources.iter_entry_points('invirt.authz', cfg.authz.name):
+ for ep in pkg_resources.iter_entry_points('invirt.authz', config['authz.name']):
return ep.load().expandAdmin(name)
return ep.load().expandAdmin(name)