# HG changeset patch # User Sylvain Thénault # Date 1258014835 -3600 # Node ID b61c7b065a663e4b8b2c21fdb49cf1298eadf32f # Parent 653ddc1e41799b6acba3ffe01dad666ee3224c28 do not fail if anon user == manager, simply emit warning that it should not be done in production. close #469395 diff -r 653ddc1e4179 -r b61c7b065a66 misc/migration/postcreate.py --- a/misc/migration/postcreate.py Thu Nov 12 09:27:26 2009 +0100 +++ b/misc/migration/postcreate.py Thu Nov 12 09:33:55 2009 +0100 @@ -34,7 +34,10 @@ # create anonymous user if all-in-one config and anonymous user has been specified if hasattr(config, 'anonymous_user'): anonlogin, anonpwd = config.anonymous_user() - if anonlogin: + if anonlogin == session.user.login: + print 'you are using a manager account as anonymous user.' + print 'Hopefully this is not a production instance...' + elif anonlogin: rql('INSERT CWUser X: X login %(login)s, X upassword %(pwd)s,' 'X in_group G WHERE G name "guests"', {'login': unicode(anonlogin), 'pwd': anonpwd})