History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: APF-682
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Matt Raible
Reporter: Hiugong Gwok
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
AppFuse

BaseControllerTestCase hard-coded username "tomcat"

Created: 07/Mar/07 11:42 AM   Updated: 07/Mar/07 02:12 PM
Component/s: Build, Test, or Deploy Process
Affects Version/s: 2.0-M4
Fix Version/s: 2.0-M4


 Description  « Hide
org.appfuse.webapp.controller.BaseControllerTestCase has username "tomcat" hard-coded, so when user modified the default username in sample-data.xml, this issue might cause test failed.

 All   Comments   Change History   FishEye      Sort Order:
Matt Raible - 07/Mar/07 01:16 PM
Do you see any issues with removing the population of the protected "user" object altogether? This is left over from pre-Acegi days and pre "good security" as well - where we looked in the session for the user rather than using request.getRemoteUser().

Matt Raible - 07/Mar/07 02:12 PM
I removed "user" in the Base*TestCase classes. Note that the following still exists in Tapestry's BasePageTestCase:

MockHttpServletRequest request = new MockHttpServletRequest();
request.setRemoteUser("tomcat");

We should probably change "tomcat/tomcat" to "user/user" and "mraible/tomcat" to be "admin/admin" - I think that would be more acceptable by users.