Commit b82bfa4c authored by Gabriel Monnerat's avatar Gabriel Monnerat

revert part of code(r41659) because this code is breaking the Web Site when a...

revert part of code(r41659) because this code is breaking the Web Site when a anonymous user try access one document shared.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41671 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 635f768d
...@@ -55,23 +55,6 @@ ...@@ -55,23 +55,6 @@
"""\n """\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
\n \n
if portal.portal_membership.isAnonymousUser() and context.REQUEST.form.has_key("key"):\n
kw = {}\n
module = portal.getDefaultModule(\'Person\')\n
reference = str(DateTime().millis())\n
person = module.newContent(portal_type=\'Person\',\n
description=context.REQUEST.get(\'HTTP_X_FORWARDED_FOR\',\'Found no ip\'),\n
reference=reference,\n
)\n
assignment = person.newContent(portal_type="Assignment")\n
assignment.open()\n
person.validate()\n
uf = getattr(portal, \'acl_users\', None)\n
plugin = getattr(uf, \'ung_key_auth\',None)\n
kw["__ac_key"] = plugin.encrypt(reference)\n
kw["key"] = context.REQUEST.form.get("key")\n
return context.Base_redirect("/", keep_items=dict(**kw)) \n
\n
if context.REQUEST.form.has_key("key"):\n if context.REQUEST.form.has_key("key"):\n
webpage = context.WebSection_userFollowUpWebPage(reference=context.REQUEST.form.get("key"))\n webpage = context.WebSection_userFollowUpWebPage(reference=context.REQUEST.form.get("key"))\n
webpage_id = webpage.getId()\n webpage_id = webpage.getId()\n
...@@ -134,23 +117,10 @@ else:\n ...@@ -134,23 +117,10 @@ else:\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
<string>kw</string>
<string>module</string>
<string>str</string>
<string>DateTime</string>
<string>reference</string>
<string>person</string>
<string>assignment</string>
<string>getattr</string>
<string>None</string>
<string>uf</string>
<string>plugin</string>
<string>_write_</string>
<string>_apply_</string>
<string>dict</string>
<string>webpage</string> <string>webpage</string>
<string>webpage_id</string> <string>webpage_id</string>
<string>editor_name</string> <string>editor_name</string>
<string>dict</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
2010-12-22 gabriel 2010-12-22 gabriel
* Implemented code to allow which the user edit the document using the reference of the document shared. If is a Anonymous User, one user is created to him. * Implemented code to allow which the user edit the document using the reference of the document shared.
* Clean up the script to generate the UNG Domains and remove not used scripts. * Clean up the script to generate the UNG Domains and remove not used scripts.
2010-12-20 gabriel 2010-12-20 gabriel
......
137 138
\ 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