From 8f0397f2700ebfddbc524d4274585b7a875ac4ca Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 17 Dec 2009 10:28:21 +0000 Subject: Use viewlibrary.check_permission from acf-core-0.9.0 --- tcpproxy-listsmtpentries-html.lsp | 4 ++-- tcpproxy-listsmtpfiles-html.lsp | 6 +++--- tcpproxy-smtpstatus-html.lsp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tcpproxy-listsmtpentries-html.lsp b/tcpproxy-listsmtpentries-html.lsp index 9a48e7b..8fdfe96 100644 --- a/tcpproxy-listsmtpentries-html.lsp +++ b/tcpproxy-listsmtpentries-html.lsp @@ -16,10 +16,10 @@ require("viewfunctions") <% for i,interface in ipairs(view.value) do %> - <% if session.permissions.tcpproxy.editsmtpentry then %> + <% if viewlibrary.check_permission("editsmtpentry") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editsmtpentry?ipaddr="..(interface.ipaddr or interface.interface).."&redir="..page_info.orig_action, label="Edit "} %> <% end %> - <% if session.permissions.tcpproxy.delsmtpentry then %> + <% if viewlibrary.check_permission("delsmtpentry") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/delsmtpentry?ipaddr="..(interface.ipaddr or interface.interface), label="Delete "} %> <% end %> diff --git a/tcpproxy-listsmtpfiles-html.lsp b/tcpproxy-listsmtpfiles-html.lsp index 40c8161..37fbd9e 100644 --- a/tcpproxy-listsmtpfiles-html.lsp +++ b/tcpproxy-listsmtpfiles-html.lsp @@ -15,10 +15,10 @@ require("viewfunctions") <% for i,file in ipairs(view.value) do %> - <% if session.permissions.tcpproxy.editsmtpfile then %> + <% if viewlibrary.check_permission("editsmtpfile") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editsmtpfile?filename="..file.."&redir="..page_info.orig_action, label="Edit "} %> <% end %> - <% if session.permissions.tcpproxy.delsmtpfile then %> + <% if viewlibrary.check_permission("delsmtpfile") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/delsmtpfile?filename="..file, label="Delete "} %> <% end %> @@ -28,7 +28,7 @@ require("viewfunctions") -<% if viewlibrary and viewlibrary.dispatch_component and session.permissions.tcpproxy.createsmtpfile then +<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createsmtpfile") then local createform = viewlibrary.dispatch_component("createsmtpfile", nil, true) %>

<%= html.html_escape(createform.label) %>

<% diff --git a/tcpproxy-smtpstatus-html.lsp b/tcpproxy-smtpstatus-html.lsp index 0e3384f..143c991 100644 --- a/tcpproxy-smtpstatus-html.lsp +++ b/tcpproxy-smtpstatus-html.lsp @@ -8,7 +8,7 @@ require("viewfunctions")

SMTP Proxy Status

<% displayitem(view.value.version) -if view.value.version and view.value.version.errtxt and session.permissions.apk and session.permissions.apk.install then +if view.value.version and view.value.version.errtxt and viewlibrary.check_permission("apk-tools/apk/install") then %> Install <% end %> -- cgit v1.2.3