Updated database upgrade code
authorThierry Florac <tflorac@ulthar.net>
Sat, 10 Mar 2018 02:07:46 +0100
changeset 108 c90fcf4fb977
parent 107 38154fdcc393
child 109 8d30e6009507
Updated database upgrade code
src/pyams_security/site.py
--- a/src/pyams_security/site.py	Wed Mar 07 16:14:45 2018 +0100
+++ b/src/pyams_security/site.py	Sat Mar 10 02:07:46 2018 +0100
@@ -20,7 +20,6 @@
 from pyams_utils.interfaces.site import ISiteGenerations
 from zope.lifecycleevent.interfaces import IObjectCreatedEvent
 from zope.principalannotation.interfaces import IPrincipalAnnotationUtility
-from zope.site.interfaces import INewLocalSite
 
 # import packages
 from pyams_security.plugin.admin import AdminAuthenticationPlugin
@@ -57,17 +56,11 @@
     return service_auth
 
 
-@subscriber(INewLocalSite)
-def handle_new_local_site(event):
-    """Create a new security manager when a site is created"""
-    site = event.manager.__parent__
-    check_required_utilities(site, REQUIRED_UTILITIES)
-
-
 @utility_config(name='PyAMS security', provides=ISiteGenerations)
 class SecurityGenerationsChecker(object):
     """I18n generations checker"""
 
+    order = 30
     generation = 1
 
     def evolve(self, site, current=None):