svnno****@sourc*****
svnno****@sourc*****
2007年 11月 8日 (木) 06:49:47 JST
Revision: 694 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=694 Author: shinsuke Date: 2007-11-08 06:49:47 +0900 (Thu, 08 Nov 2007) Log Message: ----------- bug fixes. Modified Paths: -------------- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/permission/FolderPermissionConfirmPage.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/permission/PagePermissionConfirmPage.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/permission/PortletPermissionConfirmPage.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/user/UserAttributeConfirmPage.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/user/UserConfirmPage.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/user/UserEditPage.java pal-admin/trunk/src/main/resources/appMessages.properties pal-admin/trunk/src/main/resources/appMessages_ja.properties pal-admin/trunk/src/main/webapp/view/permission/folderPermissionConfirm.html pal-admin/trunk/src/main/webapp/view/permission/pagePermissionConfirm.html pal-admin/trunk/src/main/webapp/view/permission/portletPermissionConfirm.html -------------- next part -------------- Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/permission/FolderPermissionConfirmPage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/permission/FolderPermissionConfirmPage.java 2007-11-06 07:29:16 UTC (rev 693) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/permission/FolderPermissionConfirmPage.java 2007-11-07 21:49:47 UTC (rev 694) @@ -17,14 +17,14 @@ import java.io.Serializable; -import org.apache.commons.lang.StringUtils; -import org.seasar.framework.log.Logger; - import jp.sf.pal.admin.PALAdminException; import jp.sf.pal.admin.service.PermissionManagementService; import jp.sf.pal.admin.web.CrudType; import jp.sf.pal.common.util.FacesMessageUtil; +import org.apache.commons.lang.StringUtils; +import org.seasar.framework.log.Logger; + public class FolderPermissionConfirmPage extends AbstractPermissionPage implements Serializable { @@ -109,8 +109,15 @@ return null; } - public Class<?> doEdit() { - return FolderPermissionEditPage.class; + public Class<?> doBack() { + if (isCreate()) { + return FolderPermissionEditPage.class; + } else if (isUpdate()) { + return FolderPermissionEditPage.class; + } else if (isDelete()) { + return FolderPermissionListPage.class; + } + return FolderPermissionListPage.class; } public boolean isComeFromList() { Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/permission/PagePermissionConfirmPage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/permission/PagePermissionConfirmPage.java 2007-11-06 07:29:16 UTC (rev 693) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/permission/PagePermissionConfirmPage.java 2007-11-07 21:49:47 UTC (rev 694) @@ -109,8 +109,15 @@ return null; } - public Class<?> doEdit() { - return PagePermissionEditPage.class; + public Class<?> doBack() { + if (isCreate()) { + return PagePermissionEditPage.class; + } else if (isUpdate()) { + return PagePermissionEditPage.class; + } else if (isDelete()) { + return PagePermissionListPage.class; + } + return PagePermissionListPage.class; } public boolean isComeFromList() { Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/permission/PortletPermissionConfirmPage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/permission/PortletPermissionConfirmPage.java 2007-11-06 07:29:16 UTC (rev 693) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/permission/PortletPermissionConfirmPage.java 2007-11-07 21:49:47 UTC (rev 694) @@ -109,8 +109,15 @@ return null; } - public Class<?> doEdit() { - return PortletPermissionEditPage.class; + public Class<?> doBack() { + if (isCreate()) { + return PortletPermissionEditPage.class; + } else if (isUpdate()) { + return PortletPermissionEditPage.class; + } else if (isDelete()) { + return PortletPermissionListPage.class; + } + return PortletPermissionListPage.class; } public boolean isComeFromList() { Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/user/UserAttributeConfirmPage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/user/UserAttributeConfirmPage.java 2007-11-06 07:29:16 UTC (rev 693) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/user/UserAttributeConfirmPage.java 2007-11-07 21:49:47 UTC (rev 694) @@ -86,7 +86,7 @@ case CrudType.UPDATE: try { getUserManagementService().update(this); - FacesMessageUtil.addInfoMessage("added.new.userattribute", + FacesMessageUtil.addInfoMessage("updated.new.userattribute", new Object[] { getName() }); } catch (PALAdminException e) { FacesMessageUtil.addErrorMessage( Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/user/UserConfirmPage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/user/UserConfirmPage.java 2007-11-06 07:29:16 UTC (rev 693) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/user/UserConfirmPage.java 2007-11-07 21:49:47 UTC (rev 694) @@ -17,6 +17,8 @@ import java.io.Serializable; +import javax.faces.context.FacesContext; + import jp.sf.pal.admin.PALAdminException; import jp.sf.pal.admin.util.PALAdminUtil; import jp.sf.pal.admin.web.CrudType; @@ -80,6 +82,15 @@ } protected void deleteUser() { + // check current user + if (getName() != null + && getName().equals( + FacesContext.getCurrentInstance().getExternalContext() + .getRemoteUser())) { + FacesMessageUtil.addErrorMessage("cannot.delete.current.user"); + return; + } + try { getUserManagementService().delete(this); FacesMessageUtil.addInfoMessage("deleted.user", Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/user/UserEditPage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/user/UserEditPage.java 2007-11-06 07:29:16 UTC (rev 693) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/user/UserEditPage.java 2007-11-07 21:49:47 UTC (rev 694) @@ -189,6 +189,12 @@ } public Class<?> doUpdate() { + // check password + if (getPassword() == null && getPasswordConfirm() != null) { + FacesMessageUtil.addErrorMessage("confirm.password.does.not.match"); + return null; + } + try { getUserManagementService().update(this); FacesMessageUtil.addInfoMessage("updated.user.information", Modified: pal-admin/trunk/src/main/resources/appMessages.properties =================================================================== --- pal-admin/trunk/src/main/resources/appMessages.properties 2007-11-06 07:29:16 UTC (rev 693) +++ pal-admin/trunk/src/main/resources/appMessages.properties 2007-11-07 21:49:47 UTC (rev 694) @@ -7,6 +7,7 @@ failed.to.add.new.user=Failed to add a new User({0}). deleted.user=Delete the User({0}). failed.to.delete.user=Failed to delete the User({0}). +cannot.delete.current.user=Cannot delete a current login user. added.new.role=Added a new Role({0}). failed.to.add.new.role=Failed to add a new Role({0}). @@ -19,6 +20,7 @@ failed.to.delete.group=Failed to delete the Group({0}). added.new.userattribute=Added a new User Attribute({0}). +updated.new.userattribute=Updated a new User Attribute({0}). failed.to.add.new.userattribute=Failed to add a new User Attribute({0}). deleted.userattribute=Delete the User Attribute({0}). failed.to.delete.userattribute=Failed to delete the User Attribute({0}). @@ -26,6 +28,7 @@ could.not.find.user=Could not find the target user. updated.user.information= Updated the target user information({0}). failed.to.update.user.information=Failed to updated the user information({0}). +confirm.password.does.not.match=The re-type password does not match. added.group.to.user= Added the group({1}) to the user({0}). failed.to.add.group.to.user=Failed to add the group({1}) to the user({0}). Modified: pal-admin/trunk/src/main/resources/appMessages_ja.properties =================================================================== --- pal-admin/trunk/src/main/resources/appMessages_ja.properties 2007-11-06 07:29:16 UTC (rev 693) +++ pal-admin/trunk/src/main/resources/appMessages_ja.properties 2007-11-07 21:49:47 UTC (rev 694) @@ -7,6 +7,7 @@ failed.to.add.new.user=\u65b0\u898f\u30e6\u30fc\u30b6\u30fc({0})\u306e\u8ffd\u52a0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 deleted.user=\u30e6\u30fc\u30b6\u30fc({0})\u3092\u524a\u9664\u3057\u307e\u3057\u305f\u3002 failed.to.delete.user=\u30e6\u30fc\u30b6\u30fc({0})\u306e\u524a\u9664\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 +cannot.delete.current.user=\u73fe\u5728\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u306f\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3002 added.new.role=\u65b0\u3057\u3044\u30ed\u30fc\u30eb({0})\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 failed.to.add.new.role=\u65b0\u3057\u3044\u30ed\u30fc\u30eb({0})\u306e\u8ffd\u52a0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 @@ -19,6 +20,7 @@ failed.to.delete.group=\u30b0\u30eb\u30fc\u30d7{0})\u306e\u524a\u9664\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 added.new.userattribute=\u65b0\u898f\u30e6\u30fc\u30b6\u30fc\u5c5e\u6027({0})\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 +updated.new.userattribute=\u65b0\u898f\u30e6\u30fc\u30b6\u30fc\u5c5e\u6027({0})\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002 failed.to.add.new.userattribute=\u65b0\u898f\u30e6\u30fc\u30b6\u30fc\u5c5e\u6027({0})\u306e\u8ffd\u52a0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 deleted.userattribute=\u30e6\u30fc\u30b6\u30fc\u5c5e\u6027({0})\u3092\u524a\u9664\u3057\u307e\u3057\u305f\u3002 failed.to.delete.userattribute=\u30e6\u30fc\u30b6\u30fc\u5c5e\u6027({0})\u306e\u524a\u9664\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 @@ -26,6 +28,7 @@ could.not.find.user=\u6307\u5b9a\u3057\u305f\u30e6\u30fc\u30b6\u30fc({0})\u3092\u898b\u3064\u3051\u308b\u4e8b\u304c\u51fa\u6765\u307e\u305b\u3093\u3002 updated.user.information= \u6307\u5b9a\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u60c5\u5831({0})\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002 failed.to.update.user.information=\u6307\u5b9a\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u60c5\u5831({0})\u306e\u66f4\u65b0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 +confirm.password.does.not.match=\u78ba\u8a8d\u7528\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002 added.group.to.user= \u30b0\u30eb\u30fc\u30d7({1})\u3092\u30e6\u30fc\u30b6\u30fc({0})\u306b\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 failed.to.add.group.to.user=\u30b0\u30eb\u30fc\u30d7({1})\u3092\u30e6\u30fc\u30b6\u30fc({0})\u306b\u8ffd\u52a0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 Modified: pal-admin/trunk/src/main/webapp/view/permission/folderPermissionConfirm.html =================================================================== --- pal-admin/trunk/src/main/webapp/view/permission/folderPermissionConfirm.html 2007-11-06 07:29:16 UTC (rev 693) +++ pal-admin/trunk/src/main/webapp/view/permission/folderPermissionConfirm.html 2007-11-07 21:49:47 UTC (rev 694) @@ -74,8 +74,8 @@ </table> <div> <div id="isNotRead" style="display:inline;"> - <input type="button" id="doEdit" value="Back" onclick="location.href='folderPermissionEdit.html'" class="portlet-form-button"/> - <input type="button" id="doFinish-create" value="Finish" onclick="location.href='folderPermissionList.html'" class="portlet-form-button"/> + <input type="button" id="doBack" value="Back" onclick="location.href='folderPermissionEdit.html'" class="portlet-form-button"/> + <input type="button" id="doFinish" value="Finish" onclick="location.href='folderPermissionList.html'" class="portlet-form-button"/> </div> </div> </div> Modified: pal-admin/trunk/src/main/webapp/view/permission/pagePermissionConfirm.html =================================================================== --- pal-admin/trunk/src/main/webapp/view/permission/pagePermissionConfirm.html 2007-11-06 07:29:16 UTC (rev 693) +++ pal-admin/trunk/src/main/webapp/view/permission/pagePermissionConfirm.html 2007-11-07 21:49:47 UTC (rev 694) @@ -74,8 +74,8 @@ </table> <div> <div id="isNotRead" style="display:inline;"> - <input type="button" id="doEdit" value="Back" onclick="location.href='pagePermissionEdit.html'" class="portlet-form-button"/> - <input type="button" id="doFinish-create" value="Finish" onclick="location.href='pagePermissionList.html'" class="portlet-form-button"/> + <input type="button" id="doBack" value="Back" onclick="location.href='pagePermissionEdit.html'" class="portlet-form-button"/> + <input type="button" id="doFinish" value="Finish" onclick="location.href='pagePermissionList.html'" class="portlet-form-button"/> </div> </div> </div> Modified: pal-admin/trunk/src/main/webapp/view/permission/portletPermissionConfirm.html =================================================================== --- pal-admin/trunk/src/main/webapp/view/permission/portletPermissionConfirm.html 2007-11-06 07:29:16 UTC (rev 693) +++ pal-admin/trunk/src/main/webapp/view/permission/portletPermissionConfirm.html 2007-11-07 21:49:47 UTC (rev 694) @@ -74,8 +74,8 @@ </table> <div> <div id="isNotRead" style="display:inline;"> - <input type="button" id="doEdit" value="Back" onclick="location.href='portletPermissionEdit.html'" class="portlet-form-button"/> - <input type="button" id="doFinish-create" value="Finish" onclick="location.href='portletPermissionList.html'" class="portlet-form-button"/> + <input type="button" id="doBack" value="Back" onclick="location.href='portletPermissionEdit.html'" class="portlet-form-button"/> + <input type="button" id="doFinish" value="Finish" onclick="location.href='portletPermissionList.html'" class="portlet-form-button"/> </div> </div> </div>