portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r925379 - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/min-pages/ applications/jetspeed/src/main/webapp/WEB-INF/min-ui-pages/ applications/jetspeed/src/main/webapp/WEB-INF/pages/ applications/jetspeed/s...
Date Fri, 19 Mar 2010 19:04:01 GMT
Author: woonsan
Date: Fri Mar 19 19:04:01 2010
New Revision: 925379

URL: http://svn.apache.org/viewvc?rev=925379&view=rev
Log:
JS2-1131: Set the space editing psml to allow user role to view.
The security access checking is now done inside the SpaceManager portlet.
Adding a method, isUserSpace(Space) in Spaces service interface because I think we need to
know whether a space is from the user home or from the system spaces. For example, currently,
space management portlets communicate each other by the space name, which is ambiguous. What
if there is "hello" system space, while there is also "hello" user space? This is a TO-DO.
Also, change the warning logging in j2 logger.

Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/spaces.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-ui-pages/spaces.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/spaces.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/ui-pages/spaces.psml
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/util/JetspeedLoggerUtil.java

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/spaces.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/spaces.psml?rev=925379&r1=925378&r2=925379&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/spaces.psml
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/spaces.psml
Fri Mar 19 19:04:01 2010
@@ -25,8 +25,11 @@ limitations under the License.
     <fragment id="new-spaces-app" type="portlet" name="j2-admin::SpacesManager"/>
   </fragment>
 
-
   <security-constraints>
     <security-constraints-ref>admin</security-constraints-ref>
+    <security-constraint>
+      <roles>user</roles>
+      <permissions>view</permissions>
+    </security-constraint>
   </security-constraints>
 </page>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-ui-pages/spaces.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-ui-pages/spaces.psml?rev=925379&r1=925378&r2=925379&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-ui-pages/spaces.psml
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-ui-pages/spaces.psml
Fri Mar 19 19:04:01 2010
@@ -25,8 +25,11 @@ limitations under the License.
     <fragment id="new-spaces-app" type="portlet" name="j2-admin::SpacesManager"/>
   </fragment>
 
-
   <security-constraints>
     <security-constraints-ref>admin</security-constraints-ref>
+    <security-constraint>
+      <roles>user</roles>
+      <permissions>view</permissions>
+    </security-constraint>
   </security-constraints>
 </page>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/spaces.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/spaces.psml?rev=925379&r1=925378&r2=925379&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/spaces.psml
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/spaces.psml
Fri Mar 19 19:04:01 2010
@@ -24,9 +24,13 @@ limitations under the License.
   <fragment id="spaces-layout" type="layout" name="jetspeed-layouts::VelocityOneColumn">
     <fragment id="new-spaces-app" type="portlet" name="j2-admin::SpacesManager"/>
   </fragment>
-
-
+  
   <security-constraints>
     <security-constraints-ref>admin</security-constraints-ref>
+    <security-constraint>
+      <roles>user</roles>
+      <permissions>view</permissions>
+    </security-constraint>
   </security-constraints>
+  
 </page>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/ui-pages/spaces.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/ui-pages/spaces.psml?rev=925379&r1=925378&r2=925379&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/ui-pages/spaces.psml
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/ui-pages/spaces.psml
Fri Mar 19 19:04:01 2010
@@ -25,8 +25,11 @@ limitations under the License.
     <fragment id="new-spaces-app" type="portlet" name="j2-admin::SpacesManager"/>
   </fragment>
 
-
   <security-constraints>
     <security-constraints-ref>admin</security-constraints-ref>
+    <security-constraint>
+      <roles>user</roles>
+      <permissions>view</permissions>
+    </security-constraint>
   </security-constraints>
 </page>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java?rev=925379&r1=925378&r2=925379&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java
Fri Mar 19 19:04:01 2010
@@ -326,7 +326,11 @@ public class SpacesServiceImpl implement
 		}
     	return null;
     }
-
+    
+    public boolean isUserSpace(Space space)
+    {
+        return space.getPath().startsWith(Folder.USER_FOLDER);
+    }
     
     public void addSpaceToEnvironment(Space space, Environment env) throws SpacesException
     {

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java?rev=925379&r1=925378&r2=925379&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java
Fri Mar 19 19:04:01 2010
@@ -141,6 +141,13 @@ public interface Spaces
     Space lookupUserSpace(String username);
     
     /**
+     * Returns true if the space is from a user space folder.
+     * @param space
+     * @return
+     */
+    boolean isUserSpace(Space space);
+    
+    /**
      * Adds a space to the list of spaces for the given environment
      * A space can exist in zero or more environments
      * 

Modified: portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/util/JetspeedLoggerUtil.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/util/JetspeedLoggerUtil.java?rev=925379&r1=925378&r2=925379&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/util/JetspeedLoggerUtil.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/util/JetspeedLoggerUtil.java
Fri Mar 19 19:04:01 2010
@@ -329,7 +329,7 @@ public class JetspeedLoggerUtil
             }
             catch (Exception e)
             {
-                throw new RuntimeException("Failed to invoke logger method. " + e);
+                throw new RuntimeException("Failed to invoke logger method, " + methodName
+ ", on " + targetLogger + ". " + e);
             }
         }
         



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