continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r755471 - in /continuum/trunk: continuum-security/src/main/java/org/apache/maven/continuum/security/ continuum-security/src/main/resources/META-INF/redback/ continuum-webapp/ continuum-webapp/src/main/java/org/apache/continuum/web/action/ c...
Date Wed, 18 Mar 2009 04:14:41 GMT
Author: ctan
Date: Wed Mar 18 04:14:40 2009
New Revision: 755471

URL: http://svn.apache.org/viewvc?rev=755471&view=rev
Log:
[CONTINUUM-2127] make configuration for distributed builds visible only if distributed build
is enabled. same goes with the configuration for parallel builds.

Submitted By: Jan Ancajas

Additional changes to the patch
- add continuum-manage-parallel-builds role
- secure BuildQueue action
- check individual permission for each distributed menu button


Added:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfBuildTypeEnabledTag.java
Modified:
    continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
    continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml
    continuum/trunk/continuum-webapp/pom.xml
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/DistributedReleasesAction.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/profilesList.jsp
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp

Modified: continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java?rev=755471&r1=755470&r2=755471&view=diff
==============================================================================
--- continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
(original)
+++ continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
Wed Mar 18 04:14:40 2009
@@ -123,4 +123,8 @@
     public static final String CONTINUUM_MANAGE_PURGING = "continuum-manage-purging";
 
     public static final String CONTINUUM_MANAGE_DISTRIBUTED_BUILDS = "continuum-manage-distributed-builds";
+    
+    public static final String CONTINUUM_VIEW_RELEASE = "continuum-view-release";
+
+    public static final String CONTINUUM_MANAGE_PARALLEL_BUILDS = "continuum-manage-parallel-builds";
 }

Modified: continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml?rev=755471&r1=755470&r2=755471&view=diff
==============================================================================
--- continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml (original)
+++ continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml Wed
Mar 18 04:14:40 2009
@@ -190,6 +190,16 @@
           <name>continuum-manage-distributed-builds</name>
           <description>Continuum Manage Distributed Builds</description>
         </operation>
+        <operation>
+          <id>continuum-view-release</id>
+          <name>continuum-view-release</name>
+          <description>Continuum View Release</description>
+        </operation>
+        <operation>
+          <id>continuum-manage-parallel-builds</id>
+          <name>continuum-manage-parallel-builds</name>
+          <description>Continuum Manage Parallel Builds</description>
+        </operation>
       </operations>
       <roles>
         <role>
@@ -212,6 +222,20 @@
               <operation>continuum-manage-distributed-builds</operation>
               <resource>global</resource>
             </permission>
+            <permission>
+              <id>continuum-view-release</id>
+              <name>Continuum View Release</name>
+              <permanent>true</permanent>
+              <operation>continuum-view-release</operation>
+              <resource>global</resource>
+            </permission>
+            <permission>
+              <id>continuum-manage-parallel-builds</id>
+              <name>Manage Continuum Parallel Builds</name>
+              <permanent>true</permanent>
+              <operation>continuum-manage-parallel-builds</operation>
+              <resource>global</resource>
+            </permission>
           </permissions>
           <parentRoles>
             <parentRole>system-administrator</parentRole>

Modified: continuum/trunk/continuum-webapp/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/pom.xml?rev=755471&r1=755470&r2=755471&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/pom.xml (original)
+++ continuum/trunk/continuum-webapp/pom.xml Wed Mar 18 04:14:40 2009
@@ -443,7 +443,7 @@
       <groupId>javax.servlet</groupId>
       <artifactId>jstl</artifactId>
       <version>1.1.2</version>
-      <scope>runtime</scope>
+      <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/DistributedReleasesAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/DistributedReleasesAction.java?rev=755471&r1=755470&r2=755471&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/DistributedReleasesAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/DistributedReleasesAction.java
Wed Mar 18 04:14:40 2009
@@ -6,13 +6,19 @@
 
 import org.apache.continuum.release.distributed.DistributedReleaseUtil;
 import org.apache.continuum.release.distributed.manager.DistributedReleaseManager;
+import org.apache.maven.continuum.security.ContinuumRoleConstants;
 import org.apache.maven.continuum.web.action.ContinuumActionSupport;
 import org.apache.maven.continuum.web.model.DistributedReleaseSummary;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.redback.integration.interceptor.SecureAction;
+import org.codehaus.redback.integration.interceptor.SecureActionBundle;
+import org.codehaus.redback.integration.interceptor.SecureActionException;
 /**
  * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="distributedRelease"
  */
 public class DistributedReleasesAction
     extends ContinuumActionSupport
+    implements SecureAction
 {
     private List<DistributedReleaseSummary> releasesSummary;
 
@@ -48,4 +54,14 @@
     {
         this.releasesSummary = releasesSummary;
     }
+    
+    public SecureActionBundle getSecureActionBundle()
+        throws SecureActionException
+    {
+        SecureActionBundle bundle = new SecureActionBundle();
+        bundle.setRequiresAuthentication( true );
+        bundle.addRequiredAuthorization( ContinuumRoleConstants.CONTINUUM_VIEW_RELEASE, Resource.GLOBAL
);
+
+        return bundle;
+    }
 }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java?rev=755471&r1=755470&r2=755471&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java
Wed Mar 18 04:14:40 2009
@@ -24,7 +24,12 @@
 import org.apache.continuum.buildmanager.BuildManagerException;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildQueue;
+import org.apache.maven.continuum.security.ContinuumRoleConstants;
 import org.apache.maven.continuum.web.action.ContinuumConfirmAction;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.redback.integration.interceptor.SecureAction;
+import org.codehaus.redback.integration.interceptor.SecureActionBundle;
+import org.codehaus.redback.integration.interceptor.SecureActionException;
 
 import com.opensymphony.xwork2.Preparable;
 
@@ -33,7 +38,7 @@
  */
 public class BuildQueueAction
     extends ContinuumConfirmAction
-    implements Preparable
+    implements Preparable, SecureAction
 {
     private String name;
 
@@ -149,6 +154,16 @@
         return SUCCESS;
     }
 
+    public SecureActionBundle getSecureActionBundle()
+        throws SecureActionException
+    {
+        SecureActionBundle bundle = new SecureActionBundle();
+        bundle.setRequiresAuthentication( true );
+        bundle.addRequiredAuthorization( ContinuumRoleConstants.CONTINUUM_MANAGE_PARALLEL_BUILDS,
Resource.GLOBAL );
+    
+        return bundle;
+    }
+
     public String getName()
     {
         return name;

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java?rev=755471&r1=755470&r2=755471&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
Wed Mar 18 04:14:40 2009
@@ -25,7 +25,6 @@
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.continuum.configuration.BuildAgentGroupConfiguration;
-import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.installation.InstallationService;
 import org.apache.maven.continuum.model.system.Installation;
 import org.apache.maven.continuum.model.system.Profile;

Added: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfBuildTypeEnabledTag.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfBuildTypeEnabledTag.java?rev=755471&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfBuildTypeEnabledTag.java
(added)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfBuildTypeEnabledTag.java
Wed Mar 18 04:14:40 2009
@@ -0,0 +1,71 @@
+package org.apache.maven.continuum.web.view.jsp.ui;
+
+import javax.annotation.Resource;
+import javax.servlet.jsp.JspTagException;
+import javax.servlet.jsp.jstl.core.ConditionalTagSupport;
+
+import org.apache.maven.continuum.Continuum;
+import org.apache.maven.continuum.configuration.ConfigurationService;
+import org.codehaus.plexus.redback.users.UserManager;
+import org.codehaus.plexus.spring.PlexusToSpringUtils;
+import org.springframework.context.ApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * ifBuildTypeEnabledTag:
+ *
+ * @author Jan Ancajas <jansquared@gmail.com>
+ * @version $Id: IfBuildTypeEnabledTag.java
+ */
+public class IfBuildTypeEnabledTag
+    extends ConditionalTagSupport
+{
+    private Continuum continuum;
+
+    private String buildType;
+
+    public static final String DISTRIBUTED = "distributed";
+
+    protected boolean condition()
+        throws JspTagException
+    {
+        
+        ApplicationContext applicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(
pageContext.getServletContext() );
+        this.setContinuum( (Continuum) applicationContext.getBean( PlexusToSpringUtils.buildSpringId(
Continuum.ROLE,
+                                                                                        
             "default" ) ) );
+
+        if ( continuum == null )
+        {
+            throw new JspTagException( "cannot lookup component:  " + Continuum.ROLE );
+        }
+
+        if ( DISTRIBUTED.equals( buildType ) )
+        {
+            return continuum.getConfiguration().isDistributedBuildEnabled();
+        }
+        
+        // left out 'parallel' buildType checking for cyclomatic complexity's sake :)
+        return !continuum.getConfiguration().isDistributedBuildEnabled();
+
+    }
+
+    public String getBuildType()
+    {
+        return buildType;
+    }
+
+    public void setBuildType( String buildType )
+    {
+        this.buildType = buildType;
+    }
+
+    public Continuum getContinuum()
+    {
+        return continuum;
+    }
+
+    public void setContinuum( Continuum continuum )
+    {
+        this.continuum = continuum;
+    }
+}

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=755471&r1=755470&r2=755471&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Wed Mar 18 04:14:40 2009
@@ -70,7 +70,6 @@
 menu.add.shellProject = Shell Project
 menu.administration = Administration
 menu.administration.configuration = Configuration
-menu.administration.build.queue = Build Queue
 menu.administration.appearance = Appearance
 menu.administration.profile = Build Environments
 menu.administration.installations = Installations
@@ -79,13 +78,16 @@
 menu.administration.userGroups = User Groups
 menu.administration.roles = Roles
 menu.administration.buildDefinitionTemplates = Build Definition Templates
-menu.administration.releases = Releases
 menu.account.options = My account
 user.edit.account = Edit user info
 menu.administration.queues = Queues
 menu.administration.repositories = Local Repositories
 menu.administration.purge = Purge Configurations
-menu.administration.buildAgents = Build Agents
+menu.distributedBuilds = Distributed Builds
+menu.distributedBuilds.buildAgents = Build Agents
+menu.distributedBuilds.releases = Releases
+menu.parallelBuilds = Parallel Builds
+menu.parallelBuilds.build.queue= Build Queue
 
 # ----------------------------------------------------------------------
 # Page: error

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld?rev=755471&r1=755470&r2=755471&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld Wed Mar 18 04:14:40
2009
@@ -130,5 +130,17 @@
       <rtexprvalue>true</rtexprvalue>
     </attribute>
   </tag>
+  
+  <tag>
+    <name>ifBuildTypeEnabled</name>
+    <tagclass>org.apache.maven.continuum.web.view.jsp.ui.IfBuildTypeEnabledTag</tagclass>
+    <bodycontent>JSP</bodycontent>
+    <info>build type tag</info>
+    <attribute>
+      <name>buildType</name>
+      <required>true</required>
+      <rtexprvalue>true</rtexprvalue>
+    </attribute>
+  </tag>
 
 </taglib>

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp?rev=755471&r1=755470&r2=755471&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp Wed
Mar 18 04:14:40 2009
@@ -59,20 +59,24 @@
                                    required="true" />
                     </td>
                   </tr>
-                  <tr>
-                    <td>
-                      <s:if test ="profile != null">
-                        <s:if test="profile.buildAgentGroup == null">
-                          <s:select label="%{getText('profile.build.agent.group')}" name="profile.buildAgentGroup"
list="buildAgentGroups" listValue="name"
-                                   value="-1" listKey="name" headerKey="" headerValue=""/>
+                  
+                  <c1:ifBuildTypeEnabled buildType="distributed">
+                    <tr>
+                      <td>
+                        <s:if test ="profile != null">
+                          <s:if test="profile.buildAgentGroup == null">
+                            <s:select label="%{getText('profile.build.agent.group')}"
name="profile.buildAgentGroup" list="buildAgentGroups" listValue="name"
+                                     value="-1" listKey="name" headerKey="" headerValue=""/>
+                          </s:if>
+                          <s:else>
+                            <s:select label="%{getText('profile.build.agent.group')}"
name="profile.buildAgentGroup" list="buildAgentGroups" listValue="name"
+                                     listKey="name" headerKey="" headerValue=""/>
+                          </s:else>
                         </s:if>
-                        <s:else>
-                          <s:select label="%{getText('profile.build.agent.group')}" name="profile.buildAgentGroup"
list="buildAgentGroups" listValue="name"
-                                   listKey="name" headerKey="" headerValue=""/>
-                        </s:else>
-                      </s:if>
-                    </td>
-                  </tr>
+                      </td>
+                    </tr>
+                  </c1:ifBuildTypeEnabled>
+                  
                 </tbody>
               </table>
               <div class="functnbar3">

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/profilesList.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/profilesList.jsp?rev=755471&r1=755470&r2=755471&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/profilesList.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/profilesList.jsp Wed
Mar 18 04:14:40 2009
@@ -66,7 +66,9 @@
             </c:if>
           </ul>
         </ec:column>
-        <ec:column property="buildAgentGroup" title="profilesList.buildAgentGroup.label"
style="white-space: nowrap" />                
+        <c1:ifBuildTypeEnabled buildType="distributed">
+          <ec:column property="buildAgentGroup" title="profilesList.buildAgentGroup.label"
style="white-space: nowrap" />
+        </c1:ifBuildTypeEnabled>                
         <ec:column property="id" title="&nbsp;" width="1%">
           <a href="editBuildEnv!edit.action?profile.id=<c:out value="${pageScope.profile.id}"/>">
             <img src="<s:url value='/images/edit.gif' includeParams="none"/>" alt="<s:text
name='edit'/>" title="<s:text name='edit'/>" border="0" />

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp?rev=755471&r1=755470&r2=755471&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp Wed Mar
18 04:14:40 2009
@@ -72,16 +72,18 @@
             <s:textfield label="%{getText('schedule.quietPeriod.label')}" name="delay">
                 <s:param name="desc"><p><s:text name="schedule.quietPeriod.message"/></p></s:param>
             </s:textfield>
-    	                
-            <s:optiontransferselect label="%{getText('schedule.buildqueues.label')}" name="availableBuildQueues"
-                list="availableBuildQueues" size="8" multiple="true" emptyOption="false"
-                doubleName="selectedBuildQueues" doubleList="selectedBuildQueues" doubleSize="8"

-                doubleMultiple="true" doubleEmptyOption="false"
-                addAllToRightOnclick="selectAllOptions(document.getElementById('saveSchedule_availableBuildQueues'));selectAllOptions(document.getElementById('saveSchedule_selectedBuildQueues'));"
-				addToRightOnclick="selectAllOptions(document.getElementById('saveSchedule_availableBuildQueues'));selectAllOptions(document.getElementById('saveSchedule_selectedBuildQueues'));"
-				addAllToLeftOnclick="selectAllOptions(document.getElementById('saveSchedule_availableBuildQueues'));selectAllOptions(document.getElementById('saveSchedule_selectedBuildQueues'));"
-				addToLeftOnclick="selectAllOptions(document.getElementById('saveSchedule_availableBuildQueues'));selectAllOptions(document.getElementById('saveSchedule_selectedBuildQueues'));"
-                />
+    	      
+            <c1:ifBuildTypeEnabled buildType="parallel">          
+              <s:optiontransferselect label="%{getText('schedule.buildqueues.label')}"
name="availableBuildQueues"
+                  list="availableBuildQueues" size="8" multiple="true" emptyOption="false"
+                  doubleName="selectedBuildQueues" doubleList="selectedBuildQueues" doubleSize="8"

+                  doubleMultiple="true" doubleEmptyOption="false"
+                  addAllToRightOnclick="selectAllOptions(document.getElementById('saveSchedule_availableBuildQueues'));selectAllOptions(document.getElementById('saveSchedule_selectedBuildQueues'));"
+  				addToRightOnclick="selectAllOptions(document.getElementById('saveSchedule_availableBuildQueues'));selectAllOptions(document.getElementById('saveSchedule_selectedBuildQueues'));"
+  				addAllToLeftOnclick="selectAllOptions(document.getElementById('saveSchedule_availableBuildQueues'));selectAllOptions(document.getElementById('saveSchedule_selectedBuildQueues'));"
+  				addToLeftOnclick="selectAllOptions(document.getElementById('saveSchedule_availableBuildQueues'));selectAllOptions(document.getElementById('saveSchedule_selectedBuildQueues'));"
+                  />
+             </c1:ifBuildTypeEnabled>   
                                        
             <s:checkbox label="%{getText('schedule.enabled.label')}" name="active" value="active"
fieldValue="true">
                 <s:param name="desc"><p><s:text name="schedule.enabled.message"/></p></s:param>

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp?rev=755471&r1=755470&r2=755471&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp Wed
Mar 18 04:14:40 2009
@@ -19,6 +19,7 @@
 
 <%@ taglib uri="/struts-tags" prefix="s" %>
 <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %>
+<%@ taglib uri="continuum" prefix="c1" %>
 <%@ taglib uri="http://plexus.codehaus.org/redback/taglib-1.0" prefix="redback" %>
 
 <s:i18n name="localization.Continuum">
@@ -38,12 +39,7 @@
           <s:text name="menu.continuum.showProjectGroups"/>
         </s:a>
       </div>
-      <div class="body">
-        <s:url id="releasesUrl" action="viewReleases" namespace="/" includeParams="none"/>
-        <s:a href="%{releasesUrl}">
-          <s:text name="menu.administration.releases"/>
-        </s:a>
-      </div> 
+ 
     </div>
   </div>
 
@@ -95,14 +91,6 @@
       </div>
       <div>
         <redback:ifAuthorized permission="continuum-manage-repositories">
-          <s:url id="buildQueueListUrl" action="buildQueueList" namespace="/admin" includeParams="none"/>
-          <div class="body">
-            <s:a href="%{buildQueueListUrl}">
-              <s:text name="menu.administration.build.queue"/>
-            </s:a>
-          </div>
-        </redback:ifAuthorized>
-        <redback:ifAuthorized permission="continuum-manage-repositories">
           <s:url id="repositoryListUrl" action="repositoryList" namespace="/admin" includeParams="none"/>
           <div class="body">
             <s:a href="%{repositoryListUrl}">
@@ -172,16 +160,6 @@
             </s:a>
           </div>
         </redback:ifAuthorized>
-        <redback:ifAuthorized permission="continuum-manage-distributed-builds">
-          <s:url id="buildAgentList" action="buildAgentList" namespace="/security" includeParams="none"/>
-          <div class="body">
-            <s:a href="%{buildAgentList}">
-              <s:text name="menu.administration.buildAgents"/>
-            </s:a>
-          </div>
-        </redback:ifAuthorized>
-        <redback:ifAuthorized permission="continuum-manage-distributed-builds">
-        </redback:ifAuthorized>
         <redback:ifAuthorized permission="continuum-manage-users">
           <s:url id="userListUrl" action="userlist" namespace="/security" includeParams="none"/>
           <div class="body">
@@ -200,6 +178,52 @@
     </div>
   </redback:ifAnyAuthorized>
 
+  <c1:ifBuildTypeEnabled buildType="distributed">
+    <redback:ifAnyAuthorized permissions="continuum-manage-distributed-builds,continuum-view-release">
+      <div id="projectmenu" class="toolgroup">
+        <div class="label">
+          <s:text name="menu.distributedBuilds"/>
+        </div>    
+        <div>
+          <redback:ifAuthorized permission="continuum-manage-distributed-builds"> 
  
+            <s:url id="buildAgentList" action="buildAgentList" namespace="/security" includeParams="none"
/>
+            <div class="body">
+              <s:a href="%{buildAgentList}">
+                <s:text name="menu.distributedBuilds.buildAgents"/>
+              </s:a>
+            </div>
+          </redback:ifAuthorized>
+          <redback:ifAuthorized permission="continuum-view-release">
+            <s:url id="releasesUrl" action="viewReleases" namespace="/" includeParams="none"/>
+            <div class="body">
+              <s:a href="%{releasesUrl}">
+                <s:text name="menu.distributedBuilds.releases"/>
+              </s:a>
+            </div>
+          </redback:ifAuthorized>            
+        </div>
+      </div>
+    </redback:ifAnyAuthorized>
+  </c1:ifBuildTypeEnabled>
+  
+  <c1:ifBuildTypeEnabled buildType="parallel">
+    <redback:ifAuthorized permission="continuum-manage-parallel-builds">
+      <div id="projectmenu" class="toolgroup">
+        <div class="label">
+          <s:text name="menu.parallelBuilds"/>
+        </div>    
+        <div>
+          <s:url id="buildQueueListUrl" action="buildQueueList" namespace="/admin" includeParams="none"/>
+          <div class="body">
+            <s:a href="%{buildQueueListUrl}">
+              <s:text name="menu.parallelBuilds.build.queue"/>
+            </s:a>
+          </div>          
+        </div>
+      </div>
+    </redback:ifAuthorized>
+  </c1:ifBuildTypeEnabled>
+  
   <div id="projectmenu" class="toolgroup">
     <div class="label"><s:text name="legend.title"/></div>
     <div id="legend">



Mime
View raw message