portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r593513 - in /portals/jetspeed-2/branches/JETSPEED-2.1.3: applications/demo/src/webapp/WEB-INF/ applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/ applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/resources...
Date Fri, 09 Nov 2007 12:48:40 GMT
Author: woonsan
Date: Fri Nov  9 04:48:34 2007
New Revision: 593513

URL: http://svn.apache.org/viewvc?rev=593513&view=rev
Log:
[JS2-791] configure the security constraint on a particular portlet fragment.
Implemented config mode to allow edit security constraints for a portlet fragment.
Now we can add/remove security constraints and update security constraint ref.
To enable this auto config mode, set the following property to true in /WEB-INF/conf/jetspeed.properties

  supported.portletmode.autoswitch.config = true

Added:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/resources/
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/resources/CustomConfigModeResources.properties
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/resources/CustomConfigModeResources_ko.properties
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/custom/
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/custom/config-mode.vm
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/portlet/tigris/images/config.gif   (with props)
Modified:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/demo/src/webapp/WEB-INF/portlet.xml
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/portlet.xml
    portals/jetspeed-2/branches/JETSPEED-2.1.3/commons/src/java/org/apache/jetspeed/portlet/PortletObjectProxy.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/CustomDecoratorActionsFactory.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/DecorationValve.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/DecoratorActionsFactory.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions.properties
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_en.properties
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ja.properties
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ko.properties
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_nl.properties
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ua.properties
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_zh.properties
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_zh_TW.properties
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletProxyInstance.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/JetspeedActions.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/pipelines.xml
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/registry.xml
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/conf/jetspeed.properties
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/page.security

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/demo/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/demo/src/webapp/WEB-INF/portlet.xml?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/demo/src/webapp/WEB-INF/portlet.xml (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/demo/src/webapp/WEB-INF/portlet.xml Fri Nov  9 04:48:34 2007
@@ -1348,6 +1348,10 @@
         <portlet-mode>about</portlet-mode>
     </custom-portlet-mode>
     <custom-portlet-mode>
+        <description>a Custom Config Mode</description>            
+        <portlet-mode>config</portlet-mode>
+    </custom-portlet-mode>
+    <custom-portlet-mode>
         <description>a Custom Edit_defaults Mode</description>            
         <portlet-mode>edit_defaults</portlet-mode>
     </custom-portlet-mode>

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java?rev=593513&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java Fri Nov  9 04:48:34 2007
@@ -0,0 +1,342 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.portlets.custom;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.HashSet;
+
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletMode;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+
+import org.springframework.util.StringUtils;
+
+import org.apache.portals.bridges.velocity.GenericVelocityPortlet;
+import org.apache.velocity.context.Context;
+
+import org.apache.jetspeed.CommonPortletServices;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.om.page.Fragment;
+import org.apache.jetspeed.om.common.SecurityConstraints;
+import org.apache.jetspeed.om.common.SecurityConstraint;
+import org.apache.jetspeed.page.PageManager;
+
+/**
+ * Common Custom Config Mode Portlet
+ * 
+ * @author <a href="mailto:woonsan@apache.org">Woonsan Ko</a>
+ * @version $Id: $
+ */
+public class CustomConfigModePortlet extends GenericVelocityPortlet
+{
+    private static final PortletMode CONFIG_MODE = new PortletMode("config");
+    private static final String DELIMITERS = "[],; ";
+    
+    private PageManager pageManager;
+    private String configPage;
+    
+    public void init(PortletConfig config) throws PortletException
+    {
+        super.init(config);
+        
+        this.configPage = config.getInitParameter("ConfigPage");
+        
+        PortletContext context = getPortletContext();
+        this.pageManager = (PageManager) context.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
+        
+        if (this.pageManager == null)
+        {
+            throw new PortletException("Could not get instance of pageManager component");
+        }
+    }
+    
+    protected void doDispatch(RenderRequest request, RenderResponse response) throws PortletException, IOException
+    {
+        if ( !request.getWindowState().equals(WindowState.MINIMIZED))
+        {
+            PortletMode curMode = request.getPortletMode();
+            
+            if (CONFIG_MODE.equals(curMode))
+            {
+                List securityContraintRefList = null;
+                
+                try
+                {
+                    securityContraintRefList = this.pageManager.getPageSecurity().getSecurityConstraintsDefs();
+                }
+                catch (Exception e)
+                {
+                    throw new PortletException("Cannot find page security constraint definitions.", e);
+                }
+                
+                if (securityContraintRefList != null)
+                {
+                    request.setAttribute("securityContraintRefList", securityContraintRefList);
+                }
+                
+                request.setAttribute(PARAM_EDIT_PAGE, this.configPage);
+                doEdit(request, response);
+            }
+            else
+            {
+                super.doDispatch(request, response);
+            }
+        }
+    }
+
+    public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
+    {
+        String action = request.getParameter("action");
+        
+        if ("addConstraint".equals(action))
+        {
+            addSecurityConstraint(request, response);
+        }
+        else if ("removeConstraint".equals(action))
+        {
+            removeSecurityConstraint(request, response);
+        }
+        else if ("updateConstraintRefs".equals(action))
+        {
+            updateSecurityConstraintRefs(request, response);
+        }
+    }
+    
+    private void addSecurityConstraint(ActionRequest request, ActionResponse response) throws PortletException, IOException
+    {
+        try
+        {
+            String path = request.getParameter("path");
+            String fragmentId = request.getParameter("fragment");
+            String type = request.getParameter("type");
+            String roles = request.getParameter("roles");
+            String groups = request.getParameter("groups");
+            String users = request.getParameter("users");
+            String permissions = request.getParameter("permissions");
+            
+            Page page = this.pageManager.getPage(path);
+            Fragment fragment = page.getFragmentById(fragmentId);
+            
+            if (fragment == null)
+            {
+                throw new IllegalStateException("Cannot find fragment: " + fragmentId);
+            }
+            
+            SecurityConstraints constraints = fragment.getSecurityConstraints();
+            
+            if (constraints == null)
+            {
+                constraints = fragment.newSecurityConstraints();
+            }
+            
+            SecurityConstraint constraint = fragment.newSecurityConstraint();
+            Set roleSet = convertToSet(roles, DELIMITERS);
+            Set groupSet = convertToSet(groups, DELIMITERS);
+            Set userSet = convertToSet(users, DELIMITERS);
+            
+            if (!roleSet.isEmpty())
+            {
+                constraint.setRoles(new ArrayList(roleSet));
+            }
+            if (!groupSet.isEmpty())
+            {
+                constraint.setGroups(new ArrayList(groupSet));
+            }
+            if (!userSet.isEmpty())
+            {
+                constraint.setUsers(new ArrayList(userSet));
+            }
+            
+            Set permissionSet = convertToSet(permissions, DELIMITERS);
+            
+            constraint.setPermissions(new ArrayList(permissionSet));
+            List constraintList = constraints.getSecurityConstraints();
+            
+            if (constraintList == null)
+            {
+                constraintList = new ArrayList();
+            }
+            
+            constraintList.add(constraint);
+            
+            constraints.setSecurityConstraints(constraintList);
+            fragment.setSecurityConstraints(constraints);
+            this.pageManager.updatePage(page);
+        }
+        catch (Exception e)
+        {
+            throw new PortletException("Failed to add security constraint.", e);
+        }
+    }
+    
+    private void removeSecurityConstraint(ActionRequest request, ActionResponse response) throws PortletException, IOException
+    {
+        try
+        {
+            String path = request.getParameter("path");
+            String fragmentId = request.getParameter("fragment");
+            String roles = request.getParameter("roles");
+            String groups = request.getParameter("groups");
+            String users = request.getParameter("users");
+            String permissions = request.getParameter("permissions");
+            
+            Page page = this.pageManager.getPage(path);
+            Fragment fragment = page.getFragmentById(fragmentId);
+            
+            if (fragment == null)
+            {
+                throw new IllegalStateException("Cannot find fragment: " + fragmentId);
+            }
+            
+            SecurityConstraints constraints = fragment.getSecurityConstraints();
+            
+            List constraintList = null;
+            
+            if (constraints != null)
+            {
+                constraintList = constraints.getSecurityConstraints();
+                
+                if (constraintList != null)
+                {
+                    for (Iterator it = constraintList.iterator(); it.hasNext(); )
+                    {
+                        SecurityConstraint constraint = (SecurityConstraint) it.next();
+                        
+                        Set removeRoleSet = convertToSet(roles, DELIMITERS);
+                        Set removeGroupSet = convertToSet(groups, DELIMITERS);
+                        Set removeUserSet = convertToSet(users, DELIMITERS);
+                        
+                        List roleList = constraint.getRoles();
+                        List groupList = constraint.getGroups();
+                        List userList = constraint.getUsers();
+                        
+                        if (equalsSetAndList(removeRoleSet, roleList) &&
+                            equalsSetAndList(removeGroupSet, groupList) &&
+                            equalsSetAndList(removeUserSet, userList))
+                        {
+                            it.remove();
+                            break;
+                        }
+                    }
+                }
+            }
+            
+            if (constraints != null && constraintList != null)
+            {
+                constraints.setSecurityConstraints(constraintList);
+            }
+            
+            fragment.setSecurityConstraints(constraints.isEmpty() ? null : constraints);
+            this.pageManager.updatePage(page);
+        }
+        catch (Exception e)
+        {
+            throw new PortletException("Failed to remove security constraint.", e);
+        }
+    }
+
+    private void updateSecurityConstraintRefs(ActionRequest request, ActionResponse response) throws PortletException, IOException
+    {
+        try
+        {
+            String path = request.getParameter("path");
+            String fragmentId = request.getParameter("fragment");
+            String [] securityConstraintRefs = request.getParameterValues("securityConstraintRef");
+            
+            Page page = this.pageManager.getPage(path);
+            Fragment fragment = page.getFragmentById(fragmentId);
+            
+            if (fragment == null)
+            {
+                throw new IllegalStateException("Cannot find fragment: " + fragmentId);
+            }
+            
+            SecurityConstraints constraints = fragment.getSecurityConstraints();
+            
+            if (constraints == null)
+            {
+                constraints = fragment.newSecurityConstraints();
+            }
+            
+            Set constraintRefSet = new HashSet();
+            
+            if (securityConstraintRefs != null)
+            {
+                for (int i = 0; i < securityConstraintRefs.length; i++)
+                {
+                    if (!"".equals(securityConstraintRefs[i]))
+                    {
+                        constraintRefSet.add(securityConstraintRefs[i]);
+                    }
+                }
+            }
+            
+            constraints.setSecurityConstraintsRefs(constraintRefSet.isEmpty() ? null : new ArrayList(constraintRefSet));
+            fragment.setSecurityConstraints(constraints.isEmpty() ? null : constraints);
+            this.pageManager.updatePage(page);
+        }
+        catch (Exception e)
+        {
+            throw new PortletException("Failed to remove security constraint.", e);
+        }
+    }
+    
+    private Set convertToSet(String s, String delimiters)
+    {
+        Set set = new HashSet();
+        
+        String [] tokens = StringUtils.tokenizeToStringArray(s, delimiters, true, true);
+            
+        if (tokens != null)
+        {
+            for (int i = 0; i < tokens.length; i++)
+            {
+                set.add(tokens[i]);
+            }
+        }
+        
+        return set;
+    }
+    
+    private boolean equalsSetAndList(Set set, List list)
+    {
+        if (set == null)
+        {
+            return (list == null || list.isEmpty());
+        }
+        else if (list == null)
+        {
+            return set.isEmpty();
+        }
+        else
+        {
+            return set.equals(new HashSet(list));
+        }
+    }
+    
+}
\ No newline at end of file

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/resources/CustomConfigModeResources.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/resources/CustomConfigModeResources.properties?rev=593513&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/resources/CustomConfigModeResources.properties (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/resources/CustomConfigModeResources.properties Fri Nov  9 04:48:34 2007
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+# $Id: CustomConfigModeResources.properties 348264 2005-11-22 22:06:45Z taylor $
+#
+
+customconfigmode.label.roles=Roles
+customconfigmode.label.groups=Groups
+customconfigmode.label.users=Users
+customconfigmode.label.permissions=Permissions
+
+customconfigmode.label.action=Action
+customconfigmode.label.newconstraint=New Constraint
+customconfigmode.label.remove=Remove
+customconfigmode.label.save=Save
+customconfigmode.label.cancel=Cancel
+customconfigmode.label.view=View
+customconfigmode.label.constraintref=Security Constraint Ref.
+customconfigmode.label.noconstraintref=No Constraint

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/resources/CustomConfigModeResources_ko.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/resources/CustomConfigModeResources_ko.properties?rev=593513&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/resources/CustomConfigModeResources_ko.properties (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/java/org/apache/jetspeed/portlets/custom/resources/CustomConfigModeResources_ko.properties Fri Nov  9 04:48:34 2007
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+# $Id: CustomConfigModeResources_ko.properties 348264 2005-11-22 22:06:45Z taylor $
+#
+
+customconfigmode.label.roles=\uc5ed\ud560
+customconfigmode.label.groups=\uadf8\ub8f9
+customconfigmode.label.users=\uc0ac\uc6a9\uc790
+customconfigmode.label.permissions=\uad8c\ud55c
+
+customconfigmode.label.action=\uc791\uc5c5
+customconfigmode.label.newconstraint=\uc2e0\uaddc\ub4f1\ub85d
+customconfigmode.label.remove=\uc0ad\uc81c
+customconfigmode.label.save=\uc800\uc7a5
+customconfigmode.label.cancel=\ucde8\uc18c
+customconfigmode.label.view=\ubcf4\uae30
+customconfigmode.label.constraintref=\uc81c\uc57d \ucc38\uc870
+customconfigmode.label.noconstraintref=\uc5c6\uc74c

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/portlet.xml?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/portlet.xml (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/portlet.xml Fri Nov  9 04:48:34 2007
@@ -1869,5 +1869,30 @@
       </preference>
     </portlet-preferences>
   </portlet>  
+  
+  <portlet id="CustomConfigModePortlet">    
+    <portlet-name>CustomConfigModePortlet</portlet-name>
+    <display-name>Custom Config Mode Portlet</display-name>
+    <description>Provides common custom config mode edit portlet.</description>
+    <portlet-class>org.apache.jetspeed.portlets.custom.CustomConfigModePortlet</portlet-class>
+    <init-param>
+       <description>This parameter sets the template used in config mode.</description>
+       <name>ConfigPage</name>
+       <value>/WEB-INF/view/custom/config-mode.vm</value>
+    </init-param>
+    <expiration-cache>0</expiration-cache>
+    <supports>
+      <mime-type>text/html</mime-type>
+      <portlet-mode>config</portlet-mode>
+    </supports>
+    <supported-locale>en</supported-locale>
+    <resource-bundle>org.apache.jetspeed.portlets.custom.resources.CustomConfigModeResources</resource-bundle>
+    <portlet-info>
+      <title>Custom Config Mode</title>
+      <short-title>Config</short-title>
+      <keywords>admin,config,custom</keywords>
+    </portlet-info>
+  </portlet>
+  
 </portlet-app>
 

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/custom/config-mode.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/custom/config-mode.vm?rev=593513&view=auto
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/custom/config-mode.vm (added)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/custom/config-mode.vm Fri Nov  9 04:48:34 2007
@@ -0,0 +1,175 @@
+#*
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+*#
+
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+#set($curPage = $renderRequest.getAttribute("org.apache.jetspeed.Page"))
+#set($curFrag = $renderRequest.getAttribute("org.apache.jetspeed.Fragment"))
+#set($constraintList = $curFrag.securityConstraints.securityConstraints)
+#set($constraintsRefList = $curFrag.securityConstraints.securityConstraintsRefs)
+#set($securityContraintRefList = $renderRequest.getAttribute("securityContraintRefList"))
+
+$renderResponse.setTitle($curFrag.getPortletContent().getTitle())
+
+#set($actionUrl = $renderResponse.createActionURL())     
+
+<br/>
+
+<div>
+  <table cellpadding="0" cellspacing="1" border="0">
+    <thead>
+      <tr>
+        <th align="center" class="portlet-section-header" nowrap>$MESSAGES.getString("customconfigmode.label.roles")</th>
+        <th align="center" class="portlet-section-header" nowrap>$MESSAGES.getString("customconfigmode.label.groups")</th>
+        <th align="center" class="portlet-section-header" nowrap>$MESSAGES.getString("customconfigmode.label.users")</th>
+        <th align="center" class="portlet-section-header" nowrap>$MESSAGES.getString("customconfigmode.label.permissions")</th>
+        <th align="center" class="portlet-section-header" nowrap>$MESSAGES.getString("customconfigmode.label.action")</th>
+      </tr>
+    </thead>
+    <tbody>
+    
+    #foreach ($constraint in $constraintList)
+      
+      #if ($velocityCount % 2 == 0)
+       #set($rowstyle = "portlet-section-body")
+      #else
+       #set($rowstyle = "portlet-section-alternate")
+      #end
+      
+      <tr>
+        <td class="$rowstyle">
+          $!{constraint.roles}
+        </td>
+        <td class="$rowstyle">
+          $!{constraint.groups}
+        </td>
+        <td class="$rowstyle">
+          $!{constraint.users}
+        </td>
+        <td class="$rowstyle">
+          $!{constraint.permissions}
+        </td>
+        <td class="$rowstyle">
+          <form method="POST" action="${actionUrl}">
+            <input type="hidden" name="action" value="removeConstraint">
+            <input type="hidden" name="path" value="${curPage.path}">
+            <input type="hidden" name="fragment" value="${curFrag.id}">
+            <input type="hidden" name="roles" value="$!{constraint.roles}">
+            <input type="hidden" name="groups" value="$!{constraint.groups}">
+            <input type="hidden" name="users" value="$!{constraint.users}">
+            <input type="hidden" name="permissions" value="$!{constraint.permissions}">
+            <input type="submit" value="$MESSAGES.getString("customconfigmode.label.remove")">
+          </form>
+        </td>
+      </tr>
+    #end
+      
+    </tbody>
+  </table>
+</div>
+
+<br/>
+
+<div>
+<form method="POST" action="${actionUrl}">
+  <table cellpadding="0" cellspacing="1" border="0">
+    <tbody>
+      <tr>
+        <td class="portlet-section-alternate" nowrap>$MESSAGES.getString("customconfigmode.label.constraintref")</td>
+        <td class="portlet-section-body" nowrap>
+          <input type="hidden" name="action" value="updateConstraintRefs">
+          <input type="hidden" name="path" value="${curPage.path}">
+          <input type="hidden" name="fragment" value="${curFrag.id}">
+          <select name="securityConstraintRef">
+            #if ($constraintsRefList)
+              <option value=""
+                #if ($constraintsRefList.isEmpty())
+                  selected
+                #end
+              >$MESSAGES.getString("customconfigmode.label.noconstraintref")</option>
+              #foreach ($securityContraintRef in $securityContraintRefList)
+                <option value="${securityContraintRef.name}"
+                  #if ($constraintsRefList.contains("${securityContraintRef.name}"))
+                    selected
+                  #end
+                >${securityContraintRef.name}</option>
+              #end
+            #else
+              <option value="" selected>$MESSAGES.getString("customconfigmode.label.noconstraintref")</option>
+              #foreach ($securityContraintRef in $securityContraintRefList)
+                <option value="${securityContraintRef.name}">${securityContraintRef.name}</option>
+              #end
+            #end
+          </select>
+          <input type="submit" value="$MESSAGES.getString("customconfigmode.label.save")">
+        </td>
+      </tr>
+    </tbody>
+  </table>
+</form>
+</div>
+
+<br/>
+
+<div>
+  <form method="POST" action="${actionUrl}">
+  <table cellpadding="0" cellspacing="1" border="0">
+    <thead>
+      <tr>
+        <th align="center" class="portlet-section-header" nowrap colspan="2">$MESSAGES.getString("customconfigmode.label.newconstraint")</th>
+      </tr>
+    </thead>
+    <tbody>
+      <tr>
+        <td class="portlet-section-alternate" nowrap>$MESSAGES.getString("customconfigmode.label.roles")</td>
+        <td class="portlet-section-body" nowrap>
+          <input type="hidden" name="action" value="addConstraint">
+          <input type="hidden" name="path" value="${curPage.path}">
+          <input type="hidden" name="fragment" value="${curFrag.id}">
+          <input type="text" name="roles" value="" />
+        </td>
+      </tr>
+      <tr>
+        <td class="portlet-section-alternate" nowrap>$MESSAGES.getString("customconfigmode.label.groups")</td>
+        <td class="portlet-section-body" nowrap>
+          <input type="text" name="groups" value="" />
+        </td>
+      </tr>
+      <tr>
+        <td class="portlet-section-alternate" nowrap>$MESSAGES.getString("customconfigmode.label.users")</td>
+        <td class="portlet-section-body" nowrap>
+          <input type="text" name="users" value="" />
+        </td>
+      </tr>
+      <tr>
+        <td class="portlet-section-alternate" nowrap>$MESSAGES.getString("customconfigmode.label.permissions")</td>
+        <td class="portlet-section-body" nowrap>
+          <input type="checkbox" name="permissions" value="view" checked />$MESSAGES.getString("customconfigmode.label.view")
+        </td>
+      </tr>
+      <tr>
+        <td class="portlet-section-alternate" nowrap colspan="2">
+          <input type="submit" value="$MESSAGES.getString("customconfigmode.label.save")">
+          <input type="reset" value="$MESSAGES.getString("customconfigmode.label.cancel")">
+        </td>
+      </tr>
+      
+    </tbody>
+  </table>
+  </form>
+</div>
+
+<br/>

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/commons/src/java/org/apache/jetspeed/portlet/PortletObjectProxy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/commons/src/java/org/apache/jetspeed/portlet/PortletObjectProxy.java?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/commons/src/java/org/apache/jetspeed/portlet/PortletObjectProxy.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/commons/src/java/org/apache/jetspeed/portlet/PortletObjectProxy.java Fri Nov  9 04:48:34 2007
@@ -43,6 +43,17 @@
 import org.apache.jetspeed.util.BaseObjectProxy;
 import org.apache.jetspeed.container.JetspeedPortletConfig;
 
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.portlet.UnavailableException;
+import org.apache.jetspeed.Jetspeed;
+import org.apache.jetspeed.components.portletregistry.PortletRegistry;
+import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
+import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
+import org.apache.pluto.om.servlet.WebApplicationDefinition;
+import org.apache.jetspeed.factory.PortletFactory;
+import org.apache.jetspeed.factory.PortletInstance;
+
 /**
  * PortletObjectProxy
  * 
@@ -51,14 +62,33 @@
  */
 public class PortletObjectProxy extends BaseObjectProxy
 {
-
+    
+    private static ThreadLocal tlPortletObjectProxied =
+        new ThreadLocal() {
+            protected synchronized Object initialValue() {
+                return new boolean [] { false };
+            }
+        };
+    
+    public static void setPortletObjectProxied(boolean portletObjectProxied)
+    {
+        ((boolean []) tlPortletObjectProxied.get())[0] = portletObjectProxied;
+    }
+        
+    public static boolean isPortletObjectProxied()
+    {
+        return ((boolean []) tlPortletObjectProxied.get())[0];
+    }
+    
     private static Method renderMethod;
+    private static Method processActionMethod;
     
     static 
     {
     	try 
         {
             renderMethod = Portlet.class.getMethod("render", new Class [] { RenderRequest.class, RenderResponse.class });
+            processActionMethod = Portlet.class.getMethod("processAction", new Class [] { ActionRequest.class, ActionResponse.class });
         } 
         catch (NoSuchMethodException e) 
         {
@@ -67,11 +97,15 @@
     }
     
     private Object portletObject;
+    private PortletInstance customConfigModePortletInstance;
     private boolean genericPortletInvocable;
     private Method portletDoEditMethod;
     private ContentTypeSet portletContentTypeSet;
+    private boolean autoSwitchEditDefaultsModeToEditMode;
+    private boolean autoSwitchConfigMode;
+    private String customConfigModePortletUniqueName;
     
-    public static Object createProxy(Object proxiedObject)
+    public static Object createProxy(Object proxiedObject, boolean autoSwitchEditDefaultsModeToEditMode, boolean autoSwitchConfigMode, String customConfigModePortletUniqueName)
     {
         Class proxiedClass = proxiedObject.getClass();
         ClassLoader classLoader = proxiedClass.getClassLoader();
@@ -86,13 +120,16 @@
             proxyInterfaces = new Class [] { Portlet.class };
         }
         
-        InvocationHandler handler = new PortletObjectProxy(proxiedObject);
+        InvocationHandler handler = new PortletObjectProxy(proxiedObject, autoSwitchEditDefaultsModeToEditMode, autoSwitchConfigMode, customConfigModePortletUniqueName);
         return Proxy.newProxyInstance(classLoader, proxyInterfaces, handler);
     }
 
-    private PortletObjectProxy(Object portletObject)
+    private PortletObjectProxy(Object portletObject, boolean autoSwitchEditDefaultsModeToEditMode, boolean autoSwitchConfigMode, String customConfigModePortletUniqueName)
     {
         this.portletObject = portletObject;
+        this.autoSwitchEditDefaultsModeToEditMode = autoSwitchEditDefaultsModeToEditMode;
+        this.autoSwitchConfigMode = autoSwitchConfigMode;
+        this.customConfigModePortletUniqueName = customConfigModePortletUniqueName;
         
         if (portletObject instanceof GenericPortlet)
         {
@@ -124,6 +161,10 @@
                 proxyRender((RenderRequest) args[0], (RenderResponse) args[1]);
                 return null;
             }
+            else if (processActionMethod.equals(method))
+            {
+                proxyProcessAction((ActionRequest) args[0], (ActionResponse) args[1]);
+            }
             else
             {
                 result = method.invoke(this.portletObject, args);
@@ -143,12 +184,18 @@
 
     protected void proxyRender(RenderRequest request, RenderResponse response) throws PortletException, IOException, Exception
     {
+        PortletMode mode = request.getPortletMode();
+        
+        boolean autoSwitchConfigMode = false;
         boolean autoSwitchToEditMode = false;
         
-        if (this.genericPortletInvocable)
+        if (this.autoSwitchConfigMode && JetspeedActions.CONFIG_MODE.equals(mode))
+        {
+            autoSwitchConfigMode = true;
+        }
+        
+        if (this.autoSwitchEditDefaultsModeToEditMode && this.genericPortletInvocable)
         {
-            PortletMode mode = request.getPortletMode();
-            
             if (JetspeedActions.EDIT_DEFAULTS_MODE.equals(mode))
             {
                 if (!isSupportingEditDefaultsMode((GenericPortlet) this.portletObject))
@@ -158,7 +205,24 @@
             }
         }
         
-        if (autoSwitchToEditMode)
+        if (autoSwitchConfigMode)
+        {
+            try
+            {
+                if (this.customConfigModePortletInstance == null)
+                {
+                    refreshCustomConfigModePortletInstance();
+                }
+                
+                this.customConfigModePortletInstance.render(request, response);
+            }
+            catch (UnavailableException e)
+            {
+                refreshCustomConfigModePortletInstance();
+                this.customConfigModePortletInstance.render(request, response);
+            }
+        }
+        else if (autoSwitchToEditMode)
         {
             GenericPortlet genericPortlet = (GenericPortlet) this.portletObject;
             
@@ -178,6 +242,40 @@
             ((Portlet) this.portletObject).render(request, response);
         }
     }
+
+    protected void proxyProcessAction(ActionRequest request, ActionResponse response) throws PortletException, IOException, Exception
+    {
+        PortletMode mode = request.getPortletMode();
+        
+        boolean autoSwitchConfigMode = false;
+        
+        if (this.autoSwitchConfigMode && JetspeedActions.CONFIG_MODE.equals(mode))
+        {
+            autoSwitchConfigMode = true;
+        }
+        
+        if (autoSwitchConfigMode)
+        {
+            try
+            {
+                if (this.customConfigModePortletInstance == null)
+                {
+                    refreshCustomConfigModePortletInstance();
+                }
+                
+                this.customConfigModePortletInstance.processAction(request, response);
+            }
+            catch (UnavailableException e)
+            {
+                refreshCustomConfigModePortletInstance();
+                this.customConfigModePortletInstance.processAction(request, response);
+            }
+        }
+        else
+        {
+            ((Portlet) this.portletObject).processAction(request, response);
+        }
+    }
     
     private boolean isSupportingEditDefaultsMode(GenericPortlet portlet)
     {
@@ -201,4 +299,31 @@
         
         return false;
     }
+       
+    private void refreshCustomConfigModePortletInstance()
+    {
+        try
+        {
+            PortletRegistry registry = (PortletRegistry) Jetspeed.getComponentManager().getComponent("portletRegistry");
+            PortletFactory portletFactory = (PortletFactory) Jetspeed.getComponentManager().getComponent("portletFactory");
+            ServletContext portalAppContext = ((ServletConfig) Jetspeed.getComponentManager().getComponent("ServletConfig")).getServletContext();
+            
+            PortletDefinitionComposite portletDef = (PortletDefinitionComposite) registry.getPortletDefinitionByUniqueName(this.customConfigModePortletUniqueName);
+            MutablePortletApplication portletApp = (MutablePortletApplication) portletDef.getPortletApplicationDefinition();
+            WebApplicationDefinition webAppDef = portletApp.getWebApplicationDefinition();
+            String portletAppName = webAppDef.getContextRoot();
+            ServletContext portletAppContext = portalAppContext.getContext(portletAppName);
+            
+            setPortletObjectProxied(true);
+            this.customConfigModePortletInstance = portletFactory.getPortletInstance(portletAppContext, portletDef);
+        }
+        catch (Exception e)
+        {
+        }
+        finally
+        {
+            setPortletObjectProxied(false);
+        }
+    }
+    
 }

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java Fri Nov  9 04:48:34 2007
@@ -40,6 +40,7 @@
 {
     private static ThreadLocal actionResourcesMap = new ThreadLocal();
     private boolean editMaximizesOption = false;
+    private boolean configMaximizesOption = false;
     private boolean editDefaultsMaximizesOption = false;
     
     /**
@@ -115,13 +116,18 @@
 
         WindowState ws;
         PortletMode pm;
-        if (editMaximizesOption || editDefaultsMaximizesOption)
+        if (editMaximizesOption || configMaximizesOption || editDefaultsMaximizesOption)
         {
             if (editMaximizesOption && template.getAction().equals(JetspeedActions.EDIT))
             {
                 ws = WindowState.MAXIMIZED;
                 pm = template.getCustomMode();
             }
+            else if (configMaximizesOption && template.getAction().equals(JetspeedActions.CONFIG))
+            {
+                ws = WindowState.MAXIMIZED;
+                pm = template.getCustomMode();
+            }
             else if (editDefaultsMaximizesOption && template.getAction().equals(JetspeedActions.EDIT_DEFAULTS))
             {
                 ws = WindowState.MAXIMIZED;
@@ -211,6 +217,16 @@
     public boolean getMaximizeOnEdit()
     {
         return this.editMaximizesOption;
+    }
+    
+    public void setMaximizeOnConfig(boolean maxOnConfig)
+    {
+        this.configMaximizesOption = maxOnConfig;
+    }
+    
+    public boolean getMaximizeOnConfig()
+    {
+        return this.configMaximizesOption;
     }
     
     public void setMaximizeOnEditDefaults(boolean maxOnEditDefaults)

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/CustomDecoratorActionsFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/CustomDecoratorActionsFactory.java?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/CustomDecoratorActionsFactory.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/CustomDecoratorActionsFactory.java Fri Nov  9 04:48:34 2007
@@ -35,6 +35,7 @@
 public class CustomDecoratorActionsFactory extends AbstractDecoratorActionsFactory
 {
     private static final DecoratorActionTemplate ABOUT_MODE_TEMPLATE = new DecoratorActionTemplate(JetspeedActions.ABOUT_MODE);
+    private static final DecoratorActionTemplate CONFIG_MODE_TEMPLATE = new DecoratorActionTemplate(JetspeedActions.CONFIG_MODE);
     private static final DecoratorActionTemplate EDIT_DEFAULTS_MODE_TEMPLATE = new DecoratorActionTemplate(JetspeedActions.EDIT_DEFAULTS_MODE);
     //private static final DecoratorActionTemplate PREVIEW_MODE_TEMPLATE = new DecoratorActionTemplate(JetspeedActions.PREVIEW_MODE);
     private static final DecoratorActionTemplate PRINT_MODE_TEMPLATE = new DecoratorActionTemplate(JetspeedActions.PRINT_MODE);
@@ -47,6 +48,7 @@
     {
         ArrayList list = new ArrayList(JetspeedActions.getStandardPortletModes());
         list.add(JetspeedActions.ABOUT_MODE);
+        list.add(JetspeedActions.CONFIG_MODE);
         list.add(JetspeedActions.EDIT_DEFAULTS_MODE);
         //list.add(JetspeedActions.PREVIEW_MODE);
         list.add(JetspeedActions.PRINT_MODE);
@@ -88,6 +90,20 @@
         }
         // else if (printModeIndex != -1)
         //   support switching to different modes once in "solo" state, even back to "print"
+        
+        int configModeIndex = actionTemplates.indexOf(CONFIG_MODE_TEMPLATE);
+        if (configModeIndex != -1)
+        {
+            try
+            {
+                ContentPage page = rc.getPage();
+                page.checkAccess(JetspeedActions.CONFIG);
+            }
+            catch (SecurityException e)
+            {
+                actionTemplates.remove(configModeIndex);
+            }
+        }
         
         int editDefaultsModeIndex = actionTemplates.indexOf(EDIT_DEFAULTS_MODE_TEMPLATE);
         if (editDefaultsModeIndex != -1)

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/DecorationValve.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/DecorationValve.java?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/DecorationValve.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/DecorationValve.java Fri Nov  9 04:48:34 2007
@@ -89,7 +89,14 @@
     
     private boolean maxOnEdit = false;
     
+    private boolean maxOnConfig = false;
+    
     private boolean maxOnEditDefaults = false;
+    
+    /**
+     * When edit_defaults mode is not supported by a portlet, support the mode automatically.
+     */
+    private boolean autoSwitchingForConfigMode = false;
 
     /**
      * When edit_defaults mode is not supported by a portlet, support the mode automatically.
@@ -298,6 +305,7 @@
                 {
                     adapter = (DecoratorActionsFactory)Class.forName(decoratorActionsAdapterClassName).newInstance();
                     adapter.setMaximizeOnEdit(this.maxOnEdit);
+                    adapter.setMaximizeOnConfig(this.maxOnConfig);
                     adapter.setMaximizeOnEditDefaults(this.maxOnEditDefaults);
                 }
                 catch (Exception e)
@@ -643,6 +651,17 @@
         return this.maxOnEdit;
     }
     
+    public void setMaximizeOnConfig(boolean maxOnConfig)
+    {
+        this.maxOnConfig = maxOnConfig;
+        this.defaultDecoratorActionsFactory.setMaximizeOnConfig(maxOnConfig);
+    }
+    
+    public boolean getMaximizeOnConfig()
+    {
+        return this.maxOnConfig;
+    }
+    
     public void setMaximizeOnEditDefaults(boolean maxOnEditDefaults)
     {
         this.maxOnEditDefaults = maxOnEditDefaults;
@@ -664,8 +683,23 @@
         return this.autoSwitchingToEditDefaultsModes;
     }
     
+    public void setAutoSwitchingForConfigMode(boolean autoSwitchingForConfigMode)
+    {
+        this.autoSwitchingForConfigMode = autoSwitchingForConfigMode;
+    }
+    
+    public boolean getAutoSwitchingForConfigMode()
+    {
+        return this.autoSwitchingForConfigMode;
+    }
+    
     private boolean isAutoSwitchableCustomMode(ContentTypeSet content, PortletMode customMode)
     {
+        if (this.autoSwitchingForConfigMode && JetspeedActions.CONFIG_MODE.equals(customMode))
+        {
+            return true;
+        }
+        
         if (this.autoSwitchingToEditDefaultsModes)
         {
             if (content.supportsPortletMode(PortletMode.EDIT) && JetspeedActions.EDIT_DEFAULTS_MODE.equals(customMode))

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/DecoratorActionsFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/DecoratorActionsFactory.java?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/DecoratorActionsFactory.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/DecoratorActionsFactory.java Fri Nov  9 04:48:34 2007
@@ -50,6 +50,19 @@
     public boolean getMaximizeOnEdit();
     
     /**
+     * Maximize portlet window when going into config mode
+     * @param maxOnConfig
+     */
+    void setMaximizeOnConfig(boolean maxOnConfig);
+    
+    /**
+     * Maximize portlet window when going into edit_defaults mode
+     * 
+     * @return
+     */
+    public boolean getMaximizeOnConfig();
+    
+    /**
      * Maximize portlet window when going into edit_defaults mode
      * @param maxOnEditDefaults
      */

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions.properties?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions.properties (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions.properties Fri Nov  9 04:48:34 2007
@@ -23,6 +23,7 @@
 
 ## extended actions
 about=About
+config=Configure
 edit_defaults=Edit defaults
 preview=Preview
 print=Print

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_en.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_en.properties?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_en.properties (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_en.properties Fri Nov  9 04:48:34 2007
@@ -23,6 +23,7 @@
 
 ## extended actions
 about=About
+config=Configure
 edit_defaults=Edit defaults
 preview=Preview
 print=Print

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ja.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ja.properties?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ja.properties (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ja.properties Fri Nov  9 04:48:34 2007
@@ -23,6 +23,7 @@
 
 ## extended actions
 about=About
+config=Configure
 edit_defaults=Edit defaults
 preview=Preview
 print=\u5370\u5237

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ko.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ko.properties?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ko.properties (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ko.properties Fri Nov  9 04:48:34 2007
@@ -23,6 +23,7 @@
 
 ## extended actions
 about=\uc815\ubcf4
+config=\uc124\uc815
 edit_defaults=\uae30\ubcf8\uac12 \ud3b8\uc9d1
 preview=\ubbf8\ub9ac\ubcf4\uae30
 print=\uc778\uc1c4

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_nl.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_nl.properties?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_nl.properties (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_nl.properties Fri Nov  9 04:48:34 2007
@@ -23,6 +23,7 @@
 
 ## extended actions
 about=About
+config=Configure
 edit_defaults=Edit defaults
 preview=Preview
 print=Printen

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ua.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ua.properties?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ua.properties (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_ua.properties Fri Nov  9 04:48:34 2007
@@ -23,6 +23,7 @@
 
 ## extended actions
 about=About
+config=Configure
 edit_defaults=Edit defaults
 preview=Preview
 print=\u0414\u0440\u0443\u043a

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_zh.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_zh.properties?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_zh.properties (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_zh.properties Fri Nov  9 04:48:34 2007
@@ -25,6 +25,7 @@
 
 ## extended actions
 about=About
+config=Configure
 edit_defaults=Edit defaults
 preview=Preview
 print=\u6253\u5370

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_zh_TW.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_zh_TW.properties?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_zh_TW.properties (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/decoration/resources/DecoratorActions_zh_TW.properties Fri Nov  9 04:48:34 2007
@@ -25,6 +25,7 @@
 
 ## extended actions
 about=About
+config=Configure
 edit_defaults=Edit defaults
 preview=Preview
 print=\u5217\u5370

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java Fri Nov  9 04:48:34 2007
@@ -35,6 +35,7 @@
 import org.apache.jetspeed.container.PortalAccessor;
 import org.apache.jetspeed.om.common.portlet.PortletApplication;
 import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
+import org.apache.jetspeed.portlet.PortletObjectProxy;
 import org.apache.pluto.om.portlet.PortletDefinition;
 
 /**
@@ -57,24 +58,59 @@
     private static final Log log = LogFactory.getLog(JetspeedPortletFactory.class);
     private final Map classLoaderMap;
     
-    private boolean portletProxyUsed = false;
-
     /**
-     * 
+     * Flag whether this factory will create proxy instances for actual portlet instances or not.
+     */
+    private boolean portletProxyUsed;
+    
+    /**
+     * Flag whether the instantiated proxy will switch edit_defaults mode to edit mode automatically or not.
+     */
+    private boolean autoSwitchEditDefaultsModeToEditMode;
+    
+    /**
+     * Flag whether the instantiated proxy will switch config mode to built-in config edit page or not.
      */
+    private boolean autoSwitchConfigMode;
+    
+    private String customConfigModePortletUniqueName;
+    
     public JetspeedPortletFactory()
     {
-        this(false);
+        this(false, false);
     }
     
-    public JetspeedPortletFactory(boolean portletProxyUsed)
+    public JetspeedPortletFactory(boolean autoSwitchConfigMode, boolean autoSwitchEditDefaultsModeToEditMode)
     {
         this.portletCache =  Collections.synchronizedMap(new HashMap());
         this.validatorCache = Collections.synchronizedMap(new HashMap());
         classLoaderMap = Collections.synchronizedMap(new HashMap());
         
+        this.autoSwitchConfigMode = autoSwitchConfigMode;
+        this.autoSwitchEditDefaultsModeToEditMode = autoSwitchEditDefaultsModeToEditMode;
+        
+        this.portletProxyUsed = (this.autoSwitchConfigMode || this.autoSwitchEditDefaultsModeToEditMode);
+    }
+    
+    public void setPortletProxyUsed(boolean portletProxyUsed)
+    {
         this.portletProxyUsed = portletProxyUsed;
     }
+    
+    public boolean getPortletProxyUsed()
+    {
+        return this.portletProxyUsed;
+    }
+    
+    public void setCustomConfigModePortletUniqueName(String customConfigModePortletUniqueName)
+    {
+        this.customConfigModePortletUniqueName = customConfigModePortletUniqueName;
+    }
+    
+    public String getCustomConfigModePortletUniqueName()
+    {
+        return this.customConfigModePortletUniqueName;
+    }
 
     public void registerPortletApplication(PortletApplication pa, ClassLoader cl)
         {
@@ -215,9 +251,9 @@
                 // method will wait for all its invocation threads to complete
                 // and thereby releasing all its ClassLoader locks as needed for local portlets.
                 
-                if (this.portletProxyUsed)
+                if (this.portletProxyUsed && !PortletObjectProxy.isPortletObjectProxied())
                 {
-                    portlet = new JetspeedPortletProxyInstance(pd.getName(), (Portlet)clazz.newInstance());
+                    portlet = new JetspeedPortletProxyInstance(pd.getName(), (Portlet)clazz.newInstance(), this.autoSwitchEditDefaultsModeToEditMode, this.autoSwitchConfigMode, this.customConfigModePortletUniqueName);
                 }
                 else
                 {

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletProxyInstance.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletProxyInstance.java?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletProxyInstance.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletProxyInstance.java Fri Nov  9 04:48:34 2007
@@ -29,8 +29,8 @@
  */
 public class JetspeedPortletProxyInstance extends JetspeedPortletInstance
 {
-    public JetspeedPortletProxyInstance(String portletName, Portlet portlet)
+    public JetspeedPortletProxyInstance(String portletName, Portlet portlet, boolean autoSwitchEditDefaultsModeToEditMode, boolean autoSwitchConfigMode, String customConfigModePortletUniqueName)
     {
-        super(portletName, (Portlet) PortletObjectProxy.createProxy(portlet));
+        super(portletName, (Portlet) PortletObjectProxy.createProxy(portlet, autoSwitchEditDefaultsModeToEditMode, autoSwitchConfigMode, customConfigModePortletUniqueName));
     }
 }

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/JetspeedActions.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/JetspeedActions.java?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/JetspeedActions.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/JetspeedActions.java Fri Nov  9 04:48:34 2007
@@ -37,6 +37,7 @@
 public class JetspeedActions
 {
     public static final PortletMode ABOUT_MODE = new PortletMode("about");
+    public static final PortletMode CONFIG_MODE = new PortletMode("config");
     public static final PortletMode EDIT_DEFAULTS_MODE = new PortletMode("edit_defaults");
     //public static final PortletMode PREVIEW_MODE = new PortletMode("preview");
     public static final PortletMode PRINT_MODE = new PortletMode("print");
@@ -53,6 +54,7 @@
     public static final String EDIT = PortletMode.EDIT.toString();
     public static final String HELP = PortletMode.HELP.toString();
     public static final String ABOUT = ABOUT_MODE.toString();
+    public static final String CONFIG = CONFIG_MODE.toString();
     public static final String EDIT_DEFAULTS = EDIT_DEFAULTS_MODE.toString();
     //public static final String PREVIEW = PREVIEW_MODE.toString();
     public static final String PRINT = PRINT_MODE.toString();

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/pipelines.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/pipelines.xml?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/pipelines.xml (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/pipelines.xml Fri Nov  9 04:48:34 2007
@@ -323,9 +323,14 @@
          -->
          <!-- When clicking on Edit Mode, also switch to Maximize -->
         <property name="maximizeOnEdit"><value>false</value></property>         
+         <!-- When clicking on Config Mode, also switch to Maximize -->
+        <property name="maximizeOnConfig"><value>false</value></property>         
          <!-- When clicking on Edit_defaults Mode, also switch to Maximize -->
         <property name="maximizeOnEditDefaults"><value>false</value></property>         
-        <property name="autoSwitchingToEditDefaultsModes"><value>false</value></property>
+        <!-- When config mode is not supported by a portlet, support the mode automatically. -->
+        <property name="autoSwitchingForConfigMode"><value>${supported.portletmode.autoswitch.config}</value></property>
+        <!-- When edit_defaults mode is not supported by a portlet, support the mode automatically. -->
+        <property name="autoSwitchingToEditDefaultsModes"><value>${supported.portletmode.autoswitch.edit_defaults}</value></property>
   </bean>
 
   <bean id="loginViewValve"

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/registry.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/registry.xml?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/registry.xml (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/registry.xml Fri Nov  9 04:48:34 2007
@@ -20,13 +20,20 @@
 
     <!-- Portlet Factory -->
     <bean id="portletFactory" class="org.apache.jetspeed.factory.JetspeedPortletFactory">
-        <!--
-        If the following argument is true, then this factory will create proxy instances for actual portlet instances. 
-        Proxy instances will switch edit_defaults mode to edit mode automatically for portlets not supporting edit_defaults mode.
-        -->
+        <!-- If the following constructor-arg is set to true, 
+        proxy instances will switch config mode to built-in custom config mode portlet. -->
         <constructor-arg index="0">
-            <value>false</value>
+            <value>${supported.portletmode.autoswitch.config}</value>
         </constructor-arg>
+        <!-- If the following constructor-arg is set to true, 
+        proxy instances will switch edit_defaults mode to edit mode automatically for portlets not supporting edit_defaults mode. -->
+        <constructor-arg index="1">
+            <value>${supported.portletmode.autoswitch.edit_defaults}</value>
+        </constructor-arg>
+        <!-- Surrogate portlet for config modes. -->
+        <property name="customConfigModePortletUniqueName">
+            <value>${supported.portletmode.autoswitch.config.surrogate.portlet}</value>
+        </property>
     </bean>
 
     <!-- Portlet Registry DAO-->

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/conf/jetspeed.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/conf/jetspeed.properties?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/conf/jetspeed.properties (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/conf/jetspeed.properties Fri Nov  9 04:48:34 2007
@@ -75,9 +75,17 @@
 supported.portletmode = help
 # extended
 supported.portletmode = about
+supported.portletmode = config
 supported.portletmode = edit_defaults
 supported.portletmode = print
 supported.portletmode = secure  # currently only used for testing purposes
+# auto-switching
+# switch config mode to built-in custom config mode portlet
+supported.portletmode.autoswitch.config = false
+# switch edit_defaults mode to edit mode automatically for portlets not supporting edit_defaults mode
+supported.portletmode.autoswitch.edit_defaults = false
+# auto-switching surrogate portlet for config mode
+supported.portletmode.autoswitch.config.surrogate.portlet = j2-admin::CustomConfigModePortlet
 
 # -------------------------------------------------------------------
 #  Window State Support

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/page.security
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/page.security?rev=593513&r1=593512&r2=593513&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/page.security (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/pages/page.security Fri Nov  9 04:48:34 2007
@@ -23,7 +23,7 @@
   <security-constraints-def name="admin">
     <security-constraint>
       <roles>admin</roles>
-      <permissions>view, edit, edit_defaults</permissions>
+      <permissions>view, edit, config, edit_defaults</permissions>
     </security-constraint>
   </security-constraints-def>
   <global-security-constraints-ref>admin</global-security-constraints-ref>
@@ -52,7 +52,7 @@
     </security-constraint>
     <security-constraint>
       <roles>admin</roles>
-      <permissions>view, edit, edit_defaults</permissions>
+      <permissions>view, edit, config, edit_defaults</permissions>
     </security-constraint>    
   </security-constraints-def>
   <security-constraints-def name="public-edit">
@@ -64,7 +64,7 @@
   <security-constraints-def name="AEUV">
     <security-constraint>
       <roles>admin</roles>
-      <permissions>view, edit, edit_defaults</permissions>
+      <permissions>view, edit, config, edit_defaults</permissions>
     </security-constraint>
     <security-constraint>
       <roles>user</roles>
@@ -79,7 +79,7 @@
     </security-constraint>
     <security-constraint>
       <roles>devmgr,admin</roles>
-      <permissions>view, edit, edit_defaults</permissions>
+      <permissions>view, edit, config, edit_defaults</permissions>
     </security-constraint>
   </security-constraints-def>
 
@@ -90,14 +90,14 @@
     </security-constraint>
     <security-constraint>
       <roles>admin</roles>
-      <permissions>view, edit, edit_defaults</permissions>
+      <permissions>view, edit, config, edit_defaults</permissions>
     </security-constraint>
   </security-constraints-def>
 
   <security-constraints-def name="delegated">
     <security-constraint>
       <roles>devmgr</roles>
-      <permissions>view, edit, edit_defaults</permissions>
+      <permissions>view, edit, config, edit_defaults</permissions>
     </security-constraint>
   </security-constraints-def>
  

Added: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/portlet/tigris/images/config.gif
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/portlet/tigris/images/config.gif?rev=593513&view=auto
==============================================================================
Binary file - no diff available.

Propchange: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/portlet/tigris/images/config.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



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