<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <tuple>
        <tuple>
          <string>Products.PythonScripts.PythonScript</string>
          <string>PythonScript</string>
        </tuple>
        <none/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>Python_magic</string> </key>
            <value> <string encoding="base64">O/INCg==</string> </value>
        </item>
        <item>
            <key> <string>Script_magic</string> </key>
            <value> <int>3</int> </value>
        </item>
        <item>
            <key> <string>__ac_local_roles__</string> </key>
            <value>
              <none/>
            </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>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
pref = sci.object\n
portal = sci.getPortal()\n
LOG = lambda msg: pref.log("PreferenceWorkflow.disableOtherPreferences on %s"%pref, msg)\n
\n
# deactivate all other preferences of the same level \n
for p in portal.portal_preferences.searchFolder(spec=(\'ERP5 Preference\',)) :\n
  p = p.getObject()\n
  try :\n
    if portal.portal_membership.getAuthenticatedMember().allowed(p, [\'Owner\', \'Assignor\']) :\n
      if p != pref and \\\n
         p.getPreferenceState() == \'enabled\' and \\\n
         p.getPriority() == pref.getPriority() :\n
        p.portal_workflow.doActionFor(p,\n
           \'disable_action\',\n
           wf_id=\'preference_workflow\')\n
        LOG(\'Deactivated %s\'%p)\n
  except \'Unauthorized\', a :\n
    LOG("not authorized to deactivate %s"%p)\n
\n
# vim: syntax=python\n
</string> </value>
        </item>
        <item>
            <key> <string>_code</string> </key>
            <value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAQAAAAoAAAAVAAAAAwAA
AHNpAQAAZAEAawAAbAEAfQIAAXQCAHwAAGQCAIMCAIkAAHQCAHwAAGQDAIMCAIMAAH0FAIcAAGQE
AIYAAH0GAHgoAXQHAHQCAHQCAHwFAGQFAIMCAGQGAIMCAGQHAGQIAGYBAIMAAYMBAERd/AB9CAB0
AgB8CABkCQCDAgCDAAB9CAB5vgB0AgB0AgB0AgB8BQBkCgCDAgBkCwCDAgCDAABkDACDAgB8CABk
DQBkDgBnAgCDAgBvhgABfAgAiAAAagMAbzsAAXQCAHwIAGQPAIMCAIMAAGQQAGoCAG8iAAF0AgB8
CABkEQCDAgCDAAB0AgCIAABkEQCDAgCDAABqAgBvNwABdAIAdAIAfAgAZBIAgwIAZBMAgwIAfAgA
ZBQAZBUAZBYAgwIBAXwGAGQXAHwIABaDAQABcToBAW4BAAFXcWUABGQYAGoKAG8XAAEBfQkAAXwG
AGQZAHwIABaDAQABcWUAAVhxZQBXZAAAUygaAAAATigBAAAAcxAAAABWYWxpZGF0aW9uRmFpbGVk
cwYAAABvYmplY3RzCQAAAGdldFBvcnRhbGMBAAAAAwAAAAMAAAADAAAAcxoAAAB0AACIAABkAQCD
AgBkAgCIAAAWfAAAgwIAUygDAAAATnMDAAAAbG9nczAAAABQcmVmZXJlbmNlV29ya2Zsb3cuZGlz
YWJsZU90aGVyUHJlZmVyZW5jZXMgb24gJXMoAwAAAHMJAAAAX2dldGF0dHJfcwQAAABwcmVmcwMA
AABtc2coAwAAAHMDAAAAbXNncwkAAABfZ2V0YXR0cl9zBAAAAHByZWYoAQAAAHMEAAA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EMAysABgESAQwBKwEQARkB
KAEfAxoBEAEoAQAAAHMXAAAAZGlzYWJsZU90aGVyUHJlZmVyZW5jZXMoAQAAAHMXAAAAZGlzYWJs
ZU90aGVyUHJlZmVyZW5jZXMoAAAAACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzCAAAADxtb2R1
bGU+AQAAAHMAAAAA</string> </value>
        </item>
        <item>
            <key> <string>_dav_writelocks</string> </key>
            <value>
              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
            </value>
        </item>
        <item>
            <key> <string>_filepath</string> </key>
            <value> <string>Script (Python):/nexedi/portal_workflow/preference_workflow/scripts/disableOtherPreferences</string> </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>sci</string> </value>
        </item>
        <item>
            <key> <string>_proxy_roles</string> </key>
            <value>
              <tuple/>
            </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>1</int> </value>
                    </item>
                    <item>
                        <key> <string>co_varnames</string> </key>
                        <value>
                          <tuple>
                            <string>sci</string>
                            <string>Products.DCWorkflow.DCWorkflow</string>
                            <string>ValidationFailed</string>
                            <string>_getattr_</string>
                            <string>pref</string>
                            <string>portal</string>
                            <string>LOG</string>
                            <string>_getiter_</string>
                            <string>p</string>
                            <string>a</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>disableOtherPreferences</string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
  <record id="2" aka="AAAAAAAAAAI=">
    <pickle>
      <tuple>
        <tuple>
          <string>Persistence</string>
          <string>PersistentMapping</string>
        </tuple>
        <none/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>_container</string> </key>
            <value>
              <dictionary/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
