Commit 5eae90bb authored by Jean-Paul Smets's avatar Jean-Paul Smets

More formats supported

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16761 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f73b058c
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -82,9 +79,17 @@ if "Associate" in role_list or "Assignee" in role_list or\\\n ...@@ -82,9 +79,17 @@ if "Associate" in role_list or "Assignee" in role_list or\\\n
"Assignor" in role_list or "Manager" in role_list:\n "Assignor" in role_list or "Manager" in role_list:\n
return 1\n return 1\n
\n \n
# Reject original format\n
if format is None:\n
return 0\n
\n
# All users with view permission may view the document \n # All users with view permission may view the document \n
# in read only mode\n # in read only mode\n
if format in (\'html\', \'stripped-html\', \'pdf\', \'png\', \'jpg\', \'gif\'):\n if format in (\'html\', \'stripped-html\', \'text\', \'txt\', \'pdf\', \'png\', \'jpg\', \'gif\'):\n
return 1\n
if format.endswith(\'pdf\'):\n
return 1\n
if format.endswith(\'html\'):\n
return 1\n return 1\n
\n \n
# All other formats are prohibitted\n # All other formats are prohibitted\n
...@@ -144,6 +149,7 @@ return 0\n ...@@ -144,6 +149,7 @@ return 0\n
<string>user</string> <string>user</string>
<string>context</string> <string>context</string>
<string>role_list</string> <string>role_list</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
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