[pal-cvs 3418] [1152] fixed classcastexception when using psml db.

svnno****@sourc***** svnno****@sourc*****
2008年 9月 11日 (木) 05:34:08 JST


Revision: 1152
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=1152
Author:   shinsuke
Date:     2008-09-11 05:34:07 +0900 (Thu, 11 Sep 2008)

Log Message:
-----------
fixed classcastexception when using psml db.

Modified Paths:
--------------
    pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java


-------------- next part --------------
Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java
===================================================================
--- pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java	2008-09-10 20:33:59 UTC (rev 1151)
+++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java	2008-09-10 20:34:07 UTC (rev 1152)
@@ -1863,13 +1863,14 @@
         if (folderOrPage == null) {
             throw new CommonException("invalid.path", "Invalid path: " + path);
         }
-        SecurityConstraint sc = getPageManager().newPageSecurityConstraint();
-        sc.setUsers(users);
-        sc.setRoles(roles);
-        sc.setGroups(groups);
-        sc.setPermissions(permissions);
         if (folderOrPage.endsWith(PALAdminConstants.PAGE_EXTENSION)) {
             // page
+            SecurityConstraint sc = getPageManager()
+                    .newPageSecurityConstraint();
+            sc.setUsers(users);
+            sc.setRoles(roles);
+            sc.setGroups(groups);
+            sc.setPermissions(permissions);
             Page page = getPage(folderOrPage);
             if (page == null) {
                 throw new CommonException("could.not.find.page",
@@ -1878,6 +1879,12 @@
             addConstraint(page, sc);
         } else {
             // folder
+            SecurityConstraint sc = getPageManager()
+                    .newFolderSecurityConstraint();
+            sc.setUsers(users);
+            sc.setRoles(roles);
+            sc.setGroups(groups);
+            sc.setPermissions(permissions);
             Folder folder = getFolder(folderOrPage);
             if (folder == null) {
                 throw new CommonException("could.not.find.folder",


pal-cvs メーリングリストの案内