From 27855d5f6f9372e76fd65d6c18757f82c59e085a Mon Sep 17 00:00:00 2001 From: Denis Walker <dez@sucs.org> Date: Thu, 16 Oct 2008 22:21:28 +0000 Subject: [PATCH] Ugh, the current security implementation is ugly and horrible and NEEDS FIXING. However, bodged it into the pagemap as an emergency fix and opened ticket #61 --- components/pagemap.php | 5 +++++ templates/pagemap.tpl | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/components/pagemap.php b/components/pagemap.php index ea1f241..cef695a 100644 --- a/components/pagemap.php +++ b/components/pagemap.php @@ -2,6 +2,11 @@ $permission="html"; +// Only html group members can use this page - horrible emergency bodge +if (isset($session->groups[$permission])) { + $smarty->assign("html", TRUE); + + unset($output); if (@$pathlist[3] == "Edit") { diff --git a/templates/pagemap.tpl b/templates/pagemap.tpl index cc52b0b..b61126d 100644 --- a/templates/pagemap.tpl +++ b/templates/pagemap.tpl @@ -1,3 +1,4 @@ +{if $html == TRUE} The Pagemap<br/> <table style="border:1px"> <tr> @@ -20,3 +21,10 @@ The Pagemap<br/> </tr> {/foreach} </table> +{else} + <div class="errorbar"> + <div><div><div> + You do not have access to this component. + </div></div></div> + </div> +{/if} \ No newline at end of file -- GitLab