summaryrefslogtreecommitdiffstats
path: root/rrdtool-listgraphcfg-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'rrdtool-listgraphcfg-html.lsp')
-rw-r--r--rrdtool-listgraphcfg-html.lsp15
1 files changed, 4 insertions, 11 deletions
diff --git a/rrdtool-listgraphcfg-html.lsp b/rrdtool-listgraphcfg-html.lsp
index d415675..83be263 100644
--- a/rrdtool-listgraphcfg-html.lsp
+++ b/rrdtool-listgraphcfg-html.lsp
@@ -1,13 +1,6 @@
<% local form, viewlibrary, page_info, session = ...
require("viewfunctions")
%>
-<%
---[[ DEBUG INFORMATION
-io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
-io.write(html.cfe_unpack(form))
-io.write("</span>")
---]]
-%>
<% displaycommandresults({"delete"}, session) %>
@@ -35,11 +28,11 @@ function javascript_confirm_graph(formID,filename) {
<% for i,file in ipairs(form.value) do %>
<TR>
<TD style="padding-right:20px;white-space:nowrap;">
- <% if session.permissions[page_info.controller].delete then %>
+ <% if viewlibrary.check_permission("delete") then %>
<A STYLE="cursor: pointer;" onclick="javascript_confirm_graph('confirmDisplay','<% io.write(file.value.filename.value) %>')">Delete</A>
<% end %>
<%
- if session.permissions[page_info.controller].editgraphcfg then io.write(html.link{value = "editgraphcfg?filename=" .. file.value.filename.value.."&redir="..page_info.orig_action, label="Edit " }) end
+ if viewlibrary.check_permission("editgraphcfg") then io.write(html.link{value = "editgraphcfg?filename=" .. file.value.filename.value.."&redir="..page_info.orig_action, label="Edit " }) end
%>
</TD>
<TD style="padding-right:20px;white-space:nowrap;text-align:right;"><%= html.html_escape(file.value.filesize.value) %></TD>
@@ -48,7 +41,7 @@ function javascript_confirm_graph(formID,filename) {
</TR>
<% end %>
- <% if session.permissions[page_info.controller].createrrd then %>
+ <% if viewlibrary.check_permission("createrrd") then %>
<TR>
<TD style="padding-right:20px;white-space:nowrap;">
<% io.write(html.link{value = "newgraphcfg", label="Create new graph " }) %>
@@ -59,7 +52,7 @@ function javascript_confirm_graph(formID,filename) {
</TABLE>
-<% if viewlibrary and viewlibrary.dispatch_component and session.permissions[page_info.controller].newfile then
+<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("newfile") then
local newfileform = viewlibrary.dispatch_component("newfile", nil, true) %>
<h2>Create new Domain</h2>
<%