From: Ben Steffen Date: Tue, 26 Nov 2019 21:57:18 +0000 (-0500) Subject: Make authz use new config interface X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-base.git/commitdiff_plain/792b476f8c89d0375d525e553f4e62c670330995 Make authz use new config interface --- diff --git a/python/invirt/authz.py b/python/invirt/authz.py index 284db81..7471ac1 100644 --- 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 -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.""" - 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.""" - 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)