continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r447480 - in /maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp: components/buildDefinitionSummaryComponent.jsp components/projectSummaryComponent.jsp projectGroupMembers.jsp projectView.jsp
Date Mon, 18 Sep 2006 17:38:06 GMT
Author: carlos
Date: Mon Sep 18 10:38:05 2006
New Revision: 447480

URL: http://svn.apache.org/viewvc?view=rev&rev=447480
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/buildDefinitionSummaryComponent.jsp
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/projectSummaryComponent.jsp
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupMembers.jsp
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectView.jsp

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/buildDefinitionSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/buildDefinitionSummaryComponent.jsp?view=diff&rev=447480&r1=447479&r2=447480
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/buildDefinitionSummaryComponent.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/components/buildDefinitionSummaryComponent.jsp
Mon Sep 18 10:38:05 2006
@@ -18,36 +18,38 @@
       <ec:column property="scheduleName" title="schedule"/>
       <ec:column property="from" title="projectView.buildDefinition.from"/>
       <ec:column property="isDefault" title="projectView.buildDefinition.default"/>
-      <ec:column property="actions" title="&nbsp;">
-        <!-- if the from is PROJECT then render the links differently -->
-        <ww:if test="${pageScope.buildDefinitionSummary.from == 'PROJECT'}">
-          <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: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:if>
-        <ww:else>
-          <ww:url id="editUrl" action="buildDefinition" method="input" namespace="/">
-            <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
-            <ww:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</ww:param>
-            <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
-          </ww:url>
-          <ww:url id="removeUrl" action="removeGroupBuildDefinition" namespace="/">
-            <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
-            <ww:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</ww:param>
-            <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
-            <ww:param name="confirmed" value="false"/>
-          </ww:url>
-        </ww:else>
-        <ww:a href="%{editUrl}"><ww:text name="edit"/></ww:a>
-        &nbsp;
-        <ww:a href="%{removeUrl}"><ww:text name="delete"/></ww:a>
-      </ec:column>
+      <c:if test="${projectGroup.permissions.write}">
+        <ec:column property="actions" title="&nbsp;">
+          <!-- if the from is PROJECT then render the links differently -->
+          <ww:if test="${pageScope.buildDefinitionSummary.from == 'PROJECT'}">
+            <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: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:if>
+          <ww:else>
+            <ww:url id="editUrl" action="buildDefinition" method="input" namespace="/">
+              <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
+              <ww:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</ww:param>
+              <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
+            </ww:url>
+            <ww:url id="removeUrl" action="removeGroupBuildDefinition" namespace="/">
+              <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
+              <ww:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</ww:param>
+              <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
+              <ww:param name="confirmed" value="false"/>
+            </ww:url>
+          </ww:else>
+          <ww:a href="%{editUrl}"><ww:text name="edit"/></ww:a>
+          &nbsp;
+          <ww:a href="%{removeUrl}"><ww:text name="delete"/></ww:a>
+        </ec:column>
+      </c:if>
     </ec:row>
   </ec:table>
 </ww:i18n>

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=447480&r1=447479&r2=447480
==============================================================================
--- 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 10:38:05 2006
@@ -75,21 +75,23 @@
         </c:choose>
       </ec:column>
       <ec:column property="deleteAction" title="&nbsp;" width="1%">
-        <c:choose>
-          <c:when
-              test="${pageScope.project.state == 1 || pageScope.project.state == 10 || pageScope.project.state
== 2 || pageScope.project.state == 3 || pageScope.project.state == 4}">
-            <ww:url id="deleteProjectUrl" value="deleteProject!default.action" namespace="/">
-              <ww:param name="projectId" value="${project.id}"/>
-              <ww:param name="projectName">${project.name}</ww:param>
-            </ww:url>
-            <ww:a href="%{deleteProjectUrl}">
-              <img src="<ww:url value='/images/delete.gif'/>" alt="Delete" title="Delete"
border="0">
-            </ww:a>
-          </c:when>
-          <c:otherwise>
-            <img src="<ww:url value='/images/delete_disabled.gif'/>" alt="Delete"
title="Delete" border="0">
-          </c:otherwise>
-        </c:choose>
+        <c:if test="${pageScope.projectGroup.permissions.write}">
+          <c:choose>
+            <c:when
+                test="${pageScope.project.state == 1 || pageScope.project.state == 10 ||
pageScope.project.state == 2 || pageScope.project.state == 3 || pageScope.project.state ==
4}">
+              <ww:url id="deleteProjectUrl" value="deleteProject!default.action" namespace="/">
+                <ww:param name="projectId" value="${project.id}"/>
+                <ww:param name="projectName">${project.name}</ww:param>
+              </ww:url>
+              <ww:a href="%{deleteProjectUrl}">
+                <img src="<ww:url value='/images/delete.gif'/>" alt="Delete" title="Delete"
border="0">
+              </ww:a>
+            </c:when>
+            <c:otherwise>
+              <img src="<ww:url value='/images/delete_disabled.gif'/>" alt="Delete"
title="Delete" border="0">
+            </c:otherwise>
+          </c:choose>
+        </c:if>
       </ec:column>
     </ec:row>
   </ec:table>

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupMembers.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupMembers.jsp?view=diff&rev=447480&r1=447479&r2=447480
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupMembers.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupMembers.jsp
Mon Sep 18 10:38:05 2006
@@ -41,40 +41,44 @@
             </ec:column>
             <ec:column property="editAction" title="Edit" width="1%">
               <center>
-                <c:choose>
-                  <c:when
-                      test="${pageScope.project.state == 1 || pageScope.project.state ==
10 || pageScope.project.state == 2 || pageScope.project.state == 3 || pageScope.project.state
== 4}">
-                    <ww:url id="editProjectUrl" action="projectEdit">
-                      <ww:param name="projectId" value="${pageScope.project.id}"/>
-                      <ww:param name="projectName" value="${pageScope.project.name}"/>
-                    </ww:url>
-                    <ww:a href="%{editProjectUrl}">
-                      <img src="<ww:url value='/images/edit.gif'/>" alt="Edit" title="Edit"
border="0">
-                    </ww:a>
-                  </c:when>
-                  <c:otherwise>
-                    <img src="<ww:url value='/images/edit_disabled.gif'/>" alt="Edit"
title="Edit" border="0">
-                  </c:otherwise>
-                </c:choose>
+                <c:if test="${projectGroup.permissions.write}">
+                  <c:choose>
+                    <c:when
+                        test="${pageScope.project.state == 1 || pageScope.project.state ==
10 || pageScope.project.state == 2 || pageScope.project.state == 3 || pageScope.project.state
== 4}">
+                      <ww:url id="editProjectUrl" action="projectEdit">
+                        <ww:param name="projectId" value="${pageScope.project.id}"/>
+                        <ww:param name="projectName" value="${pageScope.project.name}"/>
+                      </ww:url>
+                      <ww:a href="%{editProjectUrl}">
+                        <img src="<ww:url value='/images/edit.gif'/>" alt="Edit"
title="Edit" border="0">
+                      </ww:a>
+                    </c:when>
+                    <c:otherwise>
+                      <img src="<ww:url value='/images/edit_disabled.gif'/>" alt="Edit"
title="Edit" border="0">
+                    </c:otherwise>
+                  </c:choose>
+                </c:if>
               </center>
             </ec:column>
             <ec:column property="deleteAction" title="Remove" width="1%">
               <center>
-                <c:choose>
-                  <c:when
-                      test="${pageScope.project.state == 1 || pageScope.project.state ==
10 || pageScope.project.state == 2 || pageScope.project.state == 3 || pageScope.project.state
== 4}">
-                    <ww:url id="removeProjectUrl" action="deleteProject">
-                      <ww:param name="projectId" value="${pageScope.project.id}"/>
-                      <ww:param name="projectName" value="${pageScope.project.name}"/>
-                    </ww:url>
-                    <ww:a href="%{removeProjectUrl}">
-                      <img src="<ww:url value='/images/delete.gif'/>" alt="Delete"
title="Delete" border="0">
-                    </ww:a>
-                  </c:when>
-                  <c:otherwise>
-                    <img src="<ww:url value='/images/delete_disabled.gif'/>" alt="Delete"
title="Delete" border="0">
-                  </c:otherwise>
-                </c:choose>
+                <c:if test="${projectGroup.permissions.write}">
+                  <c:choose>
+                    <c:when
+                        test="${pageScope.project.state == 1 || pageScope.project.state ==
10 || pageScope.project.state == 2 || pageScope.project.state == 3 || pageScope.project.state
== 4}">
+                      <ww:url id="removeProjectUrl" action="deleteProject">
+                        <ww:param name="projectId" value="${pageScope.project.id}"/>
+                        <ww:param name="projectName" value="${pageScope.project.name}"/>
+                      </ww:url>
+                      <ww:a href="%{removeProjectUrl}">
+                        <img src="<ww:url value='/images/delete.gif'/>" alt="Delete"
title="Delete" border="0">
+                      </ww:a>
+                    </c:when>
+                    <c:otherwise>
+                      <img src="<ww:url value='/images/delete_disabled.gif'/>" alt="Delete"
title="Delete" border="0">
+                    </c:otherwise>
+                  </c:choose>
+                </c:if>
               </center>
             </ec:column>
           </ec:row>

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectView.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectView.jsp?view=diff&rev=447480&r1=447479&r2=447480
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectView.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectView.jsp
Mon Sep 18 10:38:05 2006
@@ -32,16 +32,20 @@
               <tbody>
               <tr>
                 <td>
-                  <form action="projectEdit.action" method="post">
-                    <input type="hidden" name="projectId" value="<ww:property value="project.id"/>"/>
-                    <input type="submit" name="edit-project" value="<ww:text name="edit"/>"/>
-                  </form>
+                  <c:if test="${projectGroup.permissions.write}">
+                    <form action="projectEdit.action" method="post">
+                      <input type="hidden" name="projectId" value="<ww:property value="project.id"/>"/>
+                      <input type="submit" name="edit-project" value="<ww:text name="edit"/>"/>
+                    </form>
+                  </c:if>
                 </td>
                 <td>
-                  <form method="post" action="buildProject.action">
-                    <input type="hidden" name="projectId" value="<ww:property value="project.id"/>"/>
-                    <input type="submit" name="build-project" value="<ww:text name="summary.buildNow"/>"/>
-                  </form>
+                  <c:if test="${projectGroup.permissions.execute}">
+                    <form method="post" action="buildProject.action">
+                      <input type="hidden" name="projectId" value="<ww:property value="project.id"/>"/>
+                      <input type="submit" name="build-project" value="<ww:text name="summary.buildNow"/>"/>
+                    </form>
+                  </c:if>
                 </td>
               </tr>
               </tbody>
@@ -56,10 +60,12 @@
         </ww:action>
 
         <div class="functnbar3">
-          <ww:form action="buildDefinition" method="post">
-            <input type="hidden" name="projectId" value="<ww:property value="project.id"/>"/>
-            <ww:submit value="%{getText('add')}"/>
-          </ww:form>
+          <c:if test="${projectGroup.permissions.write}">
+            <ww:form action="buildDefinition" method="post">
+              <input type="hidden" name="projectId" value="<ww:property value="project.id"/>"/>
+              <ww:submit value="%{getText('add')}"/>
+            </ww:form>
+          </c:if>
         </div>
 
         <h3><ww:text name="projectView.notifiers"/></h3>
@@ -97,10 +103,12 @@
           </ec:row>
         </ec:table>
         <div class="functnbar3">
-          <ww:form action="addNotifier!default.action" method="post">
-            <input type="hidden" name="projectId" value="<ww:property value="project.id"/>"/>
-            <ww:submit value="%{getText('add')}"/>
-          </ww:form>
+          <c:if test="${projectGroup.permissions.write}">
+            <ww:form action="addNotifier!default.action" method="post">
+              <input type="hidden" name="projectId" value="<ww:property value="project.id"/>"/>
+              <ww:submit value="%{getText('add')}"/>
+            </ww:form>
+          </c:if>
         </div>
 
         <h3><ww:text name="projectView.dependencies"/></h3>



Mime
View raw message