X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=src%2Fkoehsel.policy%2Fkoehsel%2Fpolicy%2Fsetuphandlers.py;fp=src%2Fkoehsel.policy%2Fkoehsel%2Fpolicy%2Fsetuphandlers.py;h=d175a1fc9cd877359aa954fe8e6c710bbd526208;hb=e20c223be2602a75e30ec3352a559e9eb1c55140;hp=71cd55894273da2655fb6b41c4206331d0d94a21;hpb=a87bdf67f6f945478be9374fcab16f301225bcd8;p=zope-bootstrap.git diff --git a/src/koehsel.policy/koehsel/policy/setuphandlers.py b/src/koehsel.policy/koehsel/policy/setuphandlers.py index 71cd558..d175a1f 100644 --- a/src/koehsel.policy/koehsel/policy/setuphandlers.py +++ b/src/koehsel.policy/koehsel/policy/setuphandlers.py @@ -16,9 +16,10 @@ specify additional factory arguments. After creation, the object is published if id = container.invokeFactory(id=id, type_name=type_name, **kw) ob = getattr(container,id) event.notify(ObjectInitializedEvent(ob)) - ob.at_post_create_script() -# if hasattr(aq_base(ob), 'manage_afterPortalFactoryCreate'): -# ob.manage_afterPortalFactoryCreate() + if hasattr(aq_base(ob), 'at_post_create_script'): + ob.at_post_create_script() + if hasattr(aq_base(ob), 'manage_afterPortalFactoryCreate'): + ob.manage_afterPortalFactoryCreate() wf = getToolByName(container, 'portal_workflow') if wf.getInfoFor(ob,'review_state','') != 'published': wf.doActionFor(ob,'publish',comment='site setup') @@ -70,7 +71,7 @@ def appInit(app): # Call 'contentSetup' as SITE_OWNER user with a valid REQUEST req = makerequest(app) - newSecurityManager(req.REQUEST, app.acl_users.getUser(SITE_OWNER).__of__(app.acl_users)) + newSecurityManager(req.REQUEST, app.acl_users.getUserById(SITE_OWNER).__of__(app.acl_users)) contentSetup(req) transaction.commit() newSecurityManager(None, AccessControl.User.system)