From 8b4476e4401243d43e110b7dcaeb986ded780ee0 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 17 Dec 2009 10:19:09 +0000 Subject: Use viewlibrary.check_permission from acf-core-0.9.0 --- cron-listjobs-html.lsp | 2 +- interfaces-read-html.lsp | 8 ++++---- logfiles-status-html.lsp | 4 ++-- rc-status-html.lsp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cron-listjobs-html.lsp b/cron-listjobs-html.lsp index 8ba2a23..6cc4463 100644 --- a/cron-listjobs-html.lsp +++ b/cron-listjobs-html.lsp @@ -54,6 +54,6 @@ No jobs <% end %> -<% if viewlibrary and viewlibrary.dispatch_component and session.permissions.cron.createjob then +<% if viewlibrary.check_permission("createjob") then viewlibrary.dispatch_component("createjob") end %> diff --git a/interfaces-read-html.lsp b/interfaces-read-html.lsp index 4bb35d7..2409f10 100644 --- a/interfaces-read-html.lsp +++ b/interfaces-read-html.lsp @@ -41,16 +41,16 @@ end %> end end %> - <% if session.permissions.interfaces.update then %> + <% if viewlibrary.check_permission("update") then %> Edit <% end - if session.permissions.interfaces.delete then %> + if viewlibrary.check_permission("delete") then %> Delete <% end - if session.permissions.interfaces.ifup then %> + if viewlibrary.check_permission("ifup") then %> ifup <% end - if session.permissions.interfaces.ifdown then %> + if viewlibrary.check_permission("ifdown") then %> ifdown <% end %> diff --git a/logfiles-status-html.lsp b/logfiles-status-html.lsp index e508da9..1610417 100644 --- a/logfiles-status-html.lsp +++ b/logfiles-status-html.lsp @@ -7,7 +7,7 @@
- <% if session.permissions.logfiles.delete then %> + <% if viewlibrary.check_permission("delete") then %> <% end %> @@ -20,7 +20,7 @@ <% for i,file in ipairs(view.value) do %> - <% if session.permissions.logfiles.delete then %> + <% if viewlibrary.check_permission("delete") then %>
DeleteView
<% if file.value.inuse.value then %> in use diff --git a/rc-status-html.lsp b/rc-status-html.lsp index 851050e..446c826 100644 --- a/rc-status-html.lsp +++ b/rc-status-html.lsp @@ -7,7 +7,7 @@
-<% if session.permissions.rc.edit then %> +<% if viewlibrary.check_permission("edit") then %> <% end %> @@ -15,7 +15,7 @@ <% for i,item in ipairs(view.value) do %> - <% if session.permissions.rc.edit then %> + <% if viewlibrary.check_permission("edit") then %> -- cgit v1.2.3
ActionService NameRunlevels
<%= html.link{value="edit?servicename="..item.servicename.."&redir="..page_info.orig_action, label="Edit " } %> <% end %> <%= html.html_escape(item.servicename) %><%= html.html_escape(table.concat(item.runlevels, ", ")) %>