David Schneider avatar David Schneider committed 2d89931

update calls to authz.advertiseAction

Comments (0)

Files changed (2)

master/templates/build.html

   {% endif %}
 
   {{ current_step }}
-  
-  {% if authz.advertiseAction('stopBuild') %}
+
+  {% if authz.advertiseAction('stopBuild', request) %}
     <h2>Stop Build</h2>
     {{ forms.stop_build(build_url+"/stop", authz, on_all=False, short=False, label='This Build') }}
   {% endif %}
 {% else %}
   <h2>Results:</h2>
 
-  <p class="{{ result_css }} result">   
+  <p class="{{ result_css }} result">
     {{ b.getText()|join(' ')|capitalize }}
   </p>
-   
+
   {% if b.getTestResults() %}
     <h3><a href="{{ tests_link }}"/></h3>
   {% endif %}
  # TODO: turn this into a table, or some other sort of definition-list
  # that doesn't take up quite so much vertical space
  #}
-   
+
 <h2>BuildSlave:</h2>
-  
-{% if slave_url %}  
+
+{% if slave_url %}
   <a href="{{ slave_url|e }}">{{ b.getSlavename()|e }}</a>
 {% else %}
-  {{ b.getSlavename()|e }} 
+  {{ b.getSlavename()|e }}
 {% endif %}
 
 <h2>Reason:</h2>
 {% for s in steps %}
   <li>
     <div class="{{ s.css_class }} result">
-      <a href="{{ s.link }}">{{ s.name }}</a> 
+      <a href="{{ s.link }}">{{ s.name }}</a>
       {{ s.text }}&nbsp;<span style="float:right">{{ '( ' + s.time_to_run + ' )' if s.time_to_run else '' }}</span>
     </div>
 
       {% else %}
         <li class="{{ item_class.next() }}">- no logs -</li>
       {% endfor %}
-    
+
       {% for u in s.urls %}
         <li class="{{ item_class.next() }}"><a href="{{ u.url }}">{{ u.logname }}</a></li>
       {% endfor %}
-    </ol>  
+    </ol>
   </li>
 {% endfor %}
 </ol>
 </table>
 
 <!-- PyPy specific change: hide the "resubmit build section"
-  {% if authz.advertiseAction('forceBuild') %}
+  {% if authz.advertiseAction('forceBuild', request) %}
     <h3>Resubmit Build:</h3>
     {{ forms.rebuild_build(build_url+"/rebuild", authz, exactly, ss) }}
   {% endif %}
 </div>
 
 <br style="clear:both"/>
-  
+
 {% if ss.changes %}
 <div class="column">
   <h2>All Changes:</h2>
     </li>
   {% else %}
     <li>no changes</li>
-  {% endfor %}  
+  {% endfor %}
   </ol>
-</div> 
+</div>
 {% endif %}
 
 {% endblock %}

master/templates/builder.html

 
     {{ b.current_step }}
 
-    {% if authz.advertiseAction('stopBuild') %}
+    {% if authz.advertiseAction('stopBuild', request) %}
       {{ forms.stop_build(b.stop_url, authz, on_all=False, short=True, label='Build') }}
-    {% endif %}    
+    {% endif %}
     </li>
   {% endfor %}
   </ul>
 {% else %}
   <h2>No current builds</h2>
-{% endif %}    
- 
+{% endif %}
+
 {% if pending %}
   <h2>Pending Build Requests:</h2>
   <ul>
   {% for b in pending %}
-    <li><small>({{ b.when }}, waiting {{ b.delay }})</small> 
-    
-    {% if authz.advertiseAction('cancelPendingBuild') %}
+    <li><small>({{ b.when }}, waiting {{ b.delay }})</small>
+
+    {% if authz.advertiseAction('cancelPendingBuild', request) %}
       {{ forms.cancel_pending_build(builder_url+"/cancelbuild", authz, short=True, id=b.id) }}
-    {% endif %}    
-    
+    {% endif %}
+
     {% if b.num_changes < 4 %}
         {% for c in b.changes %}{{ c.revision|shortrev(c.repo) }}
         (<a href="{{ c.url }}">{{ c.who }}</a>){% if not loop.last %},{% endif %}
         {% endfor %}
     {% else %}
         ({{ b.num_changes }} changes)
-    {% endif %}    
+    {% endif %}
 
     </li>
   {% endfor %}
-  </ul>  
-  
-  {% if authz.advertiseAction('cancelPendingBuild') %}
+  </ul>
+
+  {% if authz.advertiseAction('cancelPendingBuild', requeset) %}
     {{ forms.cancel_pending_build(builder_url+"/cancelbuild", authz, short=False, id='all') }}
-  {% endif %}    
-     
+  {% endif %}
+
 {% else %}
   <h2>No Pending Build Requests</h2>
 {% endif %}
     <td class="idle">connected</td>
     <td>{{ s.admin|email if s.admin else ""}}</td>
   {% else %}
-    <td class="offline">offline</td> 
+    <td class="offline">offline</td>
     <td/>
   {% endif %}
   </tr>
 {% endfor %}
 </table>
 
-{% if authz.advertiseAction('pingBuilder') %}
+{% if authz.advertiseAction('pingBuilder', request) %}
   <h2>Ping slaves</h2>
   {{ forms.ping_builder(builder_url+"/ping", authz) }}
 {% endif %}
 
-{% if authz.advertiseAction('forceBuild') %}
+{% if authz.advertiseAction('forceBuild', request) %}
   <h2>Force build</h2>
   {{ forms.force_build(builder_url+"/force", authz, False) }}
 {% endif %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.