Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
28f07df3
Commit
28f07df3
authored
Oct 21, 2016
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_base: create ERP5 Login in create_user_action transition.
parent
c22289cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/user_account_workflow/scripts/UserAccountWorkflow_createUser.py
...ccount_workflow/scripts/UserAccountWorkflow_createUser.py
+4
-1
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/user_account_workflow/transitions/create_user_action.xml
.../user_account_workflow/transitions/create_user_action.xml
+1
-1
product/ERP5/tests/testERP5Base.py
product/ERP5/tests/testERP5Base.py
+6
-3
No files found.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/user_account_workflow/scripts/UserAccountWorkflow_createUser.py
View file @
28f07df3
kwargs
=
state_change
[
'kwargs'
]
person
=
state_change
[
'object'
]
person
.
edit
(
password
=
kwargs
[
'password'
],
reference
=
kwargs
[
'reference'
])
person
.
newContent
(
portal_type
=
'ERP5 Login'
,
password
=
kwargs
[
'password'
],
reference
=
kwargs
[
'reference'
]).
validate
()
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/user_account_workflow/transitions/create_user_action.xml
View file @
28f07df3
...
...
@@ -88,7 +88,7 @@
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
python:not here.getReference()
</string>
</value>
<value>
<string>
here/hasReference
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
product/ERP5/tests/testERP5Base.py
View file @
28f07df3
...
...
@@ -1155,7 +1155,10 @@ class TestERP5Base(ERP5TypeTestCase):
self
.
assertTrue
(
comment
in
[
q
[
'comment'
]
for
q
in
workflow_history
])
def
test_user_creation
(
self
):
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
)
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
'user'
,
)
assignment
=
person
.
newContent
(
portal_type
=
'Assignment'
,
group
=
'nexedi'
)
self
.
assertNotEquals
(
None
,
assignment
.
getGroupValue
())
...
...
@@ -1167,14 +1170,14 @@ class TestERP5Base(ERP5TypeTestCase):
self
.
tic
()
# a user is created
user
=
self
.
portal
.
acl_users
.
getUserById
(
'user
_login
'
)
user
=
self
.
portal
.
acl_users
.
getUserById
(
'user'
)
self
.
assertNotEquals
(
None
,
user
)
# and this user has a preference created
newSecurityManager
(
None
,
user
.
__of__
(
self
.
portal
.
acl_users
))
self
.
assertNotEquals
(
None
,
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Preference'
,
owner
=
'user
_login
'
))
owner
=
'user'
))
# for his assignent group
self
.
assertEqual
(
'group/nexedi'
,
self
.
portal
.
portal_preferences
.
getPreferredSectionCategory
())
...
...
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