Commit 3f46cd13 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Typos and remove blank spaces

parent 7b9c2c23
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
"""Check login is available locally and globally for instance with SSO.\n """Check login is available locally and globally for instance with SSO.\n
Parameters:\n Parameters:\n
value -- field value (string)\n value -- field value (string)\n
RESQEST -- standard REQUEST variable"""\n REQUEST -- standard REQUEST variable"""\n
\n \n
def getRealContext():\n def getRealContext():\n
if not REQUEST:\n if not REQUEST:\n
......
...@@ -50,8 +50,10 @@ ...@@ -50,8 +50,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""Check if login exist or not. It\'s the inverse of avaibility"""\n <value> <string>"""\n
return not context.ERP5Site_isLocalLoginAvailable(value,REQUEST)\n Check if login exist or not. It\'s the inverse of avaibility\n
"""\n
return not context.ERP5Site_isLocalLoginAvailable(value, REQUEST)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -67,23 +67,23 @@ if REQUEST is not None:\n ...@@ -67,23 +67,23 @@ if REQUEST is not None:\n
#Create related object, pass a copy of the dict\n #Create related object, pass a copy of the dict\n
context.CredentialRequest_setDefaultDestinationDecision([x for x in related_portal_type])\n context.CredentialRequest_setDefaultDestinationDecision([x for x in related_portal_type])\n
\n \n
#Check consistency of the subscription, pass a copy of the dict\n # Check consistency of the subscription, pass a copy of the dict\n
context.Credential_checkConsistency([x for x in related_portal_type])\n context.Credential_checkConsistency([x for x in related_portal_type])\n
\n \n
#Fill related object with credential request\n # Fill related object with credential request\n
for portal_type in related_portal_type:\n for portal_type in related_portal_type:\n
getattr(context,\'CredentialRequest_setRegisteredInformationTo%s\' % portal_type.replace(\' \',\'\'))()\n getattr(context,\'CredentialRequest_setRegisteredInformationTo%s\' % portal_type.replace(\' \',\'\'))()\n
\n \n
#Create assignment\n # Create assignment\n
context.CredentialRequest_updatePersonAssignment()\n context.CredentialRequest_updatePersonAssignment()\n
\n \n
#Create account\n # Create account\n
login, password = context.CredentialRequest_createUser()\n login, password = context.CredentialRequest_createUser()\n
\n \n
#Update local roles\n # Update Local Roles\n
context.CredentialRequest_updateLocalRolesOnSecurityGroups()\n context.CredentialRequest_updateLocalRolesOnSecurityGroups()\n
\n \n
#Send notification in activities\n # Send notification in activities\n
context.activate(activity=\'SQLQueue\').CredentialRequest_sendAcceptedNotification(login,password)\n context.activate(activity=\'SQLQueue\').CredentialRequest_sendAcceptedNotification(login,password)\n
</string> </value> </string> </value>
</item> </item>
......
...@@ -59,11 +59,11 @@ if REQUEST:\n ...@@ -59,11 +59,11 @@ if REQUEST:\n
\n \n
person = context.getDestinationDecisionValue(portal_type="Person")\n person = context.getDestinationDecisionValue(portal_type="Person")\n
\n \n
#Create user of the person only if not exist\n # Create user of the person only if not exist\n
if person.hasReference() and person.getPassword(): \n if person.hasReference() and person.getPassword(): \n
return person.getReference(), None\n return person.getReference(), None\n
\n \n
#Set login\n # Set login\n
login = context.getReference()\n login = context.getReference()\n
if not person.hasReference():\n if not person.hasReference():\n
if not login:\n if not login:\n
...@@ -73,14 +73,12 @@ else:\n ...@@ -73,14 +73,12 @@ else:\n
login = person.getReference()\n login = person.getReference()\n
\n \n
password = None\n password = None\n
#Set password if no password on the person\n # Set password if no password on the person\n
if not person.getPassword() :\n if not person.getPassword():\n
\n
if context.getPassword():\n if context.getPassword():\n
#User has fill a password\n #User has fill a password\n
password = context.getPassword()\n password = context.getPassword()\n
person.setEncodedPassword(password)\n person.setEncodedPassword(password)\n
\n
else:\n else:\n
#We should generate a password\n #We should generate a password\n
password = context.Person_generatePassword(alpha=5, numeric=3)\n password = context.Person_generatePassword(alpha=5, numeric=3)\n
......
...@@ -50,12 +50,12 @@ ...@@ -50,12 +50,12 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""Send an email (after accept a credential request\n <value> <string>"""Send an email after accept a credential request\n
Proxy: Assignee, Assignor, Member -- allow to send notification by mail"""\n Proxy: Assignee, Assignor, Member -- allow to send notification by mail\n
""""Exemple of notification message\n
Congratulation, the creation of you new Instance Name account \'${login_name}\' is finished.\\nYour password is \'${login_password}\'\\nThank you"))\n
\n \n
Congratulation, the creation of you new Instance Name account \'${user_id}\' is finished.\\n\\nThank you",\n Example of notification message:\n
Congratulation, the creation of you new Instance Name account \'${login_name}\' is finished.\\nYour password is \'${login_password}\'\\nThank you"))\n
Congratulation, the creation of you new Instance Name account \'${user_id}\' is finished.\\n\\nThank you",\n
"""\n """\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
recipient = context.getDestinationDecisionValue(portal_type="Person")\n recipient = context.getDestinationDecisionValue(portal_type="Person")\n
......
...@@ -102,7 +102,6 @@ person_mapping = (\n ...@@ -102,7 +102,6 @@ person_mapping = (\n
\n \n
context.Credential_copyRegistredInformation(person, person_mapping)\n context.Credential_copyRegistredInformation(person, person_mapping)\n
\n \n
\n
#try to validate, can be get error if already validated\n #try to validate, can be get error if already validated\n
try:\n try:\n
person.validate()\n person.validate()\n
......
...@@ -83,16 +83,15 @@ for assignment in open_assignment_list:\n ...@@ -83,16 +83,15 @@ for assignment in open_assignment_list:\n
current_assignment_list[role].append(assignment)\n current_assignment_list[role].append(assignment)\n
else:\n else:\n
current_assignment_list[role] = [assignment]\n current_assignment_list[role] = [assignment]\n
\n
\n \n
organisation_url = organisation is not None and organisation.getRelativeUrl() or None;\n organisation_url = organisation is not None and organisation.getRelativeUrl() or None\n
for role in context.getRoleList():\n for role in context.getRoleList():\n
if role in current_assignment_list:\n if role in current_assignment_list:\n
#Update assignment\n #Update assignment\n
for assignment in current_assignment_list[role]:\n for assignment in current_assignment_list[role]:\n
assignment.update()\n assignment.update()\n
assignment.edit(site = context.getSite(),\n assignment.edit(site = context.getSite(),\n
activity = context.getActivityList(), \n activity = context.getActivityList(),\n
function = context.getFunctionList(),\n function = context.getFunctionList(),\n
destination = organisation_url,\n destination = organisation_url,\n
stop_date=delay)\n stop_date=delay)\n
......
355 356
\ 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