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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
47434336
Commit
47434336
authored
Jan 10, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: project needed when create person/compute node
parent
397d9598
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
10 deletions
+24
-10
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSAuthenticationPolicy.py
...al_components/test.erp5.testSlapOSAuthenticationPolicy.py
+24
-10
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSAuthenticationPolicy.py
View file @
47434336
...
...
@@ -99,7 +99,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
self
.
assertTrue
(
login
.
isLoginBlocked
())
def
test_block_ERP5Login_without_password_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
=
self
.
makePerson
(
self
.
addProject
(),
user
=
0
)
person
.
edit
(
first_name
=
"SOMENAME"
,
last_name
=
"LASTNAME"
...
...
@@ -109,7 +109,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
login_portal_type
=
"ERP5 Login"
)
def
test_block_CertificateLogin_without_password_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
=
self
.
makePerson
(
self
.
addProject
(),
user
=
0
)
person
.
edit
(
first_name
=
"SOMENAME"
,
last_name
=
"LASTNAME"
...
...
@@ -121,7 +121,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
def
test_block_CertificateLogin_without_password_on_compute_node
(
self
):
self
.
_test_login_donot_block
(
document
=
self
.
_makeComputeNode
()[
0
],
document
=
self
.
_makeComputeNode
(
self
.
addProject
()
)[
0
],
login_portal_type
=
"Certificate Login"
)
def
test_block_CertificateLogin_without_password_on_software_instance
(
self
):
...
...
@@ -130,7 +130,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
login_portal_type
=
"Certificate Login"
)
def
test_block_GoogleLogin_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
=
self
.
makePerson
(
self
.
addProject
(),
user
=
0
)
person
.
edit
(
first_name
=
"SOMENAME"
,
last_name
=
"LASTNAME"
...
...
@@ -141,7 +141,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
)
def
test_block_FacebookLogin_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
=
self
.
makePerson
(
self
.
addProject
(),
user
=
0
)
person
.
edit
(
first_name
=
"SOMENAME"
,
last_name
=
"LASTNAME"
...
...
@@ -203,7 +203,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
self
.
assertFalse
(
login
.
isPasswordExpired
())
def
test_expire_ERP5Login_without_password_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
=
self
.
makePerson
(
self
.
addProject
(),
user
=
0
)
person
.
edit
(
first_name
=
"SOMENAME"
,
last_name
=
"LASTNAME"
...
...
@@ -212,8 +212,22 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
document
=
person
,
login_portal_type
=
"ERP5 Login"
)
<<<<<<<
HEAD
=======
def
test_expire_ERP5Login_without_password_on_compute_node
(
self
):
self
.
_test_expire_when_passoword_is_set
(
document
=
self
.
_makeComputeNode
(
self
.
addProject
())[
0
],
login_portal_type
=
"ERP5 Login"
)
def
test_expire_ERP5Login_without_password_on_software_instance
(
self
):
self
.
_test_expire_when_passoword_is_set
(
document
=
self
.
_makeDummySoftwareInstance
(),
login_portal_type
=
"ERP5 Login"
)
>>>>>>>
df93206e7
(
slapos_erp5
:
project
needed
when
create
person
/
compute
node
)
def
test_expire_CertificateLogin_without_password_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
=
self
.
makePerson
(
self
.
addProject
(),
user
=
0
)
person
.
edit
(
first_name
=
"SOMENAME"
,
last_name
=
"LASTNAME"
...
...
@@ -225,7 +239,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
def
test_expire_CertificateLogin_without_password_on_compute_node
(
self
):
self
.
_test_dont_expire_when_password_isnt_set
(
document
=
self
.
_makeComputeNode
()[
0
],
document
=
self
.
_makeComputeNode
(
self
.
addProject
()
)[
0
],
login_portal_type
=
"Certificate Login"
)
def
test_expire_CertificateLogin_without_password_on_software_instance
(
self
):
...
...
@@ -234,7 +248,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
login_portal_type
=
"Certificate Login"
)
def
test_expire_GoogleLogin_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
=
self
.
makePerson
(
self
.
addProject
(),
user
=
0
)
person
.
edit
(
first_name
=
"SOMENAME"
,
last_name
=
"LASTNAME"
...
...
@@ -245,7 +259,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
)
def
test_expire_FacebookLogin_on_person
(
self
):
person
=
self
.
makePerson
(
user
=
0
)
person
=
self
.
makePerson
(
self
.
addProject
(),
user
=
0
)
person
.
edit
(
first_name
=
"SOMENAME"
,
last_name
=
"LASTNAME"
...
...
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