diff options
Diffstat (limited to 'repoze')
| -rw-r--r-- | repoze/bfg/router.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/repoze/bfg/router.py b/repoze/bfg/router.py index 92fc5b58a..8549c63da 100644 --- a/repoze/bfg/router.py +++ b/repoze/bfg/router.py @@ -331,7 +331,10 @@ def make_app(root_factory, package=None, filename='configure.zcml', if authorization_policy is None: authorization_policy = ACLAuthorizationPolicy() registry.registerUtility(authorization_policy, IAuthorizationPolicy) - else: + + populateRegistry(registry, filename, package) + + if not authentication_policy: # deal with bw compat of <= 0.8 security policies (deprecated) secpol = registry.queryUtility(ISecurityPolicy) if secpol is not None: @@ -345,8 +348,7 @@ def make_app(root_factory, package=None, filename='configure.zcml', 'security policies will cease to work in a later BFG ' 'release.') registerBBBAuthn(secpol, registry) - - populateRegistry(registry, filename, package) + if mapper.has_routes(): # if the user had any <route/> statements in his configuration, # use the RoutesRootFactory as the root factory |
