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
Klaus Wölfel
erp5
Commits
f68df8ce
Commit
f68df8ce
authored
Oct 27, 2016
by
Kazuhiko Shiozaki
Committed by
Vincent Pelletier
Dec 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_configurator: migrate to ERP5 Login authentication.
parent
c194772a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
bt5/erp5_configurator_standard/TestTemplateItem/portal_components/test.erp5.testStandardConfigurationWorkflow.py
...components/test.erp5.testStandardConfigurationWorkflow.py
+9
-6
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 @
f68df8ce
...
@@ -225,7 +225,6 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -225,7 +225,6 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
person
.
getFirstName
())
person
.
getFirstName
())
self
.
assertEqual
(
user_info
[
"field_your_last_name"
],
self
.
assertEqual
(
user_info
[
"field_your_last_name"
],
person
.
getLastName
())
person
.
getLastName
())
self
.
assertNotEquals
(
person
.
getPassword
(),
None
)
self
.
assertEqual
(
user_info
[
"field_your_function"
],
self
.
assertEqual
(
user_info
[
"field_your_function"
],
person
.
getFunction
())
person
.
getFunction
())
self
.
assertEqual
(
user_info
[
"field_your_default_email_text"
],
self
.
assertEqual
(
user_info
[
"field_your_default_email_text"
],
...
@@ -236,6 +235,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -236,6 +235,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
assignment_list
=
person
.
contentValues
(
portal_type
=
'Assignment'
)
assignment_list
=
person
.
contentValues
(
portal_type
=
'Assignment'
)
self
.
assertEqual
(
len
(
assignment_list
),
1
)
self
.
assertEqual
(
len
(
assignment_list
),
1
)
self
.
assertEqual
(
'my_group'
,
assignment_list
[
0
].
getGroup
())
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
):
def
stepCheckSocialTitleCategory
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
"""Check that the social title category is configured.
"""Check that the social title category is configured.
...
@@ -406,18 +408,18 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -406,18 +408,18 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
def
stepCheckEventResourceItemList
(
self
,
sequence
=
None
,
sequence_list
=
None
):
def
stepCheckEventResourceItemList
(
self
,
sequence
=
None
,
sequence_list
=
None
):
self
.
assertTrue
(
self
.
all_username_list
)
self
.
assertTrue
(
self
.
all_username_list
)
for
user
name
in
self
.
all_username_list
:
for
user
_id
in
self
.
_getUserIdList
(
self
.
all_username_list
)
:
for
event_type
in
(
'Visit'
,
'Web Message'
,
'Letter'
,
'Note'
,
for
event_type
in
(
'Visit'
,
'Web Message'
,
'Letter'
,
'Note'
,
'Phone Call'
,
'Mail Message'
,
'Fax Message'
):
'Phone Call'
,
'Mail Message'
,
'Fax Message'
):
self
.
_loginAsUser
(
user
name
)
self
.
_loginAsUser
(
user
_id
)
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
event_type
)
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
event_type
)
self
.
assertTrue
((
'Complaint'
,
'service_module/event_complaint'
)
self
.
assertTrue
((
'Complaint'
,
'service_module/event_complaint'
)
in
event
.
Event_getResourceItemList
())
in
event
.
Event_getResourceItemList
())
def
stepCheckTicketResourceItemList
(
self
,
sequence
=
None
,
sequence_list
=
None
):
def
stepCheckTicketResourceItemList
(
self
,
sequence
=
None
,
sequence_list
=
None
):
self
.
assertTrue
(
self
.
all_username_list
)
self
.
assertTrue
(
self
.
all_username_list
)
for
user
name
in
self
.
all_username_list
:
for
user
_id
in
self
.
_getUserIdList
(
self
.
all_username_list
)
:
self
.
_loginAsUser
(
user
name
)
self
.
_loginAsUser
(
user
_id
)
ticket
=
self
.
portal
.
support_request_module
.
newContent
(
ticket
=
self
.
portal
.
support_request_module
.
newContent
(
portal_type
=
'Support Request'
)
portal_type
=
'Support Request'
)
self
.
assertTrue
((
'Financial Support'
,
'service_module/support_financial'
)
self
.
assertTrue
((
'Financial Support'
,
'service_module/support_financial'
)
...
@@ -1000,7 +1002,8 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -1000,7 +1002,8 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
# stepPlanSaleOrders
# stepPlanSaleOrders
self
.
assertEqual
(
order
.
getSimulationState
(),
'draft'
)
self
.
assertEqual
(
order
.
getSimulationState
(),
'draft'
)
self
.
_loginAsUser
(
self
.
sales_manager_reference
)
sales_manager_id
,
=
self
.
_getUserIdList
([
self
.
sales_manager_reference
])
self
.
_loginAsUser
(
sales_manager_id
)
self
.
portal
.
portal_workflow
.
doActionFor
(
order
,
'plan_action'
)
self
.
portal
.
portal_workflow
.
doActionFor
(
order
,
'plan_action'
)
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
order
.
getSimulationState
(),
'planned'
)
self
.
assertEqual
(
order
.
getSimulationState
(),
'planned'
)
...
...
product/ERP5Configurator/Document/PersonConfiguratorItem.py
View file @
f68df8ce
...
@@ -87,7 +87,6 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
...
@@ -87,7 +87,6 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
'career_function'
:
self
.
getFunction
(),
'career_function'
:
self
.
getFunction
(),
'last_name'
:
self
.
getLastName
(),
'last_name'
:
self
.
getLastName
(),
'reference'
:
self
.
getReference
(),
'reference'
:
self
.
getReference
(),
'password'
:
self
.
getPassword
(),
})
})
assignment
=
person
.
newContent
(
portal_type
=
"Assignment"
,
assignment
=
person
.
newContent
(
portal_type
=
"Assignment"
,
...
@@ -95,6 +94,10 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
...
@@ -95,6 +94,10 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
group
=
group_id
,
group
=
group_id
,
site
=
site_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.
# Set dates are required to create valid assigments.
now
=
DateTime
()
now
=
DateTime
()
assignment
.
setStartDate
(
now
)
assignment
.
setStartDate
(
now
)
...
@@ -102,9 +105,10 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
...
@@ -102,9 +105,10 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
# Define valid for 10 years.
# Define valid for 10 years.
assignment
.
setStopDate
(
now
+
(
365
*
10
))
assignment
.
setStopDate
(
now
+
(
365
*
10
))
# Validate the Person
and Assigment
# Validate the Person
, Assigment and Login
person
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
))
person
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
))
assignment
.
open
(
comment
=
translateString
(
"Open by Configuration"
))
assignment
.
open
(
comment
=
translateString
(
"Open by Configuration"
))
login
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
))
## add to customer template
## add to customer template
business_configuration
=
self
.
getBusinessConfigurationValue
()
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