[Erp5-report] r38959 fabien - in /experimental/bt5/erp5_credential: SkinTemplateItem/portal...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 7 15:47:12 CEST 2010
Author: fabien
Date: Thu Oct 7 15:47:12 2010
New Revision: 38959
URL: http://svn.erp5.org?rev=38959&view=rev
Log:
Add a script used to be called by an alarm to accept all submited credential object if the corresponding preference is checked.
Added:
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_acceptSubmittedCredentials.xml
Modified:
experimental/bt5/erp5_credential/bt/revision
Added: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_acceptSubmittedCredentials.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_acceptSubmittedCredentials.xml?rev=38959&view=auto
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_acceptSubmittedCredentials.xml (added)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_acceptSubmittedCredentials.xml [utf8] Thu Oct 7 15:47:12 2010
@@ -0,0 +1,162 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string>portal = context.getPortalObject()\n
+\n
+if portal.portal_preferences.getPreferredCredentialRequestAutomaticApproval():\n
+ module = context.getDefaultModule(\'Credential Request\')\n
+ result = module.searchFolder(portal_type=\'Credential Request\',\n
+ validation_state=\'submitted\')\n
+ for document in result:\n
+ document.activate().accept()\n
+\n
+if portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApproval() and \\\n
+ portal.portal_preferences.getPreferredOrganisationCredentialUpdateAutomaticApproval():\n
+ module = context.getDefaultModule(\'Credential Update\')\n
+ result = module.searchFolder(portal_type=\'Credential Update\',\n
+ validation_state=\'submitted\')\n
+ for document in result:\n
+ document.activate().accept()\n
+elif portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApproval() and \\\n
+ not portal.portal_preferences.getPreferredOrganisationCredentialUpdateAutomaticApproval():\n
+ module = context.getDefaultModule(\'Credential Update\')\n
+ result = module.searchFolder(portal_type=\'Credential Update\',\n
+ validation_state=\'submitted\')\n
+ for document in result:\n
+ if document.getDestinationDecisionValue().getPortalType() == \'Person\':\n
+ document.activate().accept()\n
+elif not portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApproval() and \\\n
+ portal.portal_preferences.getPreferredOrganisationCredentialUpdateAutomaticApproval():\n
+ module = context.getDefaultModule(\'Credential Update\')\n
+ result = module.searchFolder(portal_type=\'Credential Update\',\n
+ validation_state=\'submitted\')\n
+ for document in result:\n
+ if document.getDestinationDecisionValue().getPortalType() == \'Organisation\':\n
+ document.activate().accept()\n
+\n
+if portal.portal_preferences.getPreferredCredentialRecoveryAutomaticApproval():\n
+ module = context.getDefaultModule(\'Credential Recovery\')\n
+ result = module.searchFolder(portal_type=\'Credential Recovery\',\n
+ validation_state=\'submitted\')\n
+ for document in result:\n
+ document.activate().accept()\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>portal</string>
+ <string>module</string>
+ <string>result</string>
+ <string>_getiter_</string>
+ <string>document</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>ERP5Site_acceptSubmittedCredentials</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: experimental/bt5/erp5_credential/bt/revision
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/revision?rev=38959&r1=38958&r2=38959&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/revision [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/revision [utf8] Thu Oct 7 15:47:12 2010
@@ -1 +1 @@
-282
\ No newline at end of file
+283
\ No newline at end of file
More information about the Erp5-report
mailing list