continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r447629 - in /maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components: buildDefinitionGroupSummaryComponent.jsp projectSummaryComponent.jsp
Date Mon, 18 Sep 2006 23:14:33 GMT
Author: carlos
Date: Mon Sep 18 16:14:32 2006
New Revision: 447629

URL: http://svn.apache.org/viewvc?view=rev&rev=447629
Log:
[CONTINUUM-862] Hide links for project group operations based on users permissions

Modified:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/projectSummaryComponent.jsp

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp?view=diff&rev=447629&r1=447628&r2=447629
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp
Mon Sep 18 16:14:32 2006
@@ -40,11 +40,14 @@
       </ec:column>
     </ec:row>
   </ec:table>
+
   <div class="functnbar3">
-    <ww:form action="buildDefinition!input.action" method="post" namespace="/">
-      <input type="hidden" name="projectGroupId" value="<ww:property value="${pageScope.buildDefinitionSummary.projectGroupId}"/>"/>
-      <ww:submit value="%{getText('add')}"/>
-    </ww:form>
+    <c:if test="${projectGroup.permissions.write}">
+      <ww:form action="buildDefinition!input.action" method="post" namespace="/">
+        <input type="hidden" name="projectGroupId" value="<ww:property value="${pageScope.buildDefinitionSummary.projectGroupId}"/>"/>
+        <ww:submit value="%{getText('add')}"/>
+      </ww:form>
+    </c:if>
   </div>
 
   <h3>Project Build Definitions</h3>
@@ -66,18 +69,22 @@
       <ec:column property="from" title="projectView.buildDefinition.from"/>
       <ec:column property="isDefault" title="projectView.buildDefinition.default"/>
       <ec:column property="actions" title="&nbsp;">
+
+        <c:if test="${projectGroup.permissions.write}">
           <ww:url id="editUrl" action="buildDefinition" method="input" namespace="/">
             <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
             <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
           </ww:url>
+          <ww:a href="%{editUrl}"><ww:text name="edit"/></ww:a>
+          &nbsp;
           <ww:url id="removeUrl" action="removeProjectBuildDefinition" namespace="/">
             <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
             <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
             <ww:param name="confirmed" value="false"/>
           </ww:url>
-        <ww:a href="%{editUrl}"><ww:text name="edit"/></ww:a>
-        &nbsp;
-        <ww:a href="%{removeUrl}"><ww:text name="delete"/></ww:a>
+          <ww:a href="%{removeUrl}"><ww:text name="delete"/></ww:a>
+        </c:if>
+
       </ec:column>
     </ec:row>
   </ec:table>

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/projectSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/projectSummaryComponent.jsp?view=diff&rev=447629&r1=447628&r2=447629
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/projectSummaryComponent.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/projectSummaryComponent.jsp
Mon Sep 18 16:14:32 2006
@@ -58,21 +58,23 @@
         </c:choose>
       </ec:column>
       <ec:column property="releaseAction" title="&nbsp;" width="1%">
-        <c:choose>
-          <c:when test="${pageScope.project.state == 2}">
-            <ww:url id="releaseProjectUrl" action="releaseProject!promptReleaseGoal.action"
namespace="/">
-              <ww:param name="projectId" value="${project.id}"/>
-            </ww:url>
-            <ww:a href="%{releaseProjectUrl}">
-              <img src="<ww:url value='/images/releaseproject.gif'/>" alt="Release
Project" title="Release Project"
-                border="0"/>
-            </ww:a>
-          </c:when>
-          <c:otherwise>
-            <img src="<ww:url value='/images/releaseproject_disabled.gif'/>" alt="Release
Project"
-              title="Release Project" border="0"/>
-          </c:otherwise>
-        </c:choose>
+        <c:if test="${pageScope.projectGroup.permissions.execute}">
+          <c:choose>
+            <c:when test="${pageScope.project.state == 2}">
+              <ww:url id="releaseProjectUrl" action="releaseProject!promptReleaseGoal.action"
namespace="/">
+                <ww:param name="projectId" value="${project.id}"/>
+              </ww:url>
+              <ww:a href="%{releaseProjectUrl}">
+                <img src="<ww:url value='/images/releaseproject.gif'/>" alt="Release
Project" title="Release Project"
+                  border="0"/>
+              </ww:a>
+            </c:when>
+            <c:otherwise>
+              <img src="<ww:url value='/images/releaseproject_disabled.gif'/>" alt="Release
Project"
+                title="Release Project" border="0"/>
+            </c:otherwise>
+          </c:choose>
+        </c:if>
       </ec:column>
       <ec:column property="deleteAction" title="&nbsp;" width="1%">
         <c:if test="${pageScope.projectGroup.permissions.write}">



Mime
View raw message