Commit f6e82d12 authored by Leigh Stoller's avatar Leigh Stoller

Do not show the slice logs if not an admin, mere users cannot access them.

parent c48951b5
......@@ -122,7 +122,9 @@ foreach (array($query1_result, $query2_result) as $query_result) {
$instance["creator"] = $creator;
$instance["created"] = $created;
$instance["destroyed"] = $destroyed;
$instance["public_url"] = $public_url;
if (ISADMIN()) {
$instance["public_url"] = $public_url;
}
$instances[] = $instance;
}
}
......@@ -132,6 +134,7 @@ echo "<div id='activity-body'></div>\n";
echo "<script type='text/javascript'>\n";
echo " window.AJAXURL = 'server-ajax.php';\n";
echo " window.ISADMIN = " . ISADMIN() . ";\n";
echo "</script>\n";
echo "<script type='text/plain' id='instances-json'>\n";
echo json_encode($instances);
......
......@@ -10,7 +10,9 @@
<th>Creator</th>
<th>Created</th>
<th>Destroyed</th>
<th>Logs</th>
<% if (window.ISADMIN) { %>
<th>Logs</th>
<% } %>
</tr>
</thead>
<tbody>
......@@ -28,8 +30,10 @@
<% } else { %>
<td><%- instance.destroyed %></td>
<% } %>
<td><a href='<%- instance.public_url %>' target="_blank">
<span class="glyphicon glyphicon-link"></span></a></td>
<% if (window.ISADMIN) { %>
<td><a href='<%- instance.public_url %>' target="_blank">
<span class="glyphicon glyphicon-link"></span></a></td>
<% } %>
</tr>
<% }); %>
</tbody>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment