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

Typos and remove blank spaces

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