summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-12-17 10:27:04 +0000
committerTed Trask <ttrask01@yahoo.com>2009-12-17 10:27:04 +0000
commit3fc2855614b96451c99acd40e5083e5c8396dbb9 (patch)
tree5d3154e5f20475ce3d2817b2310d2f041f006208
parent301d65975de493a790a970445595f50ac12d41dd (diff)
downloadacf-tinydns-3fc2855614b96451c99acd40e5083e5c8396dbb9.tar.bz2
acf-tinydns-3fc2855614b96451c99acd40e5083e5c8396dbb9.tar.xz
Use viewlibrary.check_permission from acf-core-0.9.0
-rw-r--r--tinydns-listfiles-html.lsp10
-rw-r--r--tinydns-status-html.lsp4
2 files changed, 7 insertions, 7 deletions
diff --git a/tinydns-listfiles-html.lsp b/tinydns-listfiles-html.lsp
index 72e3311..eab386f 100644
--- a/tinydns-listfiles-html.lsp
+++ b/tinydns-listfiles-html.lsp
@@ -18,10 +18,10 @@ require("viewfunctions")
<TR>
<TD style="padding-right:20px;white-space:nowrap;">
<%
- if session.permissions[page_info.controller].delete then io.write(html.link{value = "delete?filename=" .. file.value.filename.value, label="Delete " }) end
+ if viewlibrary.check_permission("delete") then io.write(html.link{value = "delete?filename=" .. file.value.filename.value, label="Delete " }) end
io.write(html.link{value = "view?filename=" .. file.value.filename.value, label="View " })
- if session.permissions[page_info.controller].edit then io.write(html.link{value = "edit?filename=" .. file.value.filename.value.."&redir="..page_info.orig_action, label="Edit " }) end
- if session.permissions[page_info.controller].editfile then io.write(html.link{value = "editfile?filename=" .. file.value.filename.value.."&redir="..page_info.orig_action, label="Expert " }) end
+ if viewlibrary.check_permission("edit") then io.write(html.link{value = "edit?filename=" .. file.value.filename.value.."&redir="..page_info.orig_action, label="Edit " }) end
+ if viewlibrary.check_permission("editfile") then io.write(html.link{value = "editfile?filename=" .. file.value.filename.value.."&redir="..page_info.orig_action, label="Expert " }) end
%>
</TD>
<TD style="padding-right:20px;white-space:nowrap;text-align:right;"><%= html.html_escape(file.value.filesize.value) %></TD>
@@ -35,7 +35,7 @@ require("viewfunctions")
<% end %>
</DL>
-<% 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>
<%
@@ -43,6 +43,6 @@ require("viewfunctions")
displayform(newfileform)
end %>
-<% if viewlibrary and viewlibrary.dispatch_component and session.permissions[page_info.controller].startstop then
+<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("startstop") then
viewlibrary.dispatch_component("startstop")
end %>
diff --git a/tinydns-status-html.lsp b/tinydns-status-html.lsp
index efe77b8..49274e9 100644
--- a/tinydns-status-html.lsp
+++ b/tinydns-status-html.lsp
@@ -10,14 +10,14 @@ require("viewfunctions")
displayitem(data.value.status)
displayitem(data.value.version)
-if data.value.version and data.value.version.errtxt and session.permissions.apk and session.permissions.apk.install then
+if data.value.version and data.value.version.errtxt and viewlibrary.check_permission("apk-tools/apk/install") then
%>
<a href="<%= html.html_escape(page_info.script .. "/apk-tools/apk/install?package="..data.value.version.name) %>">Install</a>
<%
end
displayitem(data.value.autostart)
-if not (data.value.version and data.value.version.errtxt) and data.value.autostart and data.value.autostart.errtxt and session.permissions.rc and session.permissions.rc.edit then
+if not (data.value.version and data.value.version.errtxt) and data.value.autostart and data.value.autostart.errtxt and viewlibrary.check_permission("alpine-baselayout/rc/edit") then
%>
<a href="<%= html.html_escape(page_info.script .. "/alpine-baselayout/rc/edit?servicename="..data.value.autostart.name.."&redir=".. page_info.orig_action) %>">Schedule autostart</a>
<%