diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-12-17 10:27:04 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-12-17 10:27:04 +0000 |
commit | 3fc2855614b96451c99acd40e5083e5c8396dbb9 (patch) | |
tree | 5d3154e5f20475ce3d2817b2310d2f041f006208 /tinydns-listfiles-html.lsp | |
parent | 301d65975de493a790a970445595f50ac12d41dd (diff) | |
download | acf-tinydns-3fc2855614b96451c99acd40e5083e5c8396dbb9.tar.bz2 acf-tinydns-3fc2855614b96451c99acd40e5083e5c8396dbb9.tar.xz |
Use viewlibrary.check_permission from acf-core-0.9.0
Diffstat (limited to 'tinydns-listfiles-html.lsp')
-rw-r--r-- | tinydns-listfiles-html.lsp | 10 |
1 files changed, 5 insertions, 5 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 %> |