Back to index

plone3  3.1.7
Functions
CMFPlone.migrations.v2_5.two51_two52 Namespace Reference

Functions

def two51_two52
def setLoginFormInCookieAuth

Function Documentation

Makes sure the cookie auth redirects to 'require_login' instead
   of 'login_form'.

Definition at line 22 of file two51_two52.py.

00022 
00023 def setLoginFormInCookieAuth(portal, out):
00024     """Makes sure the cookie auth redirects to 'require_login' instead
00025        of 'login_form'."""
00026     uf = portal._getOb('acl_users', None)
00027     if uf is None or getattr(uf.aq_base, '_getOb', None) is None:
00028         # we have no user folder or it's not a PAS folder, do nothing
00029         return
00030     cookie_auth = uf._getOb('credentials_cookie_auth', None)
00031     if cookie_auth is None:
00032         # there's no cookie auth object, do nothing
00033         return
00034     current_login_form = cookie_auth.getProperty('login_path')
00035     if current_login_form != 'login_form':
00036         # it's customized already, do nothing
00037         return
00038     cookie_auth.manage_changeProperties(login_path='require_login')
00039     out.append("Changed credentials_cookie_path login_path property "
00040                "to 'require_login'.")

Here is the caller graph for this function:

2.5.1 -> 2.5.2

Definition at line 5 of file two51_two52.py.

00005 
00006 def two51_two52(portal):
00007     """2.5.1 -> 2.5.2
00008     """
00009     out = []
00010 
00011     # Make the portal a Zope3 site
00012     enableZope3Site(portal, out)
00013 
00014     # register some tools as utilities
00015     registerToolsAsUtilities(portal, out)
00016 
00017     # Make sure the cookie auth redirects to the correct location
00018     setLoginFormInCookieAuth(portal, out)
00019 
00020     return out
00021 

Here is the call graph for this function: