portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r1178933 - /portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java
Date Tue, 04 Oct 2011 19:53:42 GMT
Author: woonsan
Date: Tue Oct  4 19:53:42 2011
New Revision: 1178933

URL: http://svn.apache.org/viewvc?rev=1178933&view=rev
Log:
JS2-1259: setting empty security constraints for initialization before setting new security
constraints

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java?rev=1178933&r1=1178932&r2=1178933&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java
Tue Oct  4 19:53:42 2011
@@ -27,13 +27,10 @@ import java.util.Map;
 
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.layout.PageLayoutComponent;
-import org.apache.jetspeed.page.PageManager;
-import org.apache.jetspeed.page.PageNotFoundException;
-import org.apache.jetspeed.page.PageNotRemovedException;
-import org.apache.jetspeed.page.PageNotUpdatedException;
 import org.apache.jetspeed.om.common.SecurityConstraint;
 import org.apache.jetspeed.om.common.SecurityConstraints;
 import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.om.page.BaseConcretePageElement;
 import org.apache.jetspeed.om.page.BaseFragmentElement;
 import org.apache.jetspeed.om.page.BaseFragmentsElement;
 import org.apache.jetspeed.om.page.BasePageElement;
@@ -44,7 +41,6 @@ import org.apache.jetspeed.om.page.Fragm
 import org.apache.jetspeed.om.page.FragmentDefinition;
 import org.apache.jetspeed.om.page.FragmentProperty;
 import org.apache.jetspeed.om.page.FragmentReference;
-import org.apache.jetspeed.om.page.BaseConcretePageElement;
 import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.om.page.PageFragment;
 import org.apache.jetspeed.om.page.PageTemplate;
@@ -57,9 +53,12 @@ import org.apache.jetspeed.om.page.impl.
 import org.apache.jetspeed.om.page.impl.ContentSecurityConstraints;
 import org.apache.jetspeed.om.portlet.LocalizedField;
 import org.apache.jetspeed.om.preference.FragmentPreference;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.page.PageNotFoundException;
+import org.apache.jetspeed.page.PageNotRemovedException;
+import org.apache.jetspeed.page.PageNotUpdatedException;
 import org.apache.jetspeed.page.document.NodeException;
 import org.apache.pluto.container.PortletPreference;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -1925,8 +1924,13 @@ public class PageLayoutComponentImpl imp
 
             // update fragment preferences and page in page manager.
             
-            // Initializing security constraints by setting null first to reset it after
aggregating into fragmentConstraintsConstraints..
-            fragment.setSecurityConstraints(null);
+            // Initializing security constraints by setting empty one first to reset it after
aggregating into fragmentConstraintsConstraints..
+            // 
+            //TODO: JS2-1259: BaseElementImpl doesn't consider null input; DBPM based security
constraints update needs to be more tested.
+            //      For now, set an empty one instead of null to avoid this problem as well
as possible side effects.
+            //
+            //fragment.setSecurityConstraints(null);
+            fragment.setSecurityConstraints(fragment.newSecurityConstraints());
             
             if ((constraints != null) && !constraints.isEmpty())
             {



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message