Index: lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java 4 Sep 2006 02:51:39 -0000 1.1 @@ -0,0 +1,31 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: CentralConstants.java,v 1.1 2006/09/04 02:51:39 jliew Exp $ */ +package org.lamsfoundation.lams.util; + +public class CentralConstants { + + public static final String MODULE_NAME = "central"; + +} Index: lams_central/src/java/org/lamsfoundation/lams/web/PasswordChangeAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/PasswordChangeAction.java,v diff -u -r1.5 -r1.6 --- lams_central/src/java/org/lamsfoundation/lams/web/PasswordChangeAction.java 24 Aug 2006 23:14:29 -0000 1.5 +++ lams_central/src/java/org/lamsfoundation/lams/web/PasswordChangeAction.java 4 Sep 2006 02:51:39 -0000 1.6 @@ -36,7 +36,9 @@ import org.apache.struts.action.ActionMessages; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.service.UserManagementService; +import org.lamsfoundation.lams.util.CentralConstants; import org.lamsfoundation.lams.util.HashUtil; +import org.lamsfoundation.lams.util.audit.IAuditService; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; @@ -116,6 +118,10 @@ //service.updatePassword(login, HashUtil.sha1(password)); user.setPassword(HashUtil.sha1(password)); service.save(user); + + // make 'password changed' audit log entry + IAuditService auditService = (IAuditService) ctx.getBean("auditService"); + auditService.log(CentralConstants.MODULE_NAME, "Password changed for: "+user.getLogin()+"("+user.getUserId()+")"); } }