=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/spring/AbstractSpringSecurityCurrentUserService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/spring/AbstractSpringSecurityCurrentUserService.java 2010-05-03 13:44:59 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/spring/AbstractSpringSecurityCurrentUserService.java 2011-09-21 18:20:11 +0000 @@ -34,7 +34,6 @@ /** * @author Torgeir Lorange Ostby - * @version $Id: AbstractAcegiCurrentUserService.java 3109 2007-03-19 17:05:21Z torgeilo $ */ public abstract class AbstractSpringSecurityCurrentUserService implements CurrentUserService @@ -48,6 +47,22 @@ return null; } + /* + * If getPrincipal returns a string, it means that the user has been + * authenticated anonymous (String == anonymousUser). + */ + if ( authentication.getPrincipal() instanceof String ) + { + String principal = (String) authentication.getPrincipal(); + + if ( principal.compareTo( "anonymousUser" ) != 0 ) + { + return null; + } + + return principal; + } + UserDetails userDetails = (UserDetails) authentication.getPrincipal(); return userDetails.getUsername(); === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2011-09-21 03:42:11 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2011-09-21 18:20:11 +0000 @@ -14,7 +14,7 @@ */ function referrerBack( defaultUrl ) { if(document.referrer !== undefined && document.referrer != "") { - if(document.referrer.indexOf("login.html") == -1) { + if(document.referrer.indexOf("login.action") == -1) { location.href = document.referrer; return; } === removed file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.html' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.html 2011-09-19 08:08:56 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.html 1970-01-01 00:00:00 +0000 @@ -1,48 +0,0 @@ - - - - DHIS 2 - - - - - - -
-
- -
-
- - - - - - - - - - - - - -
- - -
-
-
-
- - === added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 2011-09-21 18:20:11 +0000 @@ -0,0 +1,48 @@ + + + + DHIS 2 + + + + + + +
+
+ +
+
+ + + + + + + + + + + + + +
+ + +
+
+
+
+ + === removed file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed.html' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed.html 2011-09-19 08:08:56 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed.html 1970-01-01 00:00:00 +0000 @@ -1,47 +0,0 @@ - - - - DHIS 2 - - - - - - -
-
- -
-
- - - - - - - - - - - - - -
- - -
-
-
- Wrong username or password. Please try again. -
- - === added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed.vm 2011-09-21 18:20:11 +0000 @@ -0,0 +1,47 @@ + + + + DHIS 2 + + + + + + +
+
+ +
+
+ + + + + + + + + + + + + +
+ + +
+
+
+ Wrong username or password. Please try again. +
+ + === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2011-09-02 11:50:59 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2011-09-21 18:20:11 +0000 @@ -27,12 +27,12 @@ + login-processing-url="/dhis-web-commons-security/login.action" authentication-failure-url="/dhis-web-commons/security/loginfailed.action" + login-page="/dhis-web-commons/security/login.action" authentication-success-handler-ref="defaultAuthenticationSuccessHandler" /> - + === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2011-09-08 10:38:20 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2011-09-21 18:20:11 +0000 @@ -105,8 +105,22 @@ + + + + + /dhis-web-commons/security/login.vm + plainTextError + + + + /dhis-web-commons/security/loginfailed.vm + plainTextError + + + + - === modified file 'dhis-2/dhis-web/dhis-web-light/pom.xml' --- dhis-2/dhis-web/dhis-web-light/pom.xml 2011-08-28 17:52:59 +0000 +++ dhis-2/dhis-web/dhis-web-light/pom.xml 2011-09-21 18:20:11 +0000 @@ -1,26 +1,25 @@ - 4.0.0 - + org.hisp.dhis dhis-web 2.5-SNAPSHOT - + dhis-web-light war DHIS Web Light - + dhis-web-light - + - + - + org.hisp.dhis dhis-web-commons @@ -38,15 +37,14 @@ org.hisp.dhis dhis-service-core - + - jfree jfreechart - + - + ../../ === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/ProvideContentAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/ProvideContentAction.java 2011-04-07 08:52:20 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/ProvideContentAction.java 2011-09-21 18:20:11 +0000 @@ -22,21 +22,21 @@ // ------------------------------------------------------------------------- private DashboardService dashboardService; - + public void setDashboardService( DashboardService dashboardService ) { this.dashboardService = dashboardService; } - + private DashboardManager dashboardManager; - + public void setDashboardManager( DashboardManager dashboardManager ) { this.dashboardManager = dashboardManager; } private CurrentUserService currentUserService; - + public void setCurrentUserService( CurrentUserService currentUserService ) { this.currentUserService = currentUserService; @@ -47,7 +47,7 @@ // ------------------------------------------------------------------------- private List reportTables; - + public List getReportTables() { return reportTables; @@ -59,7 +59,7 @@ { return documents; } - + private List charts = new ArrayList(); public List getCharts() @@ -78,20 +78,20 @@ for ( int i = 0; i < 8; i++ ) { - String id = config.getAreaItems().get( DashboardManager.CHART_AREA_PREFIX + ( i + 1 ) ); - + String id = config.getAreaItems().get( DashboardManager.CHART_AREA_PREFIX + (i + 1) ); + if ( id != null ) { charts.add( id ); } } - + User user = currentUserService.getCurrentUser(); - + DashboardContent content = dashboardService.getDashboardContent( user ); - + reportTables = content.getReportTables(); - + documents = content.getDocuments(); return SUCCESS; === modified file 'dhis-2/pom.xml' --- dhis-2/pom.xml 2011-09-20 17:29:30 +0000 +++ dhis-2/pom.xml 2011-09-21 18:20:11 +0000 @@ -54,6 +54,12 @@ Dhis2 External Dependencies Repository http://dhis.uio.no/maven/external + + org.springframework.maven.milestone + Spring Maven Milestone Repository + http://maven.springframework.org/milestone + + + + org.springframework.mobile + spring-mobile-device + 1.0.0.M3 + org.apache.struts @@ -453,9 +465,9 @@ net.sf.json-lib json-lib 2.4 - jdk15 + jdk15 - + commons-collections