------------------------------------------------------------
revno: 1715
committer: Tran Chau <tran.hispviet...@gmail.com>
branch nick: trunk
timestamp: Wed 2010-03-31 10:07:10 +0700
message:
  Remove Change Password function into Maintaince > User > Change Password.
removed:
  
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/webapp/dhis-web-maintenance-user/changePassword.vm
modified:
  
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/org/hisp/dhis/user/i18n_module.properties
  
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/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/menu.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== 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 @@
 		</property>
 	</bean>
 
-	<bean id="org.hisp.dhis.user.action.ChangePasswordAction" class="org.hisp.dhis.user.action.ChangePasswordAction"
-		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
-		</property>
-		<property name="currentUserService">
-			<ref bean="org.hisp.dhis.user.CurrentUserService" />
-		</property>
-		<property name="passwordManager">
-			<ref bean="org.hisp.dhis.security.PasswordManager" />
-		</property>
-	</bean>
-
 	<bean id="org.hisp.dhis.user.action.GetUserAction" class="org.hisp.dhis.user.action.GetUserAction"
 		scope="prototype">
 		<property name="userStore">

=== 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 @@
       <param name="menu">/dhis-web-maintenance-user/menu.vm</param>
     </action>
 
-    <action name="changePassword" class="org.hisp.dhis.user.action.ChangePasswordAction">
-      <result name="input" type="velocity">/main.vm</result>
-      <param name="page">/dhis-web-maintenance-user/changePassword.vm</param>  
-      <param name="menu">/dhis-web-maintenance-user/orgunitMenu.vm</param>
-      <param name="javascripts">
-      ,../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</param>
-      <result name="success" type="redirect">changePassword.action</result>      
-    </action>
-    
      <action name="user" class="org.hisp.dhis.user.action.GetOrgunitUserListAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-maintenance-user/user.vm</param>  

=== 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 @@
-<script>
-
-//-----------------------------------------------------------------------
-//init jQuery validation for changePassword
-//-----------------------------------------------------------------------
-	jQuery(document).ready(
-			function()
-			{
-				jQuery("#changePassword").validate({
-					 meta:"validate"
-					,errorElement:"td"
-					,submitHandler: function(form)
-									{
-										validateAddUser();
-									}
-				});
-				jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
-				jQuery("#password").focus();
-			}
-	);
-
-</script>
-<input type="hidden" id="curLocaleCode" value="$locale.getLanguage()_$locale.getCountry()"/>
-<h3>$i18n.getString( "change_password" )</h3>
-
-<form id="changePassword" action="changePassword.action" method="post" onsubmit="return validateAddUser()">
-
-<table>
-	<tr>
-		<th colspan="2">&nbsp;</th>
-	</tr>
-	<tr>
-		<td><label for="username">$i18n.getString( "username" )</label></td>
-		<td><input type="text" id="username" value="$encoder.htmlEncode( $username )" style="width:20em" disabled="disabled"></td>	
-	</tr>
-	<tr>
-		<td><label for="rawPassword">$i18n.getString( "password" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td><input type="password" id="rawPassword" name="rawPassword" style="width:20em" maxlength="50" class="{validate:{required:true,minlength:5,maxlength:50,notequalto:'#username'}}"></td>		
-	</tr>
-	<tr>
-		<td><label for="retypePassword">$i18n.getString( "retype_password" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td><input type="password" id="retypePassword" name="retypePassword" style="width:20em" maxlength="50"  class="{validate:{required:true,minlength:5,maxlength:50,equalTo:'#rawPassword'}}"></td>	
-	</tr>
-	
-	<tr>
-		<td colspan="4" height="10">
-			<span id="message"></span>
-		</td>
-	</tr>
-	<tr>
-		<td></td>
-		<td valign="top"><input type="submit" value="$i18n.getString( "change" )" style="width:10em"><input type="button" value="$i18n.getString( "cancel" )" onclick="window.location.href='user.action'" style="width:10em"></td>	
-	</tr>
-</table>
-
-</form>
-
-<span id="message"></span>
-
-<script type="text/javascript">
-
-	selectionTree.buildSelectionTree();
-	
-	var usernameField = document.getElementById( 'username' );
-	usernameField.select();
-	usernameField.focus();
-	
-</script>

=== 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" )
 </ul>

=== 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 @@
 	<li><a href="alluser.action" title="$i18n.getString( "user" )">$i18n.getString( "user" )&nbsp;</a></li>
 	<li><a href="user.action" title="$i18n.getString( "user_by_orgunit" )">$i18n.getString( "user_by_orgunit" )&nbsp;</a></li>
 	<li><a href="allRole.action" title="$i18n.getString( "user_role" )">$i18n.getString( "user_role" )&nbsp;</a></li>
-	<li><a href="changePassword.action" title="$i18n.getString( "change_password" )">$i18n.getString( "change_password" )&nbsp;</a></li>	
 </ul>
\ No newline at end of file

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to