=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ChangePasswordAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ChangePasswordAction.java 2009-08-20 08:17:49 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ChangePasswordAction.java 1970-01-01 00:00:00 +0000 @@ -1,141 +0,0 @@ -package org.hisp.dhis.user.action; - -/* - * Copyright (c) 2004-2007, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import org.hisp.dhis.security.PasswordManager; -import org.hisp.dhis.user.CurrentUserService; -import org.hisp.dhis.user.User; -import org.hisp.dhis.user.UserCredentials; -import org.hisp.dhis.user.UserStore; - -import com.opensymphony.xwork2.Action; - -public class ChangePasswordAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private UserStore userStore; - - private PasswordManager passwordManager; - - private CurrentUserService currentUserService; - - // ------------------------------------------------------------------------- - // Input & Output - // ------------------------------------------------------------------------- - - private String username; - - private String rawPassword; - - private String retypePassword; - - // ------------------------------------------------------------------------- - // Getter & Setter - // ------------------------------------------------------------------------- - - public void setUserStore( UserStore userStore ) - { - this.userStore = userStore; - } - - public void setPasswordManager( PasswordManager passwordManager ) - { - this.passwordManager = passwordManager; - } - - public void setUsername( String username ) - { - this.username = username; - } - - public String getUsername() - { - return username; - } - - public void setCurrentUserService( CurrentUserService currentUserService ) - { - this.currentUserService = currentUserService; - } - - public void setRawPassword( String rawPassword ) - { - this.rawPassword = rawPassword; - } - - public void setRetypePassword( String retypePassword ) - { - this.retypePassword = retypePassword; - } - - // ------------------------------------------------------------------------- - // Implement Method - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - User user = userStore.getUser( currentUserService.getCurrentUser().getId() ); - - UserCredentials userCredentials = userStore.getUserCredentials( user ); - - username = userCredentials.getUsername(); - - if ( rawPassword == null || retypePassword == null ) - { - - return INPUT; - } - - rawPassword = rawPassword.trim(); - retypePassword = retypePassword.trim(); - - if ( rawPassword.length() == 0 || retypePassword.length() == 0 ) - { - - return INPUT; - } - if ( !rawPassword.equals( retypePassword ) ) - { - - return INPUT; - } - - userCredentials.setPassword( passwordManager.encodePassword( userCredentials.getUsername(), rawPassword ) ); - - userStore.updateUserCredentials( userCredentials ); - - userStore.updateUser( user ); - - return SUCCESS; - } -} \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/META-INF/dhis/beans.xml 2010-02-25 03:10:07 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/META-INF/dhis/beans.xml 2010-03-31 03:07:10 +0000 @@ -25,19 +25,6 @@ - - - - - - - - - - - - === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties 2010-03-08 04:35:44 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties 2010-03-31 03:07:10 +0000 @@ -180,7 +180,6 @@ saving_role_failed = Saving role failed adding_user_failed = Adding user failed saving_user_failed = Saving user failed -change_password = Change password members = Members data_sets = Datasets reports = Reports === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml 2010-02-25 03:10:07 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml 2010-03-31 03:07:10 +0000 @@ -17,16 +17,6 @@ /dhis-web-maintenance-user/menu.vm - - /main.vm - /dhis-web-maintenance-user/changePassword.vm - /dhis-web-maintenance-user/orgunitMenu.vm - - ,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js - ,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js - changePassword.action - - /main.vm /dhis-web-maintenance-user/user.vm === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/changePassword.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/changePassword.vm 2010-02-09 09:10:29 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/changePassword.vm 1970-01-01 00:00:00 +0000 @@ -1,68 +0,0 @@ - - -

$i18n.getString( "change_password" )

- -
- - - - - - - - - - - - - - - - - - - - - - - - - -
 
- -
- -
- - - - === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm 2009-11-03 11:04:45 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm 2010-03-31 03:07:10 +0000 @@ -5,5 +5,4 @@ #introListItem( "alluser.action" "user" ) #introListItem( "user.action" "user_by_orgunit" ) #introListItem( "allRole.action" "user_role" ) - #introListItem( "changePassword.action" "change_password" ) === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/menu.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/menu.vm 2009-03-03 16:46:36 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/menu.vm 2010-03-31 03:07:10 +0000 @@ -3,5 +3,4 @@
  • $i18n.getString( "user" ) 
  • $i18n.getString( "user_by_orgunit" ) 
  • $i18n.getString( "user_role" ) 
  • -
  • $i18n.getString( "change_password" ) 
  • \ No newline at end of file