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
Labels
Merge Requests
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
0ecefac6
Commit
0ecefac6
authored
Oct 27, 2016
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_configurator: migrate to ERP5 Login authentication.
parent
67271e05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
bt5/erp5_configurator_standard/TestTemplateItem/portal_components/test.erp5.testStandardConfigurationWorkflow.py
...components/test.erp5.testStandardConfigurationWorkflow.py
+3
-1
product/ERP5Configurator/Document/PersonConfiguratorItem.py
product/ERP5Configurator/Document/PersonConfiguratorItem.py
+6
-2
No files found.
bt5/erp5_configurator_standard/TestTemplateItem/portal_components/test.erp5.testStandardConfigurationWorkflow.py
View file @
0ecefac6
...
...
@@ -225,7 +225,6 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
person
.
getFirstName
())
self
.
assertEqual
(
user_info
[
"field_your_last_name"
],
person
.
getLastName
())
self
.
assertNotEquals
(
person
.
getPassword
(),
None
)
self
.
assertEqual
(
user_info
[
"field_your_function"
],
person
.
getFunction
())
self
.
assertEqual
(
user_info
[
"field_your_default_email_text"
],
...
...
@@ -236,6 +235,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
assignment_list
=
person
.
contentValues
(
portal_type
=
'Assignment'
)
self
.
assertEqual
(
len
(
assignment_list
),
1
)
self
.
assertEqual
(
'my_group'
,
assignment_list
[
0
].
getGroup
())
login_list
=
person
.
contentValues
(
portal_type
=
'ERP5 Login'
)
self
.
assertEqual
(
len
(
login_list
),
1
)
self
.
assertNotEquals
(
login_list
[
0
].
getPassword
(),
None
)
def
stepCheckSocialTitleCategory
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
"""Check that the social title category is configured.
...
...
product/ERP5Configurator/Document/PersonConfiguratorItem.py
View file @
0ecefac6
...
...
@@ -88,7 +88,6 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
'career_function'
:
self
.
getFunction
(),
'last_name'
:
self
.
getLastName
(),
'reference'
:
self
.
getReference
(),
'password'
:
self
.
getPassword
(),
})
assignment
=
person
.
newContent
(
portal_type
=
"Assignment"
,
...
...
@@ -96,6 +95,10 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
group
=
group_id
,
site
=
site_id
)
login
=
person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
self
.
getReference
(),
password
=
self
.
getPassword
())
# Set dates are required to create valid assigments.
now
=
DateTime
()
assignment
.
setStartDate
(
now
)
...
...
@@ -103,9 +106,10 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
# Define valid for 10 years.
assignment
.
setStopDate
(
now
+
(
365
*
10
))
# Validate the Person
and Assigment
# Validate the Person
, Assigment and Login
person
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
))
assignment
.
open
(
comment
=
translateString
(
"Open by Configuration"
))
login
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
))
## add to customer template
business_configuration
=
self
.
getBusinessConfigurationValue
()
...
...
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