[Erp5-report] r23239 - in /erp5/trunk/bt5/erp5_egov: SkinTemplateItem/portal_skins/erp5_ego...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Aug 28 16:22:45 CEST 2008
Author: fabien
Date: Thu Aug 28 16:22:38 2008
New Revision: 23239
URL: http://svn.erp5.org?rev=23239&view=rev
Log:
improve a bit AssignToUserAction_getUserList script removing hardcoded values
Modified:
erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/AssignToUserAction_getUserList.xml
erp5/trunk/bt5/erp5_egov/bt/revision
Modified: erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/AssignToUserAction_getUserList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/AssignToUserAction_getUserList.xml?rev=23239&r1=23238&r2=23239&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/AssignToUserAction_getUserList.xml (original)
+++ erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/AssignToUserAction_getUserList.xml Thu Aug 28 16:22:38 2008
@@ -65,12 +65,17 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string>\'\'\'This script return the list of all users assigned to this service\'\'\'\n
+ <value> <string>\'\'\'This script return the list of all users that is possible to assign the application\'\'\'\n
\n
-#XXX Just for test\n
-#person_list = context.person_module.contentValues()\n
-#return [(\'\', \'\')] + [(i.getTitleOrId(), i.getRelativeUrl()) for i in person_list]\n
-return [(\'admin\',\'admin\'), (\'chef\',\'chef\'), (\'jp\',\'jp\'), (\'citoyen\',\'citoyen\'), (\'agent-test\',\'agent-test\'), (\'agentkaolak\',\'agentkaolak\')]\n
+# XXX for now, it returns every people who works in cge\n
+# in future, the site and function should be take into account\n
+\n
+cat = context.restrictedTraverse(\'portal_categories/group/dgid/di/cge\')\n
+cat_uid = cat.getUid()\n
+agent_list = context.portal_catalog(portal_type=\'Assignment\',\n
+ group_uid=cat_uid)\n
+\n
+return [(agent.getParentValue().getReference(), agent.getParentValue().getId()) for agent in agent_list if agent.getParentValue().getReference()]\n
</string> </value>
</item>
<item>
@@ -96,6 +101,14 @@
<value> <string></string> </value>
</item>
<item>
+ <key> <string>_proxy_roles</string> </key>
+ <value>
+ <tuple>
+ <string>Manager</string>
+ </tuple>
+ </value>
+ </item>
+ <item>
<key> <string>errors</string> </key>
<value>
<tuple/>
@@ -118,7 +131,17 @@
<item>
<key> <string>co_varnames</string> </key>
<value>
- <tuple/>
+ <tuple>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>cat</string>
+ <string>cat_uid</string>
+ <string>agent_list</string>
+ <string>append</string>
+ <string>$append0</string>
+ <string>_getiter_</string>
+ <string>agent</string>
+ </tuple>
</value>
</item>
</dictionary>
@@ -137,6 +160,12 @@
<value> <string>AssignToUserAction_getUserList</string> </value>
</item>
<item>
+ <key> <string>uid</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
Modified: erp5/trunk/bt5/erp5_egov/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/bt/revision?rev=23239&r1=23238&r2=23239&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_egov/bt/revision (original)
+++ erp5/trunk/bt5/erp5_egov/bt/revision Thu Aug 28 16:22:38 2008
@@ -1,1 +1,1 @@
-250
+252
More information about the Erp5-report
mailing list