From 6d49c95dc3cc375cf1f7ea0e2d4350ef68f81268 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 17 Dec 2009 10:22:04 +0000 Subject: Use viewlibrary.check_permission from acf-core-0.9.0 --- did-html.lsp | 6 +++--- did-status-html.lsp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/did-html.lsp b/did-html.lsp index 1ed5ecd..8b645ad 100644 --- a/did-html.lsp +++ b/did-html.lsp @@ -42,10 +42,10 @@ function newPopup(url) { <%= html.link{value = "JavaScript:newPopup('editdefinition?did=" .. def.did.."');", label="Edit "} %> - <% if session.permissions[page_info.controller].publish then %> + <% if viewlibrary.check_permission("publish") then %> <%= html.link{value = "publish?did=" .. def.did, label="Publish "} %> <% end %> - <% if session.permissions[page_info.controller].deletedefinition then %> + <% if viewlibrary.check_permission("deletedefinition") then %> <%= html.link{value = "deletedefinition?did=" .. def.did, label="Delete "} %> <% end %> @@ -67,7 +67,7 @@ function newPopup(url) {

No definitions found

<% end %> -<% if session.permissions[page_info.controller].publishall then %> +<% if viewlibrary.check_permission("publishall") then %>
">
Publish All DIDs
diff --git a/did-status-html.lsp b/did-status-html.lsp index 5ded042..470b26b 100644 --- a/did-status-html.lsp +++ b/did-status-html.lsp @@ -8,7 +8,7 @@ require("viewfunctions")
<% local status if viewlibrary and viewlibrary.dispatch_component then - if session.permissions.postgresql and session.permissions.postgresql.status then + if viewlibrary.check_permission("postgresql/postgresql/status") then status = viewlibrary.dispatch_component("postgresql/postgresql/status", nil, true) end end %> -- cgit v1.2.3