Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Richard
erp5
Commits
f4c94450
Commit
f4c94450
authored
Jul 22, 2011
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new preference which allow site admin control process of asking
security question (default is ask).
parent
c58dfe13
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
187 additions
and
17 deletions
+187
-17
bt5/erp5_credential/PropertySheetTemplateItem/portal_property_sheets/CredentialPreference.xml
...plateItem/portal_property_sheets/CredentialPreference.xml
+1
-1
bt5/erp5_credential/PropertySheetTemplateItem/portal_property_sheets/CredentialPreference/preferred_ask_credential_question_property.xml
...Preference/preferred_ask_credential_question_property.xml
+65
-0
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_getRelatedCredentialQuestionDialog.xml
...redential/ERP5Site_getRelatedCredentialQuestionDialog.xml
+10
-5
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialRecovery.xml
..._skins/erp5_credential/ERP5Site_newCredentialRecovery.xml
+3
-1
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialRequest.xml
...l_skins/erp5_credential/ERP5Site_newCredentialRequest.xml
+0
-1
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/SystemPreference_viewCredential.xml
...skins/erp5_credential/SystemPreference_viewCredential.xml
+11
-8
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/SystemPreference_viewCredential/my_preferred_ask_credential_question.xml
...e_viewCredential/my_preferred_ask_credential_question.xml
+96
-0
bt5/erp5_credential/bt/revision
bt5/erp5_credential/bt/revision
+1
-1
No files found.
bt5/erp5_credential/PropertySheetTemplateItem/portal_property_sheets/CredentialPreference.xml
View file @
f4c94450
...
...
@@ -30,7 +30,7 @@
</item>
<item>
<key>
<string>
last_id
</string>
</key>
<value>
<string>
2
</string>
</value>
<value>
<string>
3
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
...
...
bt5/erp5_credential/PropertySheetTemplateItem/portal_property_sheets/CredentialPreference/preferred_ask_credential_question_property.xml
0 → 100644
View file @
f4c94450
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
mode
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/boolean
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
If set will ask the specified during account creation security question when doing a password recover.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_ask_credential_question_property
</string>
</value>
</item>
<item>
<key>
<string>
mode
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python: True
</string>
</value>
</item>
<item>
<key>
<string>
write_permission
</string>
</key>
<value>
<string>
Manage properties
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_getRelatedCredentialQuestionDialog.xml
View file @
f4c94450
...
...
@@ -57,6 +57,8 @@
\n
request = context.REQUEST\n
request.set(\'reference\', reference)\n
portal = context.getPortalObject()\n
portal_preferences = context.portal_preferences\n
\n
person_module = context.getDefaultModule(\'Person\')\n
result = person_module.searchFolder(reference=reference)\n
...
...
@@ -69,13 +71,16 @@ person = result[0]\n
#If any question, we can create directly the credential recovery\n
question_free_text = person.getDefaultCredentialQuestionQuestionFreeText()\n
question_title = person.getDefaultCredentialQuestionQuestionTitle()\n
if not (question_free_text or question_title):\n
\n
if not (question_free_text or question_title) or \\\n
not portal_preferences.isPreferredAskCredentialQuestion():\n
return context.ERP5Site_newCredentialRecovery(reference=reference)\n
\n
return context.Base_redirect(\'ERP5Site_newCredentialRecoveryDialog\', keep_items = \\\n
dict(default_credential_question_question_free_text=question_free_text,\n
default_credential_question_question_title=question_title,\n
reference=reference))\n
return context.Base_redirect(\'ERP5Site_newCredentialRecoveryDialog\', \n
keep_items = \\\n
dict(default_credential_question_question_free_text=question_free_text,\n
default_credential_question_question_title=question_title,\n
reference=reference))\n
</string>
</value>
</item>
<item>
...
...
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialRecovery.xml
View file @
f4c94450
...
...
@@ -63,6 +63,7 @@ def createCredentialRecovery(**kw):\n
credential_recovery.submit()\n
\n
portal = context.getPortalObject()\n
portal_preferences = context.portal_preferences\n
person_module = portal.getDefaultModule(\'Person\')\n
result = person_module.searchFolder(reference=reference)\n
if len(result) != 1:\n
...
...
@@ -86,7 +87,8 @@ if (question_title or question_free_text) and (answer == question_answer):\n
default_credential_question_answer=default_credential_question_answer,\n
destination_decision=person.getRelativeUrl(),\n
language=portal.Localizer.get_selected_language())\n
elif question_free_text is None and question_answer is None:\n
elif (question_free_text is None and question_answer is None) or \\\n
not portal_preferences.isPreferredAskCredentialQuestion():\n
createCredentialRecovery(reference=reference,\n
destination_decision=person.getRelativeUrl(),\n
language=portal.Localizer.get_selected_language())\n
...
...
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialRequest.xml
View file @
f4c94450
...
...
@@ -109,7 +109,6 @@ if portal_preferences.getPreferredCredentialAlarmAutomaticCall():\n
credential_request.submit("Automatic submit")\n
message_str = "Credential Request Created."\n
else:\n
context.log(\'--- %s \' %portal_preferences.isPreferredEmailVerificationCheck())\n
if portal_preferences.isPreferredEmailVerificationCheck():\n
# Send email to subscriber in order to check email\'s address\n
credential_request.activate(activity=\'SQLQueue\').CredentialRequest_sendSubmittedNotification(\n
...
...
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/SystemPreference_viewCredential.xml
View file @
f4c94450
...
...
@@ -81,16 +81,10 @@
<key>
<string>
center
</string>
</key>
<value>
<list>
<string>
my_preferred_credential_request_automatic_approval
</string>
<string>
my_preferred_organisation_credential_update_automatic_approval
</string>
<string>
my_preferred_credential_recovery_automatic_approval
</string>
<string>
my_preferred_person_credential_update_automatic_approval
</string>
<string>
my_preferred_credential_alarm_automatic_call
</string>
<string>
my_preferred_credential_assignment_duration
</string>
<string>
my_preferred_login_and_password_notifier
</string>
<string>
my_preferred_subscription_assignment_category_list
</string>
<string>
my_preferred_credential_contract_document_reference
</string>
<string>
my_preferred_email_verification_check
</string>
</list>
</value>
</item>
...
...
@@ -103,13 +97,22 @@
<item>
<key>
<string>
left
</string>
</key>
<value>
<list/>
<list>
<string>
my_preferred_credential_request_automatic_approval
</string>
<string>
my_preferred_organisation_credential_update_automatic_approval
</string>
<string>
my_preferred_credential_recovery_automatic_approval
</string>
<string>
my_preferred_person_credential_update_automatic_approval
</string>
<string>
my_preferred_credential_alarm_automatic_call
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
<list>
<string>
my_preferred_ask_credential_question
</string>
<string>
my_preferred_email_verification_check
</string>
</list>
</value>
</item>
</dictionary>
...
...
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/SystemPreference_viewCredential/my_preferred_ask_credential_question.xml
0 → 100644
View file @
f4c94450
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_preferred_ask_credential_question
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_checkbox
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Ask Security Question
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_credential/bt/revision
View file @
f4c94450
378
\ No newline at end of file
379
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment