[
https://jira.jboss.org/jira/browse/GTNPORTAL-306?page=com.atlassian.jira....
]
Thomas Heute resolved GTNPORTAL-306.
------------------------------------
Resolution: Done
I modified the testcase:
Index: component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java
===================================================================
---
component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java (revision
817)
+++
component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java (working
copy)
@@ -83,19 +83,19 @@
}
}
- public void testFindUserByUserName() throws Exception
+ public void testChangePassword() throws Exception
{
UserHandler uHandler = organizationService.getUserHandler();
User user = uHandler.findUserByName("root");
assertNotNull(user);
- assertEquals("gtn", user.getPassword());
+ assertTrue(uHandler.authenticate("root", "gtn"));
// Test changing password
user.setPassword("newPassword");
uHandler.saveUser(user, false);
user = uHandler.findUserByName("root");
assertNotNull(user);
- assertEquals("newPassword", user.getPassword());
+ assertTrue(uHandler.authenticate("root", "newPassword"));
// Reset to default password
user.setPassword("gtn");
As Bolek said user.getPassword() would not necessarily be able to return a password in
clear and shouldn't be used.
I fix the place where it was used to change current password, I will put a workaround the
password reminder, and add a Jira to rework on it for CR01.
Thanks
The User Handler implementation returns a User with a password
"null"
---------------------------------------------------------------------
Key: GTNPORTAL-306
URL:
https://jira.jboss.org/jira/browse/GTNPORTAL-306
Project: GateIn Portal
Issue Type: Bug
Components: Identity integration
Affects Versions: 3.0.0-Beta02
Reporter: Trong Tran
Assignee: Boleslaw Dawidowicz
Fix For: 3.0.0-Beta03
Attachments: testcase.diff
the unit test is in attached file testcase.diff
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira