From 792b476f8c89d0375d525e553f4e62c670330995 Mon Sep 17 00:00:00 2001 From: Ben Steffen Date: Tue, 26 Nov 2019 16:57:18 -0500 Subject: [PATCH] Make authz use new config interface --- python/invirt/authz.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 1.7.9.5