portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r371406 - in /portals/jetspeed-2/trunk: jetspeed-api/src/java/org/apache/jetspeed/layout/PortletActionSecurityBehavior.java src/webapp/WEB-INF/assembly/ajax-layout.xml
Date Sun, 22 Jan 2006 22:24:07 GMT
Author: taylor
Date: Sun Jan 22 14:24:05 2006
New Revision: 371406

URL: http://svn.apache.org/viewcvs?rev=371406&view=rev
Log:
Abstracted out PortletActionSecurityBehavior for specialized handling 
of creation of new pages when you don't have access to shared (role) pages 
on live edit

Added:
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/layout/PortletActionSecurityBehavior.java
Modified:
    portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/ajax-layout.xml

Added: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/layout/PortletActionSecurityBehavior.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/layout/PortletActionSecurityBehavior.java?rev=371406&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/layout/PortletActionSecurityBehavior.java
(added)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/layout/PortletActionSecurityBehavior.java
Sun Jan 22 14:24:05 2006
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.layout;
+
+import org.apache.jetspeed.request.RequestContext;
+
+/**
+ * Abstracted behavior of security checks for portlet actions 
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public interface PortletActionSecurityBehavior 
+{
+    public boolean checkAccess(RequestContext context, String action);
+    public boolean createNewPageOnEdit(RequestContext context);    
+}

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/ajax-layout.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/ajax-layout.xml?rev=371406&r1=371405&r2=371406&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/ajax-layout.xml (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/ajax-layout.xml Sun Jan 22 14:24:05
2006
@@ -11,6 +11,13 @@
     index 3 = Page Manager
     index 4 = Registry (getPortlets)
     -->
+<bean id="PortletActionSecurityBehavior"
+	  class="org.apache.jetspeed.layout.impl.PortletActionSecurityPathBehavior">
+    <constructor-arg index='0'>
+        <ref bean="org.apache.jetspeed.page.PageManager"/>        
+    </constructor-arg>    	
+</bean>	
+	
 <bean id="AjaxMovePortletAbsolute"
     class="org.apache.jetspeed.layout.impl.MovePortletAction">
     <constructor-arg index="0">
@@ -25,6 +32,9 @@
     <constructor-arg index='3'>
         <ref bean="org.apache.jetspeed.page.PageManager"/>        
     </constructor-arg>    
+    <constructor-arg index='4'>
+        <ref bean="PortletActionSecurityBehavior"/>        
+    </constructor-arg>    	
 </bean>
 
 <bean id="AjaxMovePortletLeft"
@@ -41,6 +51,9 @@
     <constructor-arg index='3'>
         <ref bean="org.apache.jetspeed.page.PageManager"/>        
     </constructor-arg>        
+    <constructor-arg index='4'>
+        <ref bean="PortletActionSecurityBehavior"/>        
+    </constructor-arg>    		
 </bean>
 
 <bean id="AjaxMovePortletRight"
@@ -56,7 +69,10 @@
     </constructor-arg>
     <constructor-arg index='3'>
         <ref bean="org.apache.jetspeed.page.PageManager"/>        
-    </constructor-arg>        
+    </constructor-arg>      
+    <constructor-arg index='4'>
+        <ref bean="PortletActionSecurityBehavior"/>        
+    </constructor-arg>    		  
 </bean>
 
 <bean id="AjaxMovePortletUp"
@@ -72,7 +88,10 @@
     </constructor-arg>
     <constructor-arg index='3'>
         <ref bean="org.apache.jetspeed.page.PageManager"/>        
-    </constructor-arg>        
+    </constructor-arg>      
+    <constructor-arg index='4'>
+        <ref bean="PortletActionSecurityBehavior"/>        
+    </constructor-arg>    		  
 </bean>
 
 <bean id="AjaxMovePortletDown"
@@ -88,7 +107,10 @@
     </constructor-arg>
     <constructor-arg index='3'>
         <ref bean="org.apache.jetspeed.page.PageManager"/>        
-    </constructor-arg>        
+    </constructor-arg>      
+    <constructor-arg index='4'>
+        <ref bean="PortletActionSecurityBehavior"/>        
+    </constructor-arg>    		  
 </bean>
 
 <bean id="AjaxAddPortlet"
@@ -101,7 +123,10 @@
     </constructor-arg>
     <constructor-arg index='2'>
         <ref bean="org.apache.jetspeed.page.PageManager"/>        
-    </constructor-arg>        
+    </constructor-arg>      
+    <constructor-arg index='3'>
+        <ref bean="PortletActionSecurityBehavior"/>        
+    </constructor-arg>    		  
 </bean>
 
 <bean id="AjaxRemovePortlet"
@@ -115,6 +140,9 @@
     <constructor-arg index='2'>
         <ref bean="org.apache.jetspeed.page.PageManager"/>        
     </constructor-arg>        
+    <constructor-arg index='3'>
+        <ref bean="PortletActionSecurityBehavior"/>        
+    </constructor-arg>    		
 </bean>
 
 <bean id="AjaxGetPortlets"
@@ -136,7 +164,10 @@
     </constructor-arg>              
     <constructor-arg index='5'>
         <ref bean="org.apache.jetspeed.security.PermissionManager"/>        
-    </constructor-arg>              
+    </constructor-arg>       
+    <constructor-arg index='6'>
+        <ref bean="PortletActionSecurityBehavior"/>        
+    </constructor-arg>    		       
 </bean>
 
 <bean id="AjaxGetPage"
@@ -149,7 +180,10 @@
     </constructor-arg>
     <constructor-arg index='2'>
         <ref bean="org.apache.jetspeed.page.PageManager"/>        
-    </constructor-arg>        
+    </constructor-arg>
+    <constructor-arg index='3'>
+        <ref bean="PortletActionSecurityBehavior"/>        
+    </constructor-arg>    		        
 </bean>
 
 <bean id="AjaxGetPages"
@@ -162,7 +196,10 @@
     </constructor-arg>
     <constructor-arg index='2'>
         <ref bean="org.apache.jetspeed.page.PageManager"/>        
-    </constructor-arg>        
+    </constructor-arg>
+    <constructor-arg index='3'>
+        <ref bean="PortletActionSecurityBehavior"/>        
+    </constructor-arg>    		        
 </bean>
 	
 <bean id="AjaxRequestService" class="org.apache.jetspeed.ajax.AjaxRequestServiceImpl">



---------------------------------------------------------------------
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