Commit 9b23b357 authored by Fabien Morin's avatar Fabien Morin

anonymous_module variable was not set on the request, now it's ok

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23609 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 77f69dbc
...@@ -69,10 +69,6 @@ if not context.isCaptchaTextCorrect(captcha_text):\n ...@@ -69,10 +69,6 @@ if not context.isCaptchaTextCorrect(captcha_text):\n
module = context.getDefaultModule(portal_type=\'Subscription Form\')\n module = context.getDefaultModule(portal_type=\'Subscription Form\')\n
form = module.newContent(portal_type=\'Subscription Form\')\n form = module.newContent(portal_type=\'Subscription Form\')\n
\n \n
# set in the request wich module is used for this annonymous application\n
# this is use in PAS\n
request.set(\'anonymous_module\', module.getId())\n
\n
# XXX this group is not good for a form\n # XXX this group is not good for a form\n
# but it\'s used for security on subscription form module\n # but it\'s used for security on subscription form module\n
form.setGroup(\'dgid/di/cge\')\n form.setGroup(\'dgid/di/cge\')\n
...@@ -92,13 +88,11 @@ form.setPassword(password)\n ...@@ -92,13 +88,11 @@ form.setPassword(password)\n
\n \n
# the ownership is the form itself\n # the ownership is the form itself\n
form.manage_addLocalRoles(new_object_id, [\'Owner\',])\n form.manage_addLocalRoles(new_object_id, [\'Owner\',])\n
#form.changeOwnership(new_object_id)\n
\n
\n
\n
\n \n
# login with this new form\n # login with this new form\n
redirect_url = \'%s/logged_in?__ac_name=%s&__ac_password=%s\' % (redirect_url, new_object_id, password)\n # set in the request wich module is used for this annonymous application\n
# this is use in PAS\n
redirect_url = \'%s/logged_in?__ac_name=%s&__ac_password=%s&anonymous_module=%s\' % (redirect_url, new_object_id, password, module.getId())\n
\n \n
result = request[\'RESPONSE\'].redirect(redirect_url) \n result = request[\'RESPONSE\'].redirect(redirect_url) \n
return result\n return result\n
......
299 303
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment