diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-12-17 10:23:37 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-12-17 10:23:37 +0000 |
commit | 5999f46f792b0c737be4de05f5027874ddbefbc9 (patch) | |
tree | 3a7b7ef87ee152a9b913389af6988eadd5fc7bb5 | |
parent | 835863e09e6b73c12622ec2cf4dabcee85fef88d (diff) | |
download | acf-squid-5999f46f792b0c737be4de05f5027874ddbefbc9.tar.bz2 acf-squid-5999f46f792b0c737be4de05f5027874ddbefbc9.tar.xz |
Use viewlibrary.check_permission from acf-core-0.9.0
-rw-r--r-- | squid-listfiles-html.lsp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/squid-listfiles-html.lsp b/squid-listfiles-html.lsp index f9bae19..c28f60d 100644 --- a/squid-listfiles-html.lsp +++ b/squid-listfiles-html.lsp @@ -19,10 +19,10 @@ end %> <% for i,file in ipairs(view.value) do %> <TR> <TD style="padding-right:20px;white-space:nowrap;"> - <% if session.permissions.squid.editfile then %> + <% if viewlibrary.check_permission("editfile") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editfile?filename="..file.."&redir="..page_info.orig_action, label="Edit "} %> <% end %> - <% if session.permissions.squid.deletefile then %> + <% if viewlibrary.check_permission("deletefile") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletefile?filename="..file, label="Delete "} %> <% end %> </TD> @@ -32,7 +32,7 @@ end %> </TABLE> </DL> -<% if viewlibrary and viewlibrary.dispatch_component and session.permissions.squid.createfile then +<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createfile") then local createform = viewlibrary.dispatch_component("createfile", nil, true) %> <H2><%= html.html_escape(createform.label) %></H2> <% @@ -40,6 +40,6 @@ end %> displayform(createform) 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 %> |