Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Ivan Tyagov
slapos.core
Commits
d68a7d7a
Commit
d68a7d7a
authored
Feb 09, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: ERP5 Login works as default implementation
There is no more patch
parent
133dc9ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
24 deletions
+3
-24
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSAuthenticationPolicy.py
...al_components/test.erp5.testSlapOSAuthenticationPolicy.py
+3
-24
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSAuthenticationPolicy.py
View file @
d68a7d7a
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
##############################################################################
##############################################################################
from
erp5.component.test.SlapOSTestCaseMixin
import
SlapOSTestCaseMixin
from
erp5.component.test.SlapOSTestCaseMixin
import
SlapOSTestCaseMixin
class
TestSlapOSAuthenticationPolicyL
(
SlapOSTestCaseMixin
):
class
TestSlapOSAuthenticationPolicyL
(
SlapOSTestCaseMixin
):
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
...
@@ -44,9 +43,9 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
...
@@ -44,9 +43,9 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
def
_getPasswordEventList
(
self
,
login
):
def
_getPasswordEventList
(
self
,
login
):
return
[
x
.
getObject
()
for
x
in
self
.
portal
.
portal_catalog
(
return
[
x
.
getObject
()
for
x
in
self
.
portal
.
portal_catalog
(
portal_type
=
'Password Event'
,
portal_type
=
'Password Event'
,
default_destination_uid
=
login
.
getUid
(),
default_destination_uid
=
login
.
getUid
(),
sort_on
=
((
'creation_date'
,
'DESC'
,),))]
sort_on
=
((
'creation_date'
,
'DESC'
,),))]
def
_notifyLoginFailureAboveMaximum
(
self
,
login
):
def
_notifyLoginFailureAboveMaximum
(
self
,
login
):
login
.
notifyLoginFailure
()
login
.
notifyLoginFailure
()
...
@@ -98,16 +97,6 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
...
@@ -98,16 +97,6 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
login
=
self
.
_test
(
document
,
login_portal_type
)
login
=
self
.
_test
(
document
,
login_portal_type
)
self
.
assertTrue
(
login
.
isLoginBlocked
())
self
.
assertTrue
(
login
.
isLoginBlocked
())
def
test_block_ERP5Login_without_password_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
.
edit
(
first_name
=
"SOMENAME"
,
last_name
=
"LASTNAME"
)
self
.
_test_login_block_if_password_is_set
(
document
=
person
,
login_portal_type
=
"ERP5 Login"
)
def
test_block_CertificateLogin_without_password_on_person
(
self
):
def
test_block_CertificateLogin_without_password_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
=
self
.
makePerson
(
user
=
0
)
person
.
edit
(
person
.
edit
(
...
@@ -202,16 +191,6 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
...
@@ -202,16 +191,6 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
self
.
_clearCache
()
self
.
_clearCache
()
self
.
assertFalse
(
login
.
isPasswordExpired
())
self
.
assertFalse
(
login
.
isPasswordExpired
())
def
test_expire_ERP5Login_without_password_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
.
edit
(
first_name
=
"SOMENAME"
,
last_name
=
"LASTNAME"
)
self
.
_test_expire_when_passoword_is_set
(
document
=
person
,
login_portal_type
=
"ERP5 Login"
)
def
test_expire_CertificateLogin_without_password_on_person
(
self
):
def
test_expire_CertificateLogin_without_password_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
=
self
.
makePerson
(
user
=
0
)
person
.
edit
(
person
.
edit
(
...
...
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