[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openvas-cvs
Subject:    [Openvas-commits] r18844 - in trunk/gsa: . src/html/classic
From:       scm-commit () wald ! intevation ! org
Date:       2014-02-27 21:02:28
Message-ID: 20140227210228.444F59A2341B () wald ! intevation ! org
[Download RAW message or body]

Author: mattm
Date: 2014-02-27 22:02:27 +0100 (Thu, 27 Feb 2014)
New Revision: 18844

Modified:
   trunk/gsa/ChangeLog
   trunk/gsa/src/html/classic/omp.xsl
Log:
	* src/html/classic/omp.xsl (get_system_reports_response): Make "Reports
	for slave" control depend on GET_SLAVES access.

Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog	2014-02-27 20:54:04 UTC (rev 18843)
+++ trunk/gsa/ChangeLog	2014-02-27 21:02:27 UTC (rev 18844)
@@ -1,5 +1,10 @@
 2014-02-27  Matthew Mundell <matthew.mundell@greenbone.net>
 
+	* src/html/classic/omp.xsl (get_system_reports_response): Make "Reports
+	for slave" control depend on GET_SLAVES access.
+
+2014-02-27  Matthew Mundell <matthew.mundell@greenbone.net>
+
 	* src/html/classic/omp.xsl (gsa:may): Check if user may run command at
 	all.
 	(toggle-tag-icon): Check command access.

Modified: trunk/gsa/src/html/classic/omp.xsl
===================================================================
--- trunk/gsa/src/html/classic/omp.xsl	2014-02-27 20:54:04 UTC (rev 18843)
+++ trunk/gsa/src/html/classic/omp.xsl	2014-02-27 21:02:27 UTC (rev 18844)
@@ -26592,48 +26592,50 @@
             </xsl:choose>
           </td>
         </tr>
-        <tr>
-          <td>
-            Reports for slave:
-          </td>
-          <td>
-            <div id="small_form" style="float:left;">
-              <form action="" method="get">
-                <input type="hidden" name="token" value="{/envelope/token}"/>
-                <input type="hidden" name="cmd" value="get_system_reports"/>
-                <input type="hidden" name="duration" value="{$duration}"/>
-                <select name="slave_id">
-                  <xsl:variable name="slave_id">
-                    <xsl:value-of select="../slave/@id"/>
-                  </xsl:variable>
-                  <xsl:choose>
-                    <xsl:when test="string-length ($slave_id) &gt; 0">
-                      <option value="0">--</option>
-                    </xsl:when>
-                    <xsl:otherwise>
-                      <option value="0" selected="1">--</option>
-                    </xsl:otherwise>
-                  </xsl:choose>
-                  <xsl:for-each select="../get_slaves_response/slave">
+        <xsl:if test="gsa:may-op ('get_slaves')">
+          <tr>
+            <td>
+              Reports for slave:
+            </td>
+            <td>
+              <div id="small_form" style="float:left;">
+                <form action="" method="get">
+                  <input type="hidden" name="token" value="{/envelope/token}"/>
+                  <input type="hidden" name="cmd" value="get_system_reports"/>
+                  <input type="hidden" name="duration" value="{$duration}"/>
+                  <select name="slave_id">
+                    <xsl:variable name="slave_id">
+                      <xsl:value-of select="../slave/@id"/>
+                    </xsl:variable>
                     <xsl:choose>
-                      <xsl:when test="@id = $slave_id">
-                        <option value="{@id}" selected="1"><xsl:value-of select="name"/></option>
+                      <xsl:when test="string-length ($slave_id) &gt; 0">
+                        <option value="0">--</option>
                       </xsl:when>
                       <xsl:otherwise>
-                        <option value="{@id}"><xsl:value-of select="name"/></option>
+                        <option value="0" selected="1">--</option>
                       </xsl:otherwise>
                     </xsl:choose>
-                  </xsl:for-each>
-                </select>
-                <input type="image"
-                       name="Update"
-                       title="Update"
-                       src="/img/refresh.png"
-                       alt="Update" style="margin-left:3px;margin-right:3px;"/>
-              </form>
-            </div>
-          </td>
-        </tr>
+                    <xsl:for-each select="../get_slaves_response/slave">
+                      <xsl:choose>
+                        <xsl:when test="@id = $slave_id">
+                          <option value="{@id}" selected="1"><xsl:value-of select="name"/></option>
+                        </xsl:when>
+                        <xsl:otherwise>
+                          <option value="{@id}"><xsl:value-of select="name"/></option>
+                        </xsl:otherwise>
+                      </xsl:choose>
+                    </xsl:for-each>
+                  </select>
+                  <input type="image"
+                         name="Update"
+                         title="Update"
+                         src="/img/refresh.png"
+                         alt="Update" style="margin-left:3px;margin-right:3px;"/>
+                </form>
+              </div>
+            </td>
+          </tr>
+        </xsl:if>
       </table>
       <xsl:choose>
         <xsl:when test="@status = '500'">

_______________________________________________
Openvas-commits mailing list
Openvas-commits@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic