summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tcpproxy-listsmtpentries-html.lsp4
-rw-r--r--tcpproxy-listsmtpfiles-html.lsp6
-rw-r--r--tcpproxy-smtpstatus-html.lsp2
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 %>
<TR>
<TD style="padding-right:20px;white-space:nowrap;">
- <% 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 %>
</TD>
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 %>
<TR>
<TD style="padding-right:20px;white-space:nowrap;">
- <% 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 %>
</TD>
@@ -28,7 +28,7 @@ require("viewfunctions")
</TABLE>
</DL>
-<% 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) %>
<H2><%= html.html_escape(createform.label) %></H2>
<%
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")
<H1>SMTP Proxy Status</H1>
<DL>
<% 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
%>
<a href="<%= html.html_escape(page_info.script .. "/apk-tools/apk/install?package="..view.value.version.name) %>">Install</a>
<% end %>