[Erp5-report] r14360 - /erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/

nobody at svn.erp5.org nobody at svn.erp5.org
Fri May 4 14:17:59 CEST 2007


Author: jp
Date: Fri May  4 14:17:59 2007
New Revision: 14360

URL: http://svn.erp5.org?rev=14360&view=rev
Log:
Renames Base_generatePassword to Person_generatePassword although it is less generic

Added:
    erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_generatePassword.xml

Added: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_generatePassword.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_generatePassword.xml?rev=14360&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_generatePassword.xml (added)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_generatePassword.xml Fri May  4 14:17:59 2007
@@ -1,0 +1,228 @@
+<?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>
+              <none/>
+            </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 encoding="cdata"><![CDATA[
+
+"""\n
+  This script generates a human readable random\n
+  password in the form \'word\'+digits+\'word\'.\n
+  \n
+  from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/410076\n
+\n
+  parameters: number of \'characters\' , number of \'digits\'\n
+  Pradeep Kishore Gowda <pradeep at btbytes.com >\n
+  License : GPL \n
+  Date : 2005.April.15\n
+  Revision 1.2 \n
+  ChangeLog: \n
+  1.1 - fixed typos \n
+  1.2 - renamed functions _apart & _npart to a_part & n_part as zope does not allow functions to \n
+  start with _\n
+"""\n
+\n
+import string, random\n
+vowels = [\'a\',\'e\',\'i\',\'o\',\'u\']\n
+consonants = [a for a in string.ascii_lowercase if a not in vowels]\n
+digits = string.digits\n
+\n
+def a_part(slen):\n
+    ret = \'\'\n
+    for i in range(slen):\t\t\t\n
+        if i%2 ==0:\n
+            randid = random.randint(0,20) #number of consonants\n
+            ret += consonants[randid]\n
+        else:\n
+            randid = random.randint(0,4) #number of vowels\n
+            ret += vowels[randid]\n
+    return ret\n
+\n
+def n_part(slen):\n
+    ret = \'\'\n
+    for i in range(slen):\n
+        randid = random.randint(0,9) #number of digits\n
+        ret += digits[randid]\n
+    return ret\n
+\n
+fpl = alpha/2\t\t\n
+if alpha % 2 :\n
+    fpl = int(alpha/2) + 1 \t\t\t\t\t\n
+lpl = alpha - fpl\t\n
+\n
+start = a_part(fpl)\n
+mid = n_part(numeric)\n
+end = a_part(lpl)\n
+newpass = "%s%s%s" % (start,mid,end)\n
+return newpass\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>alpha=6, numeric=2</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>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>alpha</string>
+                            <string>numeric</string>
+                            <string>string</string>
+                            <string>random</string>
+                            <string>vowels</string>
+                            <string>append</string>
+                            <string>$append0</string>
+                            <string>_getiter_</string>
+                            <string>_getattr_</string>
+                            <string>a</string>
+                            <string>consonants</string>
+                            <string>digits</string>
+                            <string>a_part</string>
+                            <string>n_part</string>
+                            <string>fpl</string>
+                            <string>int</string>
+                            <string>lpl</string>
+                            <string>start</string>
+                            <string>mid</string>
+                            <string>end</string>
+                            <string>newpass</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <int>6</int>
+                <int>2</int>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Person_generatePassword</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Generate human readable random password</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>




More information about the Erp5-report mailing list