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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aurélien Vermylen
erp5
Commits
d5442e7d
Commit
d5442e7d
authored
Dec 02, 2015
by
Kazuhiko Shiozaki
Committed by
Cédric Le Ninivin
Jan 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core, erp5_base : move change password action and form from erp5_core to erp5_base.
parent
73e08c0b
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
99 additions
and
12 deletions
+99
-12
bt5/erp5_base/ActionTemplateItem/portal_types/Preference/change_password.xml
...nTemplateItem/portal_types/Preference/change_password.xml
+0
-0
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getValidatedLoginReferenceList.xml
...l_skins/erp5_base/Base_getValidatedLoginReferenceList.xml
+80
-0
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PreferenceTool_setNewPassword.xml
.../portal_skins/erp5_base/PreferenceTool_setNewPassword.xml
+7
-5
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PreferenceTool_viewChangePasswordDialog.xml
...ins/erp5_base/PreferenceTool_viewChangePasswordDialog.xml
+1
-1
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PreferenceTool_viewChangePasswordDialog/password_confirm.xml
...ferenceTool_viewChangePasswordDialog/password_confirm.xml
+0
-0
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PreferenceTool_viewChangePasswordDialog/your_current_password.xml
...ceTool_viewChangePasswordDialog/your_current_password.xml
+0
-0
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PreferenceTool_viewChangePasswordDialog/your_new_password.xml
...erenceTool_viewChangePasswordDialog/your_new_password.xml
+0
-0
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PreferenceTool_viewChangePasswordDialog/your_reference.xml
...referenceTool_viewChangePasswordDialog/your_reference.xml
+10
-2
bt5/erp5_base/bt/template_action_path_list
bt5/erp5_base/bt/template_action_path_list
+1
-0
product/ERP5/bootstrap/erp5_core/bt/template_action_path_list
...uct/ERP5/bootstrap/erp5_core/bt/template_action_path_list
+0
-4
No files found.
product/ERP5/bootstrap/erp5_cor
e/ActionTemplateItem/portal_types/Preference/change_password.xml
→
bt5/erp5_bas
e/ActionTemplateItem/portal_types/Preference/change_password.xml
View file @
d5442e7d
File moved
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getValidatedLoginReferenceList.xml
0 → 100644
View file @
d5442e7d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</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>
person = context.ERP5Site_getAuthenticatedMemberPersonValue()\n
if person is None:\n
return []\n
else:\n
return [x.getReference() for x in person.objectValues(portal_type=portal_type) \\\n
if x.getValidationState() == \'validated\']\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
portal_type=\'ERP5 Login\'
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getValidatedLoginReferenceList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_cor
e/PreferenceTool_setNewPassword.xml
→
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_bas
e/PreferenceTool_setNewPassword.xml
View file @
d5442e7d
...
@@ -56,11 +56,13 @@ from Products.ERP5Type.Message import translateString\n
...
@@ -56,11 +56,13 @@ from Products.ERP5Type.Message import translateString\n
portal = context.getPortalObject()\n
portal = context.getPortalObject()\n
user = getSecurityManager().getUser()\n
user = getSecurityManager().getUser()\n
person = context.acl_users.erp5_users.getPersonByReference(user.getId())\n
person = context.acl_users.erp5_users.getPersonByReference(user.getId())\n
login = portal.restrictedTraverse(login)\n
for login in person.objectValues(portal_type=\'ERP5 Login\'):\n
if login.getParentValue() != person:\n
if login.getReference() == reference and login.getValidationState() == \'validated\':\n
msg = translateString(\'You can change your own password only.\')\n
break\n
else:\n
msg = translateString(\'You cannot change the password for %r.\' % reference)\n
return context.Base_redirect(dialog_id, keep_items=dict(portal_status_message=msg))\n
return context.Base_redirect(dialog_id, keep_items=dict(portal_status_message=msg))\n
el
if not login.checkPassword(current_password):\n
if not login.checkPassword(current_password):\n
msg = translateString("Current password is wrong.")\n
msg = translateString("Current password is wrong.")\n
return context.Base_redirect(dialog_id, keep_items=dict(portal_status_message=msg))\n
return context.Base_redirect(dialog_id, keep_items=dict(portal_status_message=msg))\n
\n
\n
...
@@ -72,7 +74,7 @@ return portal.Base_redirect(\'logout\')\n
...
@@ -72,7 +74,7 @@ return portal.Base_redirect(\'logout\')\n
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
new_password, current_password,
login
, dialog_id=\'view\', **kw
</string>
</value>
<value>
<string>
new_password, current_password,
reference
, dialog_id=\'view\', **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_cor
e/PreferenceTool_viewChangePasswordDialog.xml
→
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_bas
e/PreferenceTool_viewChangePasswordDialog.xml
View file @
d5442e7d
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
<key>
<string>
left
</string>
</key>
<key>
<string>
left
</string>
</key>
<value>
<value>
<list>
<list>
<string>
your_
login
</string>
<string>
your_
reference
</string>
<string>
your_current_password
</string>
<string>
your_current_password
</string>
<string>
your_new_password
</string>
<string>
your_new_password
</string>
<string>
password_confirm
</string>
<string>
password_confirm
</string>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_cor
e/PreferenceTool_viewChangePasswordDialog/password_confirm.xml
→
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_bas
e/PreferenceTool_viewChangePasswordDialog/password_confirm.xml
View file @
d5442e7d
File moved
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_cor
e/PreferenceTool_viewChangePasswordDialog/your_current_password.xml
→
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_bas
e/PreferenceTool_viewChangePasswordDialog/your_current_password.xml
View file @
d5442e7d
File moved
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_cor
e/PreferenceTool_viewChangePasswordDialog/your_new_password.xml
→
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_bas
e/PreferenceTool_viewChangePasswordDialog/your_new_password.xml
View file @
d5442e7d
File moved
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/PreferenceTool_viewChangePasswordDialog/your_login
.xml
→
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/PreferenceTool_viewChangePasswordDialog/your_reference
.xml
View file @
d5442e7d
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_
login
</string>
</value>
<value>
<string>
your_
reference
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
message_values
</string>
</key>
<key>
<string>
message_values
</string>
</key>
...
@@ -68,10 +68,18 @@
...
@@ -68,10 +68,18 @@
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<item>
<key>
<string>
target
</string>
</key>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
</item>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</dictionary>
</value>
</value>
</item>
</item>
...
@@ -119,7 +127,7 @@
...
@@ -119,7 +127,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
here/Base_getValidatedLoginItemList
</string>
</value>
<value>
<string>
python: [(x, x) for x in here.Base_getValidatedLoginReferenceList()]
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_base/bt/template_action_path_list
View file @
d5442e7d
...
@@ -80,6 +80,7 @@ Person | person_detailed_report
...
@@ -80,6 +80,7 @@ Person | person_detailed_report
Person | terminate_career
Person | terminate_career
Person | view
Person | view
Preference | base_preference
Preference | base_preference
Preference | change_password
Previous Causality Movement Group | view
Previous Causality Movement Group | view
Property Assignment Movement Group | view
Property Assignment Movement Group | view
Property Grouping Movement Group | view
Property Grouping Movement Group | view
...
...
product/ERP5/bootstrap/erp5_core/bt/template_action_path_list
View file @
d5442e7d
...
@@ -23,7 +23,6 @@ Attribute Unicity Constraint | view
...
@@ -23,7 +23,6 @@ Attribute Unicity Constraint | view
Base Category | view
Base Category | view
Base Domain | view
Base Domain | view
Base Type | action_view
Base Type | action_view
Base Type | jump_property_sheets
Base Type | role_view
Base Type | role_view
Base Type | translation_view
Base Type | translation_view
Base Type | update_local_roles
Base Type | update_local_roles
...
@@ -80,17 +79,14 @@ Id Tool | view
...
@@ -80,17 +79,14 @@ Id Tool | view
Memcached Plugin | view
Memcached Plugin | view
Memcached Tool | view
Memcached Tool | view
Predicate | view
Predicate | view
Preference Tool Type | jump_property_sheets
Preference Tool Type | view
Preference Tool Type | view
Preference Tool | advanced
Preference Tool | advanced
Preference Tool | view
Preference Tool | view
Preference Type | action_view
Preference Type | action_view
Preference Type | jump_property_sheets
Preference Type | role_view
Preference Type | role_view
Preference Type | translation_view
Preference Type | translation_view
Preference Type | update_local_roles
Preference Type | update_local_roles
Preference Type | view
Preference Type | view
Preference | change_password
Preference | html_style_preferences
Preference | html_style_preferences
Preference | view
Preference | view
Preference | view_template
Preference | view_template
...
...
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