Commit 68647fb2 authored by Aurel's avatar Aurel

The actor in the edit workflow of the XSLT is the user who execute the script

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32288 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0437e14c
...@@ -41,6 +41,7 @@ xmlns:dc="http://purl.org/dc/elements/1.1/">\n ...@@ -41,6 +41,7 @@ xmlns:dc="http://purl.org/dc/elements/1.1/">\n
<xsl:param name="sid" select="None"/>\n <xsl:param name="sid" select="None"/>\n
<xsl:param name="categories_list" select="None"/>\n <xsl:param name="categories_list" select="None"/>\n
<xsl:param name="subject_list" select="None"/>\n <xsl:param name="subject_list" select="None"/>\n
<xsl:param name="author" select="None"/>\n
\n \n
\n \n
<!--Template matching the erp5 Tag-->\n <!--Template matching the erp5 Tag-->\n
...@@ -76,7 +77,7 @@ xmlns:dc="http://purl.org/dc/elements/1.1/">\n ...@@ -76,7 +77,7 @@ xmlns:dc="http://purl.org/dc/elements/1.1/">\n
<pub_date><xsl:value-of select="pubDate|dc:date"/></pub_date>\n <pub_date><xsl:value-of select="pubDate|dc:date"/></pub_date>\n
<workflow_action id="edit_workflow">\n <workflow_action id="edit_workflow">\n
<action type="string">edit</action>\n <action type="string">edit</action>\n
<actor type="string"></actor>\n <actor type="string"><xsl:value-of select=\'$actor\'/></actor>\n
<comment type="string"></comment>\n <comment type="string"></comment>\n
<error_message type="string"></error_message>\n <error_message type="string"></error_message>\n
<serial type="string">0.0.0.0</serial>\n <serial type="string">0.0.0.0</serial>\n
......
...@@ -59,10 +59,11 @@ using an XSLTMethod, after that extract all subobjects and pass them to fromXML ...@@ -59,10 +59,11 @@ using an XSLTMethod, after that extract all subobjects and pass them to fromXML
to create the corresponding RSS Item objects.\n to create the corresponding RSS Item objects.\n
"""\n """\n
from DateTime import DateTime\n from DateTime import DateTime\n
from AccessControl import getSecurityManager\n
\n \n
#Step1: transform an RSS Feed into ERP5 XML\n #Step1: transform an RSS Feed into ERP5 XML\n
#xsl_kw = {\'date\':DateTime()}\n #xsl_kw = {\'date\':DateTime()}\n
xsl_kw = {}\n xsl_kw = {\'actor\':getSecurityManager().getUser().getId()}\n
xml_output = context.TextDocument_asCallable.RSSFeed_asAggregatedImportXML(**xsl_kw)\n xml_output = context.TextDocument_asCallable.RSSFeed_asAggregatedImportXML(**xsl_kw)\n
\n \n
#Step2: extract xml subobjects and create RSS Item objects\n #Step2: extract xml subobjects and create RSS Item objects\n
...@@ -111,9 +112,11 @@ for rss_item in context.contentValues():\n ...@@ -111,9 +112,11 @@ for rss_item in context.contentValues():\n
<tuple> <tuple>
<string>kw</string> <string>kw</string>
<string>DateTime</string> <string>DateTime</string>
<string>AccessControl</string>
<string>getSecurityManager</string>
<string>_getattr_</string>
<string>xsl_kw</string> <string>xsl_kw</string>
<string>_apply_</string> <string>_apply_</string>
<string>_getattr_</string>
<string>context</string> <string>context</string>
<string>xml_output</string> <string>xml_output</string>
<string>erp5_object_list</string> <string>erp5_object_list</string>
......
207 208
\ 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