portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject svn commit: r373401 - in /portals/jetspeed-2/trunk: applications/j2-admin/src/java/org/apache/jetspeed/portlets/customizer/ applications/j2-admin/src/java/org/apache/jetspeed/portlets/selector/ components/page-manager/src/java/org/apache/jetspeed/om/fo...
Date Sun, 29 Jan 2006 23:56:15 GMT
Author: dlestrat
Date: Sun Jan 29 15:56:07 2006
New Revision: 373401

URL: http://svn.apache.org/viewcvs?rev=373401&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-475#action_12364414

Latest changes for JS2-475.

Modified:
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/customizer/CustomizerPortlet.java
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/selector/PortletSelector.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/customizer/CustomizerPortlet.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/customizer/CustomizerPortlet.java?rev=373401&r1=373400&r2=373401&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/customizer/CustomizerPortlet.java
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/customizer/CustomizerPortlet.java
Sun Jan 29 15:56:07 2006
@@ -28,18 +28,15 @@
 import javax.portlet.PortletException;
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;
-import javax.security.auth.Subject;
 
 import org.apache.jetspeed.CommonPortletServices;
 import org.apache.jetspeed.JetspeedActions;
-import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
 import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.portlets.PortletInfo;
 import org.apache.jetspeed.portlets.pam.PortletApplicationResources;
-import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.security.PortletPermission;
 import org.apache.portals.bridges.velocity.AbstractVelocityMessagingPortlet;
 import org.apache.portals.gems.util.StatusMessage;
@@ -106,14 +103,9 @@
         if (list != null)
             return list;
         
-        Iterator portlets = portlets = registry.getAllPortletDefinitions().iterator();
+        Iterator portlets = registry.getAllPortletDefinitions().iterator();
         list = new LinkedList();
-        // get subject
-        RequestContext requestContext = (RequestContext) request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
         Locale locale = request.getLocale();
-        Subject subject = null;
-        if (requestContext != null)
-            subject = requestContext.getSubject();
         
         while (portlets.hasNext())
         {

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/selector/PortletSelector.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/selector/PortletSelector.java?rev=373401&r1=373400&r2=373401&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/selector/PortletSelector.java
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/selector/PortletSelector.java
Sun Jan 29 15:56:07 2006
@@ -34,17 +34,14 @@
 import javax.portlet.PortletException;
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;
-import javax.security.auth.Subject;
 
 import org.apache.jetspeed.CommonPortletServices;
 import org.apache.jetspeed.JetspeedActions;
-import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
 import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
 import org.apache.jetspeed.portlets.PortletInfo;
 import org.apache.jetspeed.portlets.pam.PortletApplicationResources;
-import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.search.ParsedObject;
 import org.apache.jetspeed.search.SearchEngine;
 import org.apache.jetspeed.security.PortletPermission;
@@ -232,12 +229,6 @@
             Locale locale = request.getLocale();
             List list = new ArrayList();
             
-            // get subject
-            RequestContext requestContext = (RequestContext) request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
           
-            Subject subject = null;
-            if (requestContext != null)
-                subject = requestContext.getSubject();
-            
             while (portlets.hasNext())
             {
                 PortletDefinitionComposite portlet = null;
@@ -288,10 +279,6 @@
     public int find(BrowserIterator iterator, String searchString, String searchColumn)
     {
         int index = 0;
-        int column = 1; 
-        
-        if (searchColumn != null)
-            column = Integer.parseInt(searchColumn);
         
         Iterator it = iterator.getResultSet().iterator();
         while (it.hasNext())

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java?rev=373401&r1=373400&r2=373401&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
Sun Jan 29 15:56:07 2006
@@ -16,7 +16,6 @@
 package org.apache.jetspeed.om.folder.psml;
 
 import java.security.AccessController;
-import java.io.File;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
@@ -61,10 +60,8 @@
  */
 public class FolderImpl extends AbstractNode implements Folder, Reset
 {
-    private final static String FOLDER_PERMISSION_WILD_CHAR = new String(new char[]{FolderPermission.WILD_CHAR});
     
     private NodeSet allNodes;
-    private File directory;
     private FolderMetaDataImpl metadata;
     private FolderHandler folderHandler;
     private int reservedType = RESERVED_FOLDER_NONE;

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java?rev=373401&r1=373400&r2=373401&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java
Sun Jan 29 15:56:07 2006
@@ -26,8 +26,6 @@
 import java.util.Locale;
 import java.util.Map;
 
-import javax.security.auth.Subject;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jetspeed.JetspeedActions;
@@ -61,7 +59,6 @@
     protected Log log = LogFactory.getLog(GetPortletsAction.class);
     private PortletRegistry registry = null;
     private SearchEngine searchEngine = null;
-    private PermissionManager permissionManager = null;
     
     public GetPortletsAction(String template, 
                              String errorTemplate,
@@ -74,7 +71,6 @@
         super(template, errorTemplate, pageManager, securityBehavior);
         this.registry = registry;
         this.searchEngine = searchEngine;
-        this.permissionManager = permissionManager;
     }
 
     public boolean run(RequestContext requestContext, Map resultMap)
@@ -122,8 +118,6 @@
         else
             portlets = searchEngine.search(filter).getResults().iterator();
         
-        Subject subject = requestContext.getSubject();
-        
         while (portlets.hasNext())
         {
             PortletDefinitionComposite portlet = null;
@@ -145,7 +139,7 @@
             String uniqueName = appName + "::" + portlet.getName();
             try
             {
-                AccessController.checkPermission(new PortletPermission(portlet.getUniqueName(),
JetspeedActions.VIEW));
+                AccessController.checkPermission(new PortletPermission(portlet.getUniqueName(),
JetspeedActions.MASK_VIEW));
                 list.add(new PortletInfo(uniqueName, portlet.getDisplayNameText(locale),
portlet.getDescriptionText(locale)));
             }
             catch (AccessControlException ace)



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