diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-12-17 10:28:01 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-12-17 10:28:01 +0000 |
commit | 7b4ec470fa2e95cfcb1d2c5244f940acbf4ec0f6 (patch) | |
tree | a67601a457ebf5d9c7bf0f4f0e574531b31823ae /rrdtool-listgraphcfg-html.lsp | |
parent | df139d6795334165c4fa84aaeba9e2cea85b0c2d (diff) | |
download | acf-rrdtool-7b4ec470fa2e95cfcb1d2c5244f940acbf4ec0f6.tar.bz2 acf-rrdtool-7b4ec470fa2e95cfcb1d2c5244f940acbf4ec0f6.tar.xz |
Use viewlibrary.check_permission from acf-core-0.9.0
Diffstat (limited to 'rrdtool-listgraphcfg-html.lsp')
-rw-r--r-- | rrdtool-listgraphcfg-html.lsp | 15 |
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> <% |