Commit d68a7d7a authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: ERP5 Login works as default implementation

   There is no more patch
parent 133dc9ab
...@@ -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(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment