continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r488287 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/component/ mdo/ webapp/WEB-INF/jsp/ webapp/WEB-INF/jsp/components/
Date Mon, 18 Dec 2006 14:38:24 GMT
Author: evenisse
Date: Mon Dec 18 06:38:23 2006
New Revision: 488287

URL: http://svn.apache.org/viewvc?view=rev&rev=488287
Log:
Don't allow to edit/remove project group notifiers defined in a pom

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
    maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java?view=diff&rev=488287&r1=488286&r2=488287
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
Mon Dec 18 06:38:23 2006
@@ -112,6 +112,16 @@
         ns.setId( notifier.getId() );
         ns.setType( notifier.getType() );
         ns.setProjectGroupId( getProjectGroupId() );
+
+        if ( notifier.isFromProject() )
+        {
+            ns.setFrom( "PROJECT" );
+        }
+        else
+        {
+            ns.setFrom( "USER" );
+        }
+
         // FIXME: Source the recipient 
         ns.setRecipient( "unknown" );
         // XXX: Hack - just for testing :)

Modified: maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo?view=diff&rev=488287&r1=488286&r2=488287
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo Mon Dec 18 06:38:23
2006
@@ -349,6 +349,13 @@
           <type>String</type>
         </field>
         <field>
+          <name>from</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <description>The origin of the notifier (pom or user).</description>
+          <type>String</type>
+        </field>
+        <field>
           <name>events</name>
           <version>1.0.0</version>
           <required>false</required>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp?view=diff&rev=488287&r1=488286&r2=488287
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp
Mon Dec 18 06:38:23 2006
@@ -18,39 +18,47 @@
       <ec:column property="type" title="projectView.notifier.type"/>
       <ec:column property="recipient" title="projectView.notifier.recipient"/>
       <ec:column property="events" title="projectView.notifier.events"/>
-      <ec:column property="sender" title="projectView.notifier.from"/>      
+      <ec:column property="sender" title="projectView.notifier.from"/>
       <ec:column property="editActions" title="Edit">
-        
-        <pss:ifAuthorized permission="continuum-modify-group" resource="${projectGroupName}">
-          <ww:url id="editUrl" action="editProjectGroupNotifier" namespace="/">
-            <ww:param name="projectGroupId">${pageScope.projectGroupNotifierSummary.projectGroupId}</ww:param>
-            <ww:param name="notifierId">${pageScope.projectGroupNotifierSummary.id}</ww:param>
-            <ww:param name="notifierType">${pageScope.projectGroupNotifierSummary.type}</ww:param>
-          </ww:url>
-          <ww:a href="%{editUrl}">
-              <img src="<ww:url value='/images/edit.gif'/>" alt="Edit" title="Edit"
border="0">
-          </ww:a>
-        </pss:ifAuthorized>
-        <pss:elseAuthorized>
+        <ww:if test="${pageScope.projectGroupNotifierSummary.from == 'PROJECT'}">
           <img src="<ww:url value='/images/edit_disabled.gif'/>" alt="Edit" title="Edit"
border="0">
-        </pss:elseAuthorized>
+        </ww:if>
+        <ww:else>
+          <pss:ifAuthorized permission="continuum-modify-group" resource="${projectGroupName}">
+            <ww:url id="editUrl" action="editProjectGroupNotifier" namespace="/">
+              <ww:param name="projectGroupId">${pageScope.projectGroupNotifierSummary.projectGroupId}</ww:param>
+              <ww:param name="notifierId">${pageScope.projectGroupNotifierSummary.id}</ww:param>
+              <ww:param name="notifierType">${pageScope.projectGroupNotifierSummary.type}</ww:param>
+            </ww:url>
+            <ww:a href="%{editUrl}">
+              <img src="<ww:url value='/images/edit.gif'/>" alt="Edit" title="Edit"
border="0">
+            </ww:a>
+          </pss:ifAuthorized>
+          <pss:elseAuthorized>
+            <img src="<ww:url value='/images/edit_disabled.gif'/>" alt="Edit" title="Edit"
border="0">
+          </pss:elseAuthorized>
+        </ww:else>
       </ec:column>    
       <ec:column property="deleteActions" title="Remove">
-        <pss:ifAuthorized permission="continuum-modify-group" resource="${projectGroupName}">
-          <ww:url id="removeUrl" action="deleteProjectGroupNotifier!default.action" namespace="/">
-            <ww:param name="projectGroupId">${pageScope.projectGroupNotifierSummary.projectGroupId}</ww:param>
-            <ww:param name="notifierId">${pageScope.projectGroupNotifierSummary.id}</ww:param>
-            <ww:param name="confirmed" value="false"/>
-          </ww:url>
-        <ww:a href="%{removeUrl}">
+        <ww:if test="${pageScope.projectGroupNotifierSummary.from == 'PROJECT'}">
+          <img src="<ww:url value='/images/delete_disabled.gif'/>" alt="Edit" title="Edit"
border="0">
+        </ww:if>
+        <ww:else>
+          <pss:ifAuthorized permission="continuum-modify-group" resource="${projectGroupName}">
+            <ww:url id="removeUrl" action="deleteProjectGroupNotifier!default.action"
namespace="/">
+              <ww:param name="projectGroupId">${pageScope.projectGroupNotifierSummary.projectGroupId}</ww:param>
+              <ww:param name="notifierId">${pageScope.projectGroupNotifierSummary.id}</ww:param>
+              <ww:param name="confirmed" value="false"/>
+            </ww:url>
+          <ww:a href="%{removeUrl}">
             <img src="<ww:url value='/images/delete.gif'/>" alt="Delete" title="Delete"
border="0">
-        </ww:a>
-        </pss:ifAuthorized>
-        <pss:elseAuthorized>
-          <img src="<ww:url value='/images/delete_disabled.gif'/>" alt="Delete"
title="Delete" border="0">
-        </pss:elseAuthorized>
+          </ww:a>
+          </pss:ifAuthorized>
+          <pss:elseAuthorized>
+            <img src="<ww:url value='/images/delete_disabled.gif'/>" alt="Delete"
title="Delete" border="0">
+          </pss:elseAuthorized>
+        </ww:else>
       </ec:column>      
-     
     </ec:row>
   </ec:table>
   </ww:if>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp?view=diff&rev=488287&r1=488286&r2=488287
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp Mon
Dec 18 06:38:23 2006
@@ -71,22 +71,23 @@
         </div>
 
         <h3><ww:text name="projectView.notifiers"/></h3>
-        <ww:set name="notifiers" value="project.notifiers" scope="request"/>
-        <ec:table items="notifiers"
-                  var="notifier"
-                  showExports="false"
-                  showPagination="false"
-                  showStatusBar="false"
-                  filterable="false"
-                  sortable="false">
-          <ec:row>
-            <ec:column property="type" title="projectView.notifier.type"/>
-            <ec:column property="recipient" title="projectView.notifier.recipient" cell="org.apache.maven.continuum.web.view.projectview.NotifierRecipientCell"/>
-            <ec:column property="events" title="projectView.notifier.events" cell="org.apache.maven.continuum.web.view.projectview.NotifierEventCell"/>
-            <ec:column property="from" title="projectView.notifier.from" cell="org.apache.maven.continuum.web.view.projectview.NotifierFromCell"/>
-            <ec:column property="actions" title="&nbsp;">
-               <pss:ifAuthorized permission="continuum-modify-group" resource="${project.projectGroup.name}">
-                <c:if test="${!pageScope.notifier.fromProject}">
+        <ww:if test="${not empty project.notifiers}">
+          <ww:set name="notifiers" value="project.notifiers" scope="request"/>
+          <ec:table items="notifiers"
+                    var="notifier"
+                    showExports="false"
+                    showPagination="false"
+                    showStatusBar="false"
+                    filterable="false"
+                    sortable="false">
+            <ec:row>
+              <ec:column property="type" title="projectView.notifier.type"/>
+              <ec:column property="recipient" title="projectView.notifier.recipient" cell="org.apache.maven.continuum.web.view.projectview.NotifierRecipientCell"/>
+              <ec:column property="events" title="projectView.notifier.events" cell="org.apache.maven.continuum.web.view.projectview.NotifierEventCell"/>
+              <ec:column property="from" title="projectView.notifier.from" cell="org.apache.maven.continuum.web.view.projectview.NotifierFromCell"/>
+              <ec:column property="actions" title="&nbsp;">
+                <pss:ifAuthorized permission="continuum-modify-group" resource="${project.projectGroup.name}">
+                  <c:if test="${!pageScope.notifier.fromProject}">
                     <a href='<ww:url value="${notifier.type}ProjectNotifierEdit!default.action">
                       <ww:param name="notifierId" value="${notifier.id}"/>
                       <ww:param name="projectId" value="project.id"/>
@@ -102,11 +103,12 @@
                       <ww:param name="notifierId" value="${notifier.id}"/>
                       </ww:url>'>
                       <img src="<ww:url value='/images/delete.gif'/>" alt="<ww:text
name='delete'/>" title="<ww:text name='delete'/>" border="0"></a>
-                </c:if>
-              </pss:ifAuthorized>
-            </ec:column>
-          </ec:row>
-        </ec:table>
+                  </c:if>
+                </pss:ifAuthorized>
+              </ec:column>
+            </ec:row>
+          </ec:table>
+        </ww:if>
         <div class="functnbar3">
            <pss:ifAuthorized permission="continuum-modify-group" resource="${project.projectGroup.name}">
           <ww:form action="addProjectNotifier!default.action" method="post">



Mime
View raw message